DamageModule class

Пакет: com.hypixel.hytale.server.core.modules.entity.damage

Файл: com/hypixel/hytale/server/core/modules/entity/damage/DamageModule.java

extends: JavaPlugin

Поля (4)

МодификаторыТипИмя
final PluginManifest MANIFEST
private final Set<Dependency<EntityStore>> dependencies
instance
ComponentRegistryProxy var1

Методы (10)

МодификаторыВозвратСигнатура
public OrderGatherFilterpublic OrderGatherFilter()
abstract throw new UnsupportedOperationExceptionthrow new UnsupportedOperationException("not supported")
static DamageModule getDamageModule get()
public ComponentType<EntityStore, DeathComponent> getDeathComponentTypeComponentType<EntityStore, DeathComponent> getDeathComponentType()
public ComponentType<EntityStore, DeferredCorpseRemoval> getDeferredCorpseRemovalComponentTypeComponentType<EntityStore, DeferredCorpseRemoval> getDeferredCorpseRemovalComponentType()
public Set<Dependency<EntityStore>> getDependenciespublic Set<Dependency<EntityStore>> getDependencies()
public SystemGroup<EntityStore> getFilterDamageGroupSystemGroup<EntityStore> getFilterDamageGroup()
public SystemGroup<EntityStore> getGatherDamageGroupSystemGroup<EntityStore> getGatherDamageGroup()
public SystemGroup<EntityStore> getInspectDamageGroupSystemGroup<EntityStore> getInspectDamageGroup()
abstract super super(var1)

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.server.core.modules.entity.damage;

class="kw">import com.hypixel.hytale.common.plugin.PluginManifest;
class="kw">import com.hypixel.hytale.component.ComponentRegistryProxy;
class="kw">import com.hypixel.hytale.component.ComponentType;
class="kw">import com.hypixel.hytale.component.SystemGroup;
class="kw">import com.hypixel.hytale.component.dependency.Dependency;
class="kw">import com.hypixel.hytale.component.dependency.Order;
class="kw">import com.hypixel.hytale.component.dependency.SystemGroupDependency;
class="kw">import com.hypixel.hytale.component.system.ISystem;
class="kw">import com.hypixel.hytale.server.core.entity.knockback.KnockbackSystems;
class="kw">import com.hypixel.hytale.server.core.modules.entity.EntityModule;
class="kw">import com.hypixel.hytale.server.core.modules.entity.damage.commands.DesyncDamageCommand;
class="kw">import com.hypixel.hytale.server.core.modules.entitystats.EntityStatsModule;
class="kw">import com.hypixel.hytale.server.core.modules.entityui.EntityUIModule;
class="kw">import com.hypixel.hytale.server.core.plugin.JavaPlugin;
class="kw">import com.hypixel.hytale.server.core.plugin.JavaPluginInit;
class="kw">import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
class="kw">import java.util.Set;
class="kw">import javax.annotation.Nonnull;

class="kw">public class DamageModule class="kw">extends JavaPlugin {
   class="kw">public class="kw">static class="kw">final PluginManifest MANIFEST = PluginManifest.corePlugin(DamageModule.class)
      .depends(EntityModule.class)
      .depends(EntityStatsModule.class)
      .depends(EntityUIModule.class)
      .build();
   class="kw">private class="kw">static DamageModule instance;
   class="kw">private ComponentType<EntityStore, DeathComponent> deathComponentType;
   class="kw">private ComponentType<EntityStore, DeferredCorpseRemoval> deferredCorpseRemovalComponentType;
   class="kw">private SystemGroup<EntityStore> gatherDamageGroup;
   class="kw">private SystemGroup<EntityStore> filterDamageGroup;
   class="kw">private SystemGroup<EntityStore> inspectDamageGroup;

   class="kw">public class="kw">static DamageModule get() {
      class="kw">return instance;
   }

   class="kw">public DamageModule(@Nonnull JavaPluginInit var1) {
      super(var1);
      instance = this;
   }

