diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/AllayPlatform.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/AllayPlatform.java index 52cf7e97b4..c69c9488d6 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/AllayPlatform.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/AllayPlatform.java @@ -20,8 +20,6 @@ /** - * Terra Project 2024/6/15 - * * @author daoge_cmd */ public class AllayPlatform extends AbstractPlatform { diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/JeBlockState.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/JeBlockState.java index f417e3d9c5..fde2c04690 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/JeBlockState.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/JeBlockState.java @@ -6,14 +6,12 @@ /** - * Terra Project 2024/6/16 - * * @author daoge_cmd */ public class JeBlockState { protected final String identifier; protected final TreeMap properties; - protected int hash = Integer.MAX_VALUE; // 懒加载 + protected int hash = Integer.MAX_VALUE; public static JeBlockState fromString(String data) { return new JeBlockState(data); @@ -63,7 +61,6 @@ public String toString(boolean includeProperties) { properties.forEach((k, v) -> builder.append(k).append("=").append(v).append(";")); var str = builder.toString(); if (hash == Integer.MAX_VALUE) { - // 顺便算一下hash hash = HashUtils.fnv1a_32(str.getBytes()); } return str; diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/Mapping.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/Mapping.java index fc22750ea5..56655096fd 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/Mapping.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/Mapping.java @@ -21,8 +21,6 @@ /** - * Terra Project 2024/6/16 - * * @author daoge_cmd */ @Slf4j @@ -124,37 +122,6 @@ private static boolean initJeBlockDefaultProperties() { return true; } -// private static BlockState createBeBlockState(Map data) { -// var identifier = new Identifier((String) data.get("bedrock_identifier")); -// // 方块类型 -// var blockType = Registries.BLOCKS.get(identifier); -// if (blockType == null) { -// log.error("Cannot find bedrock block type: {}", identifier); -// return BE_AIR_STATE; -// } -// // 方块属性 -// Map state = (Map) data.get("state"); -// if (state == null) return blockType.getDefaultState(); -// var propertyValues = new BlockPropertyValue[state.size()]; -// int index = -1; -// for(var entry : state.entrySet()) { -// index++; -// var propertyName = entry.getKey(); -// var propertyType = blockType.getProperties().get(propertyName); -// if (propertyType == null) { -// log.warn("Unknown property type: {}", propertyName); -// return BlockTypes.AIR.getDefaultState(); -// } -// try { -// propertyValues[index] = propertyType.tryCreateValue(entry.getValue()); -// } catch (IllegalArgumentException e) { -// log.warn("Failed to create property value for {}: {}", propertyName, entry.getValue()); -// return BE_AIR_STATE; -// } -// } -// return blockType.ofState(propertyValues); -// } - private static BlockState createBeBlockState(Map data) { var builder = NbtMap.builder(); builder.putString("name", "minecraft:" + data.get("bedrock_identifier")); diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/TerraAllayPlugin.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/TerraAllayPlugin.java index aac1428a8b..960bccedea 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/TerraAllayPlugin.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/TerraAllayPlugin.java @@ -8,8 +8,6 @@ import com.dfsek.terra.api.event.events.platform.PlatformInitializationEvent; /** - * Terra Project 2024/6/15 - * * @author daoge_cmd */ @Slf4j diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayBiome.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayBiome.java index 71673618ab..46cf926959 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayBiome.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayBiome.java @@ -4,10 +4,7 @@ import com.dfsek.terra.api.world.biome.PlatformBiome; - /** - * Terra Project 2024/6/16 - * * @author daoge_cmd */ public record AllayBiome(BiomeType allayBiome) implements PlatformBiome { diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayBlockState.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayBlockState.java index 7c887523e4..25a8c2b778 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayBlockState.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayBlockState.java @@ -9,10 +9,7 @@ import java.util.Objects; - /** - * Terra Project 2024/6/16 - * * @author daoge_cmd */ public final class AllayBlockState implements com.dfsek.terra.api.block.state.BlockState { diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayBlockType.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayBlockType.java index 802a0fcbdd..2ed72858e2 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayBlockType.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayBlockType.java @@ -6,10 +6,7 @@ import com.dfsek.terra.api.block.state.BlockState; - /** - * Terra Project 2024/6/16 - * * @author daoge_cmd */ public record AllayBlockType(BlockType allayBlockType) implements com.dfsek.terra.api.block.BlockType { diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayChunk.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayChunk.java index d11b199192..5e3a9a0f40 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayChunk.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayChunk.java @@ -9,10 +9,7 @@ import com.dfsek.terra.api.block.state.BlockState; import com.dfsek.terra.api.world.ServerWorld; - /** - * Terra Project 2024/6/16 - * * @author daoge_cmd */ public record AllayChunk(ServerWorld world, Chunk allayChunk) implements com.dfsek.terra.api.world.chunk.Chunk { diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayEnchantment.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayEnchantment.java index 4dea9cf319..4ba4a0220a 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayEnchantment.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayEnchantment.java @@ -6,10 +6,7 @@ import com.dfsek.terra.api.inventory.ItemStack; import com.dfsek.terra.api.inventory.item.Enchantment; - /** - * Terra Project 2024/6/16 - * * @author daoge_cmd */ public record AllayEnchantment(EnchantmentType allayEnchantment) implements Enchantment { diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayFakeEntity.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayFakeEntity.java index 05140b34e6..c4f65907a0 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayFakeEntity.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayFakeEntity.java @@ -4,10 +4,7 @@ import com.dfsek.terra.api.util.vector.Vector3; import com.dfsek.terra.api.world.ServerWorld; - /** - * Terra Project 2024/6/16 - * * @author daoge_cmd */ public final class AllayFakeEntity implements Entity { diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayItemMeta.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayItemMeta.java index 07620bd605..9b1775e054 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayItemMeta.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayItemMeta.java @@ -8,12 +8,7 @@ import com.dfsek.terra.api.inventory.item.Enchantment; import com.dfsek.terra.api.inventory.item.ItemMeta; - /** - * Terra Project 2024/6/16 - * - * 物品元数据。在allay中物品元数据没有单独的类,故直接使用ItemStack代替 - * * @author daoge_cmd */ public record AllayItemMeta(ItemStack allayItemStack) implements ItemMeta { diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayItemStack.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayItemStack.java index cbddcd96b2..2968a9e147 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayItemStack.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayItemStack.java @@ -5,10 +5,7 @@ import com.dfsek.terra.api.inventory.Item; import com.dfsek.terra.api.inventory.item.ItemMeta; - /** - * Terra Project 2024/6/16 - * * @author daoge_cmd */ public record AllayItemStack(ItemStack allayItemStack) implements com.dfsek.terra.api.inventory.ItemStack{ diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayItemType.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayItemType.java index 0f379f8eae..c01c4bd55c 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayItemType.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayItemType.java @@ -4,10 +4,7 @@ import com.dfsek.terra.api.inventory.Item; - /** - * Terra Project 2024/6/16 - * * @author daoge_cmd */ public final class AllayItemType implements Item { diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayProtoChunk.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayProtoChunk.java index 88bb916899..61b2818f7b 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayProtoChunk.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayProtoChunk.java @@ -9,10 +9,7 @@ import com.dfsek.terra.api.block.state.BlockState; import com.dfsek.terra.api.world.chunk.generation.ProtoChunk; - /** - * Terra Project 2024/6/16 - * * @author daoge_cmd */ public record AllayProtoChunk(UnsafeChunk allayChunk) implements ProtoChunk { diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayProtoWorld.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayProtoWorld.java index f41ae5592e..5a71b590d4 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayProtoWorld.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayProtoWorld.java @@ -18,8 +18,6 @@ import com.dfsek.terra.api.world.chunk.generation.ProtoWorld; /** - * Terra Project 2024/6/16 - * * @author daoge_cmd */ public record AllayProtoWorld(AllayServerWorld allayServerWorld, OtherChunkAccessibleContext context) implements ProtoWorld { diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayServerWorld.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayServerWorld.java index c5e5bc5a6d..59382a4d27 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayServerWorld.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/delegate/AllayServerWorld.java @@ -18,10 +18,7 @@ import com.dfsek.terra.api.world.chunk.Chunk; import com.dfsek.terra.api.world.chunk.generation.ChunkGenerator; - /** - * Terra Project 2024/6/16 - * * @author daoge_cmd */ public record AllayServerWorld(AllayGeneratorWrapper allayGeneratorWrapper, Dimension allayDimension) implements ServerWorld { diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/generator/AllayGeneratorWrapper.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/generator/AllayGeneratorWrapper.java index c7d4ae57dc..0653ecb75c 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/generator/AllayGeneratorWrapper.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/generator/AllayGeneratorWrapper.java @@ -23,10 +23,7 @@ import com.dfsek.terra.api.world.chunk.generation.util.GeneratorWrapper; import com.dfsek.terra.api.world.info.WorldProperties; - /** - * Terra Project 2024/6/16 - * * @author daoge_cmd */ @Slf4j diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/handle/AllayItemHandle.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/handle/AllayItemHandle.java index 9101b1bc4f..a08c75e1cc 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/handle/AllayItemHandle.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/handle/AllayItemHandle.java @@ -13,10 +13,7 @@ import com.dfsek.terra.api.inventory.Item; import com.dfsek.terra.api.inventory.item.Enchantment; - /** - * Terra Project 2024/6/16 - * * @author daoge_cmd */ public class AllayItemHandle implements ItemHandle { diff --git a/platforms/allay/src/main/java/org/allaymc/terra/allay/handle/AllayWorldHandle.java b/platforms/allay/src/main/java/org/allaymc/terra/allay/handle/AllayWorldHandle.java index 6f070e0c11..eea890f5cb 100644 --- a/platforms/allay/src/main/java/org/allaymc/terra/allay/handle/AllayWorldHandle.java +++ b/platforms/allay/src/main/java/org/allaymc/terra/allay/handle/AllayWorldHandle.java @@ -9,10 +9,7 @@ import com.dfsek.terra.api.entity.EntityType; import com.dfsek.terra.api.handle.WorldHandle; - /** - * Terra Project 2024/6/16 - * * @author daoge_cmd */ public class AllayWorldHandle implements WorldHandle {