Skip to content

Commit

Permalink
docs: format javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
smartcmd committed Sep 18, 2024
1 parent 76f12e0 commit 4bad8f7
Show file tree
Hide file tree
Showing 19 changed files with 1 addition and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@


/**
* Terra Project 2024/6/15
*
* @author daoge_cmd
*/
public class AllayPlatform extends AbstractPlatform {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@


/**
* Terra Project 2024/6/16
*
* @author daoge_cmd
*/
public class JeBlockState {
protected final String identifier;
protected final TreeMap<String, String> properties;
protected int hash = Integer.MAX_VALUE; // 懒加载
protected int hash = Integer.MAX_VALUE;

public static JeBlockState fromString(String data) {
return new JeBlockState(data);
Expand Down Expand Up @@ -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;
Expand Down
33 changes: 0 additions & 33 deletions platforms/allay/src/main/java/org/allaymc/terra/allay/Mapping.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@


/**
* Terra Project 2024/6/16
*
* @author daoge_cmd
*/
@Slf4j
Expand Down Expand Up @@ -124,37 +122,6 @@ private static boolean initJeBlockDefaultProperties() {
return true;
}

// private static BlockState createBeBlockState(Map<String, Object> 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<String, Object> state = (Map<String, Object>) 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<String, Object> data) {
var builder = NbtMap.builder();
builder.putString("name", "minecraft:" + data.get("bedrock_identifier"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import com.dfsek.terra.api.event.events.platform.PlatformInitializationEvent;

/**
* Terra Project 2024/6/15
*
* @author daoge_cmd
*/
@Slf4j
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4bad8f7

Please sign in to comment.