   @Override
   class="kw">protected void setup() {
      ComponentRegistryProxy var1 = this.getEntityStoreRegistry();
      this.deathComponentType = var1.registerComponent(DeathComponent.class, "Death", DeathComponent.CODEC);
      this.deferredCorpseRemovalComponentType = var1.registerComponent(DeferredCorpseRemoval.class, () -> {
         throw new UnsupportedOperationException("not supported");
      });
      this.gatherDamageGroup = var1.registerSystemGroup();
      this.filterDamageGroup = var1.registerSystemGroup();
      this.inspectDamageGroup = var1.registerSystemGroup();
      var1.registerSystem(new DamageModule.OrderGatherFilter());
      var1.registerSystem(new DamageSystems.ApplyDamage());
      var1.registerSystem(new DamageSystems.BreathingSystem());
      var1.registerSystem(new DamageSystems.CanBreathe());
      var1.registerSystem(new DamageSystems.OutOfWorldDamage());
      var1.registerSystem(new DamageSystems.FallDamagePlayers());
      var1.registerSystem(new DamageSystems.FallDamageNPCs());
      var1.registerSystem(new DamageSystems.FilterPlayerWorldConfig());
      var1.registerSystem(new DamageSystems.FilterNPCWorldConfig());
      var1.registerSystem(new DamageSystems.FilterUnkillable());
      var1.registerSystem(new DamageSystems.PlayerDamageFilterSystem());
      var1.registerSystem(new DamageSystems.WieldingDamageReduction());
      var1.registerSystem(new DamageSystems.WieldingKnockbackReduction());
      var1.registerSystem(new DamageSystems.ArmorKnockbackReduction());
      var1.registerSystem(new DamageSystems.ArmorDamageReduction());
      var1.registerSystem(new DamageSystems.HackKnockbackValues());
      var1.registerSystem(new DamageSystems.RecordLastCombat());
      var1.registerSystem(new DamageSystems.ApplyParticles());
      var1.registerSystem(new DamageSystems.ApplySoundEffects());
      var1.registerSystem(new DamageSystems.HitAnimation());
      var1.registerSystem(new DamageSystems.TrackLastDamage());
      var1.registerSystem(new DamageSystems.DamageArmor());
      var1.registerSystem(new DamageSystems.DamageStamina());
      var1.registerSystem(new DamageSystems.DamageAttackerTool());
      var1.registerSystem(new DamageSystems.PlayerHitIndicators());
      var1.registerSystem(new DamageSystems.ReticleEvents());
      var1.registerSystem(new DamageSystems.EntityUIEvents());
      var1.registerSystem(new KnockbackSystems.ApplyKnockback());
      var1.registerSystem(new KnockbackSystems.ApplyPlayerKnockback());
      var1.registerSystem(new DeathSystems.ClearHealth());
      var1.registerSystem(new DeathSystems.ClearInteractions());
      var1.registerSystem(new DeathSystems.ClearEntityEffects());
      var1.registerSystem(new DeathSystems.PlayerKilledPlayer());
      var1.registerSystem(new DeathSystems.DropPlayerDeathItems());
      var1.registerSystem(new DeathSystems.PlayerDropItemsConfig());
      var1.registerSystem(new DeathSystems.RunDeathInteractions());
      var1.registerSystem(new DeathSystems.KillFeed());
      var1.registerSystem(new DeathSystems.PlayerDeathScreen());
      var1.registerSystem(new DeathSystems.PlayerDeathMarker());
      var1.registerSystem(new DeathSystems.StopVoiceOnDeath());
      var1.registerSystem(new DeathSystems.TickCorpseRemoval());
      var1.registerSystem(new DeathSystems.CorpseRemoval());
      var1.registerSystem(new DeathSystems.DeathAnimation());
      var1.registerSystem(new DeathSystems.SpawnedDeathAnimation());
      var1.registerSystem(new RespawnSystems.ResetStatsRespawnSystem());
      var1.registerSystem(new RespawnSystems.ResetPlayerRespawnSystem());
      var1.registerSystem(new RespawnSystems.ClearEntityEffectsRespawnSystem());
      var1.registerSystem(new RespawnSystems.ClearInteractionsRespawnSystem());
      var1.registerSystem(new RespawnSystems.CheckBrokenItemsRespawnSystem());
      var1.registerSystem(new RespawnSystems.ClearRespawnUI());
      var1.registerSystem(new RespawnSystems.ReenableVoiceOnRespawn());
      var1.registerSystem(new DamageCalculatorSystems.SequenceModifier());
      this.getCommandRegistry().registerCommand(new DesyncDamageCommand());
   }

   class="kw">public ComponentType<EntityStore, DeathComponent> getDeathComponentType() {
      class="kw">return this.deathComponentType;
   }

   class="kw">public ComponentType<EntityStore, DeferredCorpseRemoval> getDeferredCorpseRemovalComponentType() {
      class="kw">return this.deferredCorpseRemovalComponentType;
   }

   class="kw">public SystemGroup<EntityStore> getGatherDamageGroup() {
      class="kw">return this.gatherDamageGroup;
   }

   class="kw">public SystemGroup<EntityStore> getFilterDamageGroup() {
      class="kw">return this.filterDamageGroup;
   }

   class="kw">public SystemGroup<EntityStore> getInspectDamageGroup() {
      class="kw">return this.inspectDamageGroup;
   }

   @Deprecated
   class="kw">public class="kw">static class OrderGatherFilter class="kw">implements ISystem<EntityStore> {
      class="kw">private class="kw">final Set<Dependency<EntityStore>> dependencies = Set.of(
         new SystemGroupDependency<>(Order.AFTER, DamageModule.get().getGatherDamageGroup()),
         new SystemGroupDependency<>(Order.BEFORE, DamageModule.get().getFilterDamageGroup())
      );

      class="kw">public OrderGatherFilter() {
      }

      @Nonnull
      @Override
      class="kw">public Set<Dependency<EntityStore>> getDependencies() {
         class="kw">return this.dependencies;
      }
   }
}