diff --git a/src/main/java/dev/hilligans/ourcraft/ClientMain.java b/src/main/java/dev/hilligans/ourcraft/ClientMain.java index 0722516..4b3f983 100644 --- a/src/main/java/dev/hilligans/ourcraft/ClientMain.java +++ b/src/main/java/dev/hilligans/ourcraft/ClientMain.java @@ -7,6 +7,7 @@ import dev.hilligans.ourcraft.util.ArgumentContainer; import dev.hilligans.ourcraft.util.Side; import dev.hilligans.ourcraft.util.registry.Registry; +import org.joml.Intersectionf; import java.io.IOException; import java.util.concurrent.Semaphore; @@ -22,7 +23,14 @@ public class ClientMain { public static long startTime; public static void main(String[] args) throws IOException { - startTime = System.currentTimeMillis(); + for(int y = 0; y < 2; y++) { + startTime = System.currentTimeMillis(); + for (int x = 0; x < 1000000; x++) { + Intersectionf.testObOb(x, x, x, 1, 1, x, 1, 1, y, 1, 1, 2 * x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + } + System.out.println("Time to 1M:" + (System.currentTimeMillis() - startTime)); + } + argumentContainer = new ArgumentContainer(args); System.out.println(STR."Starting client with PID \{ProcessHandle.current().pid()}"); diff --git a/src/main/java/dev/hilligans/ourcraft/GameInstance.java b/src/main/java/dev/hilligans/ourcraft/GameInstance.java index 48bbb11..e5cde91 100644 --- a/src/main/java/dev/hilligans/ourcraft/GameInstance.java +++ b/src/main/java/dev/hilligans/ourcraft/GameInstance.java @@ -20,7 +20,7 @@ import dev.hilligans.ourcraft.command.CommandHandler; import dev.hilligans.ourcraft.container.Container; import dev.hilligans.ourcraft.data.descriptors.Tag; -import dev.hilligans.ourcraft.entity.Entity; +import dev.hilligans.ourcraft.entity.EntityType; import dev.hilligans.ourcraft.item.data.ToolLevel; import dev.hilligans.ourcraft.item.data.ToolLevelList; import dev.hilligans.ourcraft.item.Item; @@ -147,6 +147,7 @@ public void cleanupGraphics(IGraphicsEngine graphicsEngine, GraphicsConte public Registry TEXTURES; public Registry SHADERS; public Registry> LAYOUT_ENGINES; + public Registry ENTITY_TYPES; public ArrayList BLOCK_STATES; @@ -177,6 +178,7 @@ public void copyRegistries() { SHADERS = (Registry) REGISTRIES.getExcept("ourcraft:shader"); LAYOUT_ENGINES = (Registry>) REGISTRIES.getExcept("ourcraft:layout_engine"); SOUND_CATEGORIES = (Registry) REGISTRIES.getExcept("ourcraft:sound_category"); + ENTITY_TYPES = (Registry) REGISTRIES.getExcept("ourcraft:entity_type"); } public void finishBuild() { diff --git a/src/main/java/dev/hilligans/ourcraft/Ourcraft.java b/src/main/java/dev/hilligans/ourcraft/Ourcraft.java index ec4afcb..6f1701c 100644 --- a/src/main/java/dev/hilligans/ourcraft/Ourcraft.java +++ b/src/main/java/dev/hilligans/ourcraft/Ourcraft.java @@ -31,6 +31,8 @@ import dev.hilligans.ourcraft.data.descriptors.Tag; import dev.hilligans.ourcraft.data.other.BlockProperties; import dev.hilligans.ourcraft.data.primitives.Tuple; +import dev.hilligans.ourcraft.entity.Entities; +import dev.hilligans.ourcraft.entity.EntityType; import dev.hilligans.ourcraft.item.Items; import dev.hilligans.ourcraft.item.data.ToolLevel; import dev.hilligans.ourcraft.mod.handler.ModClass; @@ -135,7 +137,8 @@ public void registerRegistries(RegistryView view) { new Tuple(Texture.class, "texture"), new Tuple(ShaderSource.class, "shader"), new Tuple(ILayoutEngine.class, "layout_engine"), - new Tuple(SoundCategory.class, "sound_category") + new Tuple(SoundCategory.class, "sound_category"), + new Tuple(EntityType.class, "entity_type") }; for(Tuple, String> element : elements) { @@ -390,6 +393,9 @@ public void registerContent(ModContainer modContent) { modContent.registerBlock(Blocks.WATER); modContent.registerBiome(Biomes.PLAINS,Biomes.SANDY_HILLS,Biomes.DESERT,Biomes.FOREST); + modContent.registerEntityType(Entities.PLAYER); + + for(int x = 0; x < 30000; x++) { //modContent.registerBlock(new Block("x" + x, new BlockProperties())); } diff --git a/src/main/java/dev/hilligans/ourcraft/data/other/IBoundingBox.java b/src/main/java/dev/hilligans/ourcraft/data/other/IBoundingBox.java index eaedaee..6e84c3f 100644 --- a/src/main/java/dev/hilligans/ourcraft/data/other/IBoundingBox.java +++ b/src/main/java/dev/hilligans/ourcraft/data/other/IBoundingBox.java @@ -1,5 +1,6 @@ package dev.hilligans.ourcraft.data.other; +import org.joml.Intersectionf; import org.joml.Vector2f; public interface IBoundingBox { @@ -19,5 +20,42 @@ default boolean intersects(IBoundingBox boundingBox) { (maxZ() > boundingBox.minZ() && minZ() < boundingBox.maxZ()); } - float intersectsRay(float x, float y, float z, float dirX, float dirY, float dirZ, Vector2f vector2f); + default float intersectsRay(float x, float y, float z, float dirX, float dirY, float dirZ, Vector2f vector2f) { + if (!Intersectionf.intersectRayAab(x, y, z, dirX, dirY, dirZ, minX(), minY(), minZ(), maxX(), maxY(), maxZ(), vector2f)) { + return -1; + } + return vector2f.x; + } + + public static final IBoundingBox EMPTY_BOX = new IBoundingBox() { + @Override + public float minX() { + return 0; + } + + @Override + public float minY() { + return 0; + } + + @Override + public float minZ() { + return 0; + } + + @Override + public float maxX() { + return 0; + } + + @Override + public float maxY() { + return 0; + } + + @Override + public float maxZ() { + return 0; + } + }; } diff --git a/src/main/java/dev/hilligans/ourcraft/entity/Entities.java b/src/main/java/dev/hilligans/ourcraft/entity/Entities.java new file mode 100644 index 0000000..b6da193 --- /dev/null +++ b/src/main/java/dev/hilligans/ourcraft/entity/Entities.java @@ -0,0 +1,7 @@ +package dev.hilligans.ourcraft.entity; + +public class Entities { + + public static final EntityType PLAYER = new EntityType("player", "ourcraft"); + +} diff --git a/src/main/java/dev/hilligans/ourcraft/entity/Entity.java b/src/main/java/dev/hilligans/ourcraft/entity/Entity.java index 7fc3296..0710518 100644 --- a/src/main/java/dev/hilligans/ourcraft/entity/Entity.java +++ b/src/main/java/dev/hilligans/ourcraft/entity/Entity.java @@ -128,7 +128,7 @@ public void writeData(IPacketByteArray packetData) { packetData.writeInt(id); } - public abstract void render(MatrixStack matrixStack); + public void render(MatrixStack matrixStack) {} public void tick() {} diff --git a/src/main/java/dev/hilligans/ourcraft/entity/EntityType.java b/src/main/java/dev/hilligans/ourcraft/entity/EntityType.java new file mode 100644 index 0000000..20b6c19 --- /dev/null +++ b/src/main/java/dev/hilligans/ourcraft/entity/EntityType.java @@ -0,0 +1,29 @@ +package dev.hilligans.ourcraft.entity; + +import dev.hilligans.ourcraft.util.registry.IRegistryElement; + +public class EntityType implements IRegistryElement { + + public String owner; + public String name; + + public EntityType(String name, String modID) { + this.name = name; + this.owner = modID; + } + + @Override + public String getResourceName() { + return name; + } + + @Override + public String getResourceOwner() { + return owner; + } + + @Override + public String getResourceType() { + return "entity_type"; + } +} diff --git a/src/main/java/dev/hilligans/ourcraft/entity/IEntity.java b/src/main/java/dev/hilligans/ourcraft/entity/IEntity.java index ddd40ed..3b79643 100644 --- a/src/main/java/dev/hilligans/ourcraft/entity/IEntity.java +++ b/src/main/java/dev/hilligans/ourcraft/entity/IEntity.java @@ -1,5 +1,6 @@ package dev.hilligans.ourcraft.entity; +import dev.hilligans.ourcraft.data.other.IBoundingBox; import dev.hilligans.ourcraft.world.newworldsystem.IWorld; public interface IEntity { @@ -12,8 +13,9 @@ public interface IEntity { long getID(); void setID(long id); + EntityType getEntityType(); - + IBoundingBox getEntityBoundingBox(); float getPitch(); float getYaw(); @@ -29,4 +31,6 @@ public interface IEntity { double getX(); double getY(); double getZ(); + + void tick(); } diff --git a/src/main/java/dev/hilligans/ourcraft/entity/ILivingEntity.java b/src/main/java/dev/hilligans/ourcraft/entity/ILivingEntity.java new file mode 100644 index 0000000..bb597c7 --- /dev/null +++ b/src/main/java/dev/hilligans/ourcraft/entity/ILivingEntity.java @@ -0,0 +1,14 @@ +package dev.hilligans.ourcraft.entity; + +public interface ILivingEntity extends IEntity { + + int getHealth(); + + void setHealth(int health); + + void dealDamage(int dmg); + + void heal(int amount); + + boolean alive(); +} diff --git a/src/main/java/dev/hilligans/ourcraft/entity/LivingEntity.java b/src/main/java/dev/hilligans/ourcraft/entity/LivingEntity.java index 7b6ebd3..2ef30cb 100644 --- a/src/main/java/dev/hilligans/ourcraft/entity/LivingEntity.java +++ b/src/main/java/dev/hilligans/ourcraft/entity/LivingEntity.java @@ -1,7 +1,11 @@ package dev.hilligans.ourcraft.entity; +import dev.hilligans.ourcraft.data.other.IInventory; +import dev.hilligans.ourcraft.item.ItemStack; import dev.hilligans.ourcraft.network.IPacketByteArray; +import java.util.List; + public abstract class LivingEntity extends Entity { public int maxHealth; @@ -22,10 +26,12 @@ public LivingEntity(IPacketByteArray packetData) { super(packetData); } + public List getOnDeathLoot() { + return null; + } + public void hitGround(float vel) { float amount = (int)(vel * 10); health -= amount; } - - } diff --git a/src/main/java/dev/hilligans/ourcraft/entity/NewEntity.java b/src/main/java/dev/hilligans/ourcraft/entity/NewEntity.java new file mode 100644 index 0000000..90b6a8d --- /dev/null +++ b/src/main/java/dev/hilligans/ourcraft/entity/NewEntity.java @@ -0,0 +1,120 @@ +package dev.hilligans.ourcraft.entity; + +import dev.hilligans.ourcraft.data.other.IBoundingBox; +import dev.hilligans.ourcraft.world.newworldsystem.IWorld; + +public class NewEntity implements IEntity { + + public IWorld world; + public EntityType entityType; + public long entityID; + + public float pitch, yaw, velX, velY, velZ; + public double x, y, z; + + public IBoundingBox boundingBox = IBoundingBox.EMPTY_BOX; + + public NewEntity(EntityType entityType) { + this.entityType = entityType; + } + + @Override + public IWorld getWorld() { + return this.world; + } + + @Override + public void setWorld(IWorld world) { + this.world = world; + } + + @Override + public void setRot(float pitch, float yaw, float roll) { + this.pitch = pitch; + this.yaw = yaw; + } + + @Override + public long getID() { + return entityID; + } + + @Override + public void setID(long id) { + this.entityID = id; + } + + @Override + public EntityType getEntityType() { + return entityType; + } + + @Override + public IBoundingBox getEntityBoundingBox() { + return boundingBox; + } + + @Override + public float getPitch() { + return pitch; + } + + @Override + public float getYaw() { + return yaw; + } + + @Override + public float getRoll() { + return 0; + } + + @Override + public void setVel(float velX, float velY, float velZ) { + this.velX = velX; + this.velY = velY; + this.velZ = velZ; + } + + @Override + public float getVelX() { + return velX; + } + + @Override + public float getVelY() { + return velY; + } + + @Override + public float getVelZ() { + return velZ; + } + + @Override + public void setPosition(double x, double y, double z) { + this.x = x; + this.y = y; + this.z = z; + } + + @Override + public double getX() { + return x; + } + + @Override + public double getY() { + return y; + } + + @Override + public double getZ() { + return z; + } + + @Override + public void tick() { + + } +} diff --git a/src/main/java/dev/hilligans/ourcraft/entity/NewLivingEntity.java b/src/main/java/dev/hilligans/ourcraft/entity/NewLivingEntity.java new file mode 100644 index 0000000..73c2a22 --- /dev/null +++ b/src/main/java/dev/hilligans/ourcraft/entity/NewLivingEntity.java @@ -0,0 +1,43 @@ +package dev.hilligans.ourcraft.entity; + +public class NewLivingEntity extends NewEntity implements ILivingEntity { + + public int maxHealth; + + public int health; + + public NewLivingEntity(EntityType entityType) { + super(entityType); + } + + @Override + public int getHealth() { + return maxHealth; + } + + @Override + public void setHealth(int health) { + this.health = health; + } + + @Override + public void dealDamage(int dmg) { + health -= dmg; + if(health < 0) { + health = 0; + } + } + + @Override + public void heal(int amount) { + health += amount; + if(health > maxHealth) { + health = maxHealth; + } + } + + @Override + public boolean alive() { + return health > 0; + } +} diff --git a/src/main/java/dev/hilligans/ourcraft/entity/NewPlayerEntity.java b/src/main/java/dev/hilligans/ourcraft/entity/NewPlayerEntity.java new file mode 100644 index 0000000..363ddaf --- /dev/null +++ b/src/main/java/dev/hilligans/ourcraft/entity/NewPlayerEntity.java @@ -0,0 +1,15 @@ +package dev.hilligans.ourcraft.entity; + +public class NewPlayerEntity extends NewLivingEntity implements IPlayerEntity { + + public String name; + + public NewPlayerEntity(EntityType entityType) { + super(entityType); + } + + @Override + public String getName() { + return name; + } +} diff --git a/src/main/java/dev/hilligans/ourcraft/entity/living/entities/PlayerEntity.java b/src/main/java/dev/hilligans/ourcraft/entity/living/entities/PlayerEntity.java index 4f5babc..6fddf92 100644 --- a/src/main/java/dev/hilligans/ourcraft/entity/living/entities/PlayerEntity.java +++ b/src/main/java/dev/hilligans/ourcraft/entity/living/entities/PlayerEntity.java @@ -1,13 +1,9 @@ package dev.hilligans.ourcraft.entity.living.entities; -import dev.hilligans.ourcraft.client.MatrixStack; import dev.hilligans.ourcraft.client.rendering.world.managers.VAOManager; import dev.hilligans.ourcraft.data.other.BoundingBox; import dev.hilligans.ourcraft.data.other.Inventory; -import dev.hilligans.ourcraft.entity.entities.ItemEntity; -import dev.hilligans.ourcraft.entity.Entity; import dev.hilligans.ourcraft.entity.LivingEntity; -import dev.hilligans.ourcraft.item.ItemStack; import dev.hilligans.ourcraft.network.IPacketByteArray; import dev.hilligans.ourcraft.network.packet.server.SUpdateInventory; import dev.hilligans.ourcraft.data.other.server.ServerPlayerData; @@ -15,14 +11,6 @@ import dev.hilligans.ourcraft.util.Settings; import dev.hilligans.ourcraft.util.Vector5f; import org.joml.Vector3d; -import org.joml.Vector3f; -import org.lwjgl.opengl.GL30; - -import java.util.ArrayList; -import java.util.Arrays; - -import static org.lwjgl.opengl.GL11.*; -import static org.lwjgl.opengl.GL20.glUniformMatrix4fv; public class PlayerEntity extends LivingEntity { @@ -36,7 +24,6 @@ public class PlayerEntity extends LivingEntity { public BoundingBox itemPickupBox = new BoundingBox(-1.3f,-1.9f,-1.3f,1.3f,0.0f,1.3f); public ServerPlayerData serverPlayerData; - public PlayerEntity(float x, float y, float z,int id) { super(x,y,z,id,20); type = 0; @@ -90,23 +77,6 @@ public ServerPlayerData getPlayerData() { return serverPlayerData; } - @Override - public void render(MatrixStack matrixStack) { - if(textureId == -1) { - createMesh(); - } - GL30.glBindTexture(GL_TEXTURE_2D,imageId); - GL30.glBindVertexArray(textureId); - - matrixStack.translateMinusOffset((float) getX(), (float) getY(), (float) getZ()); - matrixStack.rotate(-yaw,new Vector3f(0,1,0)); - matrixStack.rotate(pitch,new Vector3f(0,0,1)); - - //TODO fix - //matrixStack.applyTransformation(); - //glDrawElements(GL_TRIANGLES, verticesCount,GL_UNSIGNED_INT,0); - } - @Override public void destroy() { if(id != -1) { @@ -115,31 +85,6 @@ public void destroy() { super.destroy(); } - private void createMesh() { - ArrayList vector5fs = new ArrayList<>(); - ArrayList indices = new ArrayList<>(); - - for(int x = 0; x < 6; x++) { - vector5fs.addAll(Arrays.asList(getVertices(x))); - indices.addAll(Arrays.asList(getIndices(x,x * 4))); - } - - float[] wholeMesh = new float[vector5fs.size() * 5]; - int[] wholeIndices = new int[indices.size()]; - int x = 0; - for(Vector5f vector5f : vector5fs) { - vector5f.addToList(wholeMesh,x * 5); - x++; - } - x = 0; - for(Integer a : indices) { - wholeIndices[x] = a; - x++; - } - verticesCount = wholeMesh.length; - textureId = VAOManager.createVAO(wholeMesh,wholeIndices); - } - private Vector5f[] getVertices(int side) { int id = 4; diff --git a/src/main/java/dev/hilligans/ourcraft/mod/handler/content/ModContainer.java b/src/main/java/dev/hilligans/ourcraft/mod/handler/content/ModContainer.java index d31065a..dadd821 100644 --- a/src/main/java/dev/hilligans/ourcraft/mod/handler/content/ModContainer.java +++ b/src/main/java/dev/hilligans/ourcraft/mod/handler/content/ModContainer.java @@ -14,6 +14,7 @@ import dev.hilligans.ourcraft.client.rendering.newrenderer.IModel; import dev.hilligans.ourcraft.command.CommandHandler; import dev.hilligans.ourcraft.data.descriptors.Tag; +import dev.hilligans.ourcraft.entity.EntityType; import dev.hilligans.ourcraft.item.Item; import dev.hilligans.ourcraft.item.data.ToolLevel; import dev.hilligans.ourcraft.mod.handler.ModClass; @@ -67,6 +68,7 @@ public class ModContainer { public Registry textureRegistry; public Registry shaderSourceRegistry; public Registry> layoutEngineRegistry; + public Registry entityTypeRegistry; public ModContainer(Class clazz, URLClassLoader classLoader) throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { this.modClass = clazz.getConstructor().newInstance(); @@ -110,6 +112,7 @@ public void setGameInstance(GameInstance gameInstance) { textureRegistry = (Registry) registries.getExcept("ourcraft:texture"); shaderSourceRegistry = (Registry) registries.getExcept("ourcraft:shader"); layoutEngineRegistry = (Registry>) registries.getExcept("ourcraft:layout_engine"); + entityTypeRegistry = (Registry) registries.getExcept("ourcraft:entity_type"); } public String getModID() { @@ -331,4 +334,11 @@ public void registerLayoutEngine(ILayoutEngine... layoutEngines) { layoutEngineRegistry.putAll(layoutEngines); //this.layoutEngines.addAll(Arrays.asList(layoutEngines)); } + + public void registerEntityType(EntityType... entityTypes) { + for(EntityType entityType : entityTypes) { + entityType.assignOwner(this); + } + entityTypeRegistry.putAll(entityTypes); + } } diff --git a/src/main/java/dev/hilligans/ourcraft/world/newworldsystem/ClassicChunk.java b/src/main/java/dev/hilligans/ourcraft/world/newworldsystem/ClassicChunk.java index e1605b1..dc791d2 100644 --- a/src/main/java/dev/hilligans/ourcraft/world/newworldsystem/ClassicChunk.java +++ b/src/main/java/dev/hilligans/ourcraft/world/newworldsystem/ClassicChunk.java @@ -36,7 +36,7 @@ public int getWidth() { @Override public int getHeight() { - return height; + return height * 16; } @Override @@ -68,7 +68,7 @@ public IBlockState getBlockState1(long x, long y, long z) { if(subChunk == null) { return Blocks.AIR.getDefaultState(); } - return subChunk.getBlockState(world, (int) (x % 15), (int) (y % 15), (int) (z % 15)); + return subChunk.getBlockState(world, (int) (x & 15), (int) (y & 15), (int) (z & 15)); } @Override @@ -80,7 +80,7 @@ public void setBlockState(long x, long y, long z, IBlockState blockState) { } subChunk = chunks[(int) (y >> 4)] = new SimpleSubChunkImpl(16,16); } - if(subChunk.setBlockState(world, (int) (x % 15), (int)(y % 15), (int) (z % 15),blockState) != blockState) { + if(subChunk.setBlockState(world, (int) (x & 15), (int)(y & 15), (int) (z & 15),blockState) != blockState) { dirty = true; } } @@ -109,7 +109,7 @@ public boolean isEmpty() { @Override public int getSubChunkCount() { - return 0; + return chunks.length; } @Override diff --git a/src/main/java/dev/hilligans/ourcraft/world/newworldsystem/IWorld.java b/src/main/java/dev/hilligans/ourcraft/world/newworldsystem/IWorld.java index e10069a..8097853 100644 --- a/src/main/java/dev/hilligans/ourcraft/world/newworldsystem/IWorld.java +++ b/src/main/java/dev/hilligans/ourcraft/world/newworldsystem/IWorld.java @@ -5,10 +5,12 @@ import dev.hilligans.ourcraft.block.blockstate.IBlockState; import dev.hilligans.ourcraft.data.other.BlockPos; import dev.hilligans.ourcraft.data.other.ChunkPos; +import dev.hilligans.ourcraft.data.other.IBoundingBox; import dev.hilligans.ourcraft.entity.Entity; import dev.hilligans.ourcraft.util.Immutable; import dev.hilligans.ourcraft.util.MathUtil; import org.jetbrains.annotations.NotNull; +import org.joml.Intersectionf; import org.joml.Vector2f; import org.joml.Vector3f; import org.joml.Vector3fc; @@ -120,6 +122,14 @@ default IBlockState getIntersection(double startX, double startY, double startZ, return state; } + default IBlockState getIntersection(IBoundingBox boundingBox, float dirX, float dirY, float dirZ) { + + //Intersectionf.testObOb() + + + return null; + } + Vector3f DOWN = new Vector3f(0,-1,0); @Immutable diff --git a/src/main/java/dev/hilligans/ourcraft/world/newworldsystem/SimpleServerWorld.java b/src/main/java/dev/hilligans/ourcraft/world/newworldsystem/SimpleServerWorld.java index ef3be1b..f28df12 100644 --- a/src/main/java/dev/hilligans/ourcraft/world/newworldsystem/SimpleServerWorld.java +++ b/src/main/java/dev/hilligans/ourcraft/world/newworldsystem/SimpleServerWorld.java @@ -25,17 +25,18 @@ public SimpleServerWorld(int id, String name) { public IChunk getGeneratedChunk(int xx, int zz) { Random random = new Random(); - IChunk chunk = new ClassicChunk(this, 256, xx, zz); + IChunk chunk = new ClassicChunk(this, 16, xx, zz); for(int x = 0; x < 16; x++) { for(int y = 0; y < chunk.getHeight(); y++) { for(int z = 0; z < 16; z++) { if(y < 60) { - chunk.setBlockState(x, y, z, Blocks.STONE.getDefaultState()); + // chunk.setBlockState(x, y, z, Blocks.STONE.getDefaultState()); } else { + // chunk.setBlockState(x, y, z, Blocks.AIR.getDefaultState()); if(y % 2 == 0) { - chunk.setBlockState(x, y, z, Blocks.RED.getDefaultState()); + // chunk.setBlockState(x, y, z, Blocks.RED.getDefaultState()); } else { - chunk.setBlockState(x, y, z, Blocks.AIR.getDefaultState()); + // chunk.setBlockState(x, y, z, Blocks.AIR.getDefaultState()); } } @@ -53,7 +54,7 @@ public ConcurrentLinkedQueue> getPostTickQueue() { } @Override - public IChunk getChunk(long blockX, long blockY, long blockZ) { + public IChunk getChunkNonNull(long blockX, long blockY, long blockZ) { IChunk chunk = super.getChunk(blockX, blockY, blockZ); if(chunk == null) { chunk = getGeneratedChunk((int) (blockX >> 4), (int) (blockZ >> 4)); @@ -62,11 +63,6 @@ public IChunk getChunk(long blockX, long blockY, long blockZ) { return chunk; } - @Override - public IChunk getChunkNonNull(long blockX, long blockY, long blockZ) { - return super.getChunkNonNull(blockX, blockY, blockZ); - } - @Override public void setServer(MultiPlayerServer server) { this.server = server;