LegacyModule class
Пакет: com.hypixel.hytale.server.core.modules
Файл: com/hypixel/hytale/server/core/modules/LegacyModule.java
extends: JavaPlugin
Поля (2)
| Модификаторы | Тип | Имя |
|---|---|---|
final |
PluginManifest |
MANIFEST |
|
|
instance |
Методы (15)
| Модификаторы | Возврат | Сигнатура |
|---|---|---|
abstract |
throw new |
UnsupportedOperationExceptionthrow new UnsupportedOperationException("BlockPositionProvider cannot be constructed") |
static |
LegacyModule |
getLegacyModule get() |
public |
ComponentType<ChunkStore, BlockChunk> |
getBlockChunkComponentTypeComponentType<ChunkStore, BlockChunk> getBlockChunkComponentType() |
public |
ComponentType<ChunkStore, BlockComponentChunk> |
getBlockComponentChunkComponentTypeComponentType<ChunkStore, BlockComponentChunk> getBlockComponentChunkComponentType() |
public |
ComponentType<ChunkStore, BlockComponentSection> |
getBlockComponentSectionComponentTypeComponentType<ChunkStore, BlockComponentSection> getBlockComponentSectionComponentType() |
public |
ComponentType<ChunkStore, BlockPositionProvider> |
getBlockPositionProviderComponentTypeComponentType<ChunkStore, BlockPositionProvider> getBlockPositionProviderComponentType() |
public |
ComponentType<ChunkStore, BlockSection> |
getBlockSectionComponentTypeComponentType<ChunkStore, BlockSection> getBlockSectionComponentType() |
public |
ComponentType<ChunkStore, ChunkColumn> |
getChunkColumnComponentTypeComponentType<ChunkStore, ChunkColumn> getChunkColumnComponentType() |
public |
ComponentType<ChunkStore, ChunkSection> |
getChunkSectionComponentTypeComponentType<ChunkStore, ChunkSection> getChunkSectionComponentType() |
public |
ComponentType<ChunkStore, EntityChunk> |
getEntityChunkComponentTypeComponentType<ChunkStore, EntityChunk> getEntityChunkComponentType() |
public |
ComponentType<ChunkStore, EntitySection> |
getEntitySectionComponentTypeComponentType<ChunkStore, EntitySection> getEntitySectionComponentType() |
public |
ComponentType<ChunkStore, EnvironmentChunk> |
getEnvironmentChunkComponentTypeComponentType<ChunkStore, EnvironmentChunk> getEnvironmentChunkComponentType() |
public |
ComponentType<ChunkStore, FluidSection> |
getFluidSectionComponentTypeComponentType<ChunkStore, FluidSection> getFluidSectionComponentType() |
public |
ComponentType<ChunkStore, WorldChunk> |
getWorldChunkComponentTypeComponentType<ChunkStore, WorldChunk> getWorldChunkComponentType() |
abstract |
|
super super(var1) |
Исходный код
Показать/скрыть
class="kw">package com.hypixel.hytale.server.core.modules;
class="kw">import com.hypixel.hytale.assetstore.event.LoadedAssetsEvent;
class="kw">import com.hypixel.hytale.common.plugin.PluginManifest;
class="kw">import com.hypixel.hytale.component.ComponentType;
class="kw">import com.hypixel.hytale.server.core.asset.type.gameplay.GameplayConfig;
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.chunk.BlockChunk;
class="kw">import com.hypixel.hytale.server.core.universe.world.chunk.BlockComponentChunk;
class="kw">import com.hypixel.hytale.server.core.universe.world.chunk.ChunkColumn;
class="kw">import com.hypixel.hytale.server.core.universe.world.chunk.EntityChunk;
class="kw">import com.hypixel.hytale.server.core.universe.world.chunk.WorldChunk;
class="kw">import com.hypixel.hytale.server.core.universe.world.chunk.environment.EnvironmentChunk;
class="kw">import com.hypixel.hytale.server.core.universe.world.chunk.section.BlockComponentSection;
class="kw">import com.hypixel.hytale.server.core.universe.world.chunk.section.BlockSection;
class="kw">import com.hypixel.hytale.server.core.universe.world.chunk.section.ChunkSection;
class="kw">import com.hypixel.hytale.server.core.universe.world.chunk.section.EntitySection;
class="kw">import com.hypixel.hytale.server.core.universe.world.chunk.section.FluidSection;
class="kw">import com.hypixel.hytale.server.core.universe.world.chunk.section.blockpositions.BlockPositionProvider;
class="kw">import com.hypixel.hytale.server.core.universe.world.chunk.systems.ChunkSystems;
class="kw">import com.hypixel.hytale.server.core.universe.world.storage.ChunkStore;
class="kw">import com.hypixel.hytale.server.core.universe.world.storage.component.SectionSavingSystem;
class="kw">import com.hypixel.hytale.server.core.universe.world.worldmap.WorldMapManager;
class="kw">import javax.annotation.Nonnull;
class="kw">public class LegacyModule class="kw">extends JavaPlugin {
class="kw">public class="kw">static class="kw">final PluginManifest MANIFEST = PluginManifest.corePlugin(LegacyModule.class).build();
class="kw">private class="kw">static LegacyModule instance;
class="kw">private ComponentType<ChunkStore, WorldChunk> worldChunkComponentType;
class="kw">private ComponentType<ChunkStore, BlockChunk> blockChunkComponentType;
class="kw">private ComponentType<ChunkStore, EntityChunk> entityChunkComponentType;
class="kw">private ComponentType<ChunkStore, BlockComponentChunk> blockComponentChunkComponentType;
class="kw">private ComponentType<ChunkStore, EnvironmentChunk> environmentChunkComponentType;
class="kw">private ComponentType<ChunkStore, ChunkColumn> chunkColumnComponentType;
class="kw">private ComponentType<ChunkStore, ChunkSection> chunkSectionComponentType;
class="kw">private ComponentType<ChunkStore, BlockSection> blockSectionComponentType;
class="kw">private ComponentType<ChunkStore, FluidSection> fluidSectionComponentType;
class="kw">private ComponentType<ChunkStore, BlockPositionProvider> blockPositionProviderComponentType;
class="kw">private ComponentType<ChunkStore, EntitySection> entitySectionComponentType;
class="kw">private ComponentType<ChunkStore, BlockComponentSection> blockComponentSectionComponentType;
class="kw">public class="kw">static LegacyModule get() {
class="kw">return instance;
}
class="kw">public LegacyModule(@Nonnull JavaPluginInit var1) {
super(var1);
instance = this;
}
@Override
class="kw">protected void setup() {
this.worldChunkComponentType = this.getChunkStoreRegistry().registerComponent(WorldChunk.class, "WorldChunk", WorldChunk.CODEC);
this.blockChunkComponentType = this.getChunkStoreRegistry().registerComponent(BlockChunk.class, "BlockChunk", BlockChunk.CODEC);
this.entityChunkComponentType = this.getChunkStoreRegistry().registerComponent(EntityChunk.class, "EntityChunk", EntityChunk.CODEC);
this.blockComponentChunkComponentType = this.getChunkStoreRegistry()
.registerComponent(BlockComponentChunk.class, "BlockComponentChunk", BlockComponentChunk.CODEC);
this.environmentChunkComponentType = this.getChunkStoreRegistry().registerComponent(EnvironmentChunk.class, "EnvironmentChunk", EnvironmentChunk.CODEC);
this.chunkColumnComponentType = this.getChunkStoreRegistry().registerComponent(ChunkColumn.class, "ChunkColumn", ChunkColumn.CODEC);
this.chunkSectionComponentType = this.getChunkStoreRegistry().registerComponent(ChunkSection.class, "ChunkSection", ChunkSection.CODEC);
this.blockSectionComponentType = this.getChunkStoreRegistry().registerComponent(BlockSection.class, "Block", BlockSection.CODEC);
this.fluidSectionComponentType = this.getChunkStoreRegistry().registerComponent(FluidSection.class, "Fluid", FluidSection.CODEC);
this.blockPositionProviderComponentType = this.getChunkStoreRegistry().registerComponent(BlockPositionProvider.class, () -> {
throw new UnsupportedOperationException("BlockPositionProvider cannot be constructed");
});
this.entitySectionComponentType = this.getChunkStoreRegistry().registerComponent(EntitySection.class, "Entity", EntitySection.CODEC);
this.blockComponentSectionComponentType = this.getChunkStoreRegistry()
.registerComponent(BlockComponentSection.class, "BlockComponent", BlockComponentSection.CODEC);
this.getChunkStoreRegistry().registerSystem(new ChunkSystems.OnChunkLoad());
this.getChunkStoreRegistry().registerSystem(new ChunkSystems.OnNonTicking());
this.getChunkStoreRegistry().registerSystem(new ChunkSystems.EnsureSection());
this.getChunkStoreRegistry().registerSystem(new ChunkSystems.LoadBlockSection());
this.getChunkStoreRegistry().registerSystem(new ChunkSystems.ReplicateChanges());
this.getChunkStoreRegistry().registerSystem(new ChunkSystems.MigrateEntityChunk());
this.getChunkStoreRegistry().registerSystem(new ChunkSystems.MigrateBlockComponentChunk());
this.getChunkStoreRegistry().registerSystem(new BlockChunk.LoadBlockChunkPacketSystem(this.blockChunkComponentType));
this.getChunkStoreRegistry().registerSystem(new BlockSection.LoadBlockSectionPacketSystem(this.blockSectionComponentType));
this.getChunkStoreRegistry().registerSystem(new EntitySection.EntitySectionLoadingSystem());
this.getChunkStoreRegistry().registerSystem(new SectionSavingSystem());
this.getChunkStoreRegistry().registerSystem(new BlockComponentSection.BlockComponentSectionLoadingSystem());
this.getChunkStoreRegistry().registerSystem(new BlockComponentSection.LoadBlockComponentPacketSystem(this.blockComponentSectionComponentType));
this.getChunkStoreRegistry().registerSystem(new BlockComponentSection.UnloadBlockComponentPacketSystem(this.blockComponentSectionComponentType));
this.getEventRegistry().register(LoadedAssetsEvent.class, GameplayConfig.class, var0 -> WorldMapManager.sendSettingsToAllWorlds());
}
class="kw">public ComponentType<ChunkStore, WorldChunk> getWorldChunkComponentType() {
class="kw">return this.worldChunkComponentType;
}
class="kw">public ComponentType<ChunkStore, BlockChunk> getBlockChunkComponentType() {
class="kw">return this.blockChunkComponentType;
}
class="kw">public ComponentType<ChunkStore, EntityChunk> getEntityChunkComponentType() {
class="kw">return this.entityChunkComponentType;
}
class="kw">public ComponentType<ChunkStore, BlockComponentChunk> getBlockComponentChunkComponentType() {
class="kw">return this.blockComponentChunkComponentType;
}
class="kw">public ComponentType<ChunkStore, EnvironmentChunk> getEnvironmentChunkComponentType() {
class="kw">return this.environmentChunkComponentType;
}
class="kw">public ComponentType<ChunkStore, ChunkColumn> getChunkColumnComponentType() {
class="kw">return this.chunkColumnComponentType;
}
class="kw">public ComponentType<ChunkStore, ChunkSection> getChunkSectionComponentType() {
class="kw">return this.chunkSectionComponentType;
}
class="kw">public ComponentType<ChunkStore, BlockSection> getBlockSectionComponentType() {
class="kw">return this.blockSectionComponentType;
}
class="kw">public ComponentType<ChunkStore, EntitySection> getEntitySectionComponentType() {
class="kw">return this.entitySectionComponentType;
}
class="kw">public ComponentType<ChunkStore, FluidSection> getFluidSectionComponentType() {
class="kw">return this.fluidSectionComponentType;
}
class="kw">public ComponentType<ChunkStore, BlockComponentSection> getBlockComponentSectionComponentType() {
class="kw">return this.blockComponentSectionComponentType;
}
class="kw">public ComponentType<ChunkStore, BlockPositionProvider> getBlockPositionProviderComponentType() {
class="kw">return this.blockPositionProviderComponentType;
}
}