add basic displays
This commit is contained in:
parent
2fbdfde2ee
commit
b0f33c3be1
40 changed files with 249 additions and 197 deletions
|
@ -1322,8 +1322,8 @@ public class ClientPlayer implements IClientPlayer
|
|||
if(this.gm.world.isBlockLoaded(packet.getPos())) {
|
||||
TileEntity tileentity = this.gm.world.getTileEntity(packet.getPos());
|
||||
|
||||
if(tileentity instanceof TileEntityDisplay display) {
|
||||
System.arraycopy(packet.getPixels(), 0, display.data, 0, 256);
|
||||
if(tileentity instanceof TileEntityDisplay display && display.data.length == packet.getPixels().length) {
|
||||
System.arraycopy(packet.getPixels(), 0, display.data, 0, display.data.length);
|
||||
display.lastUpdated = System.currentTimeMillis();
|
||||
display.markDirty();
|
||||
}
|
||||
|
|
|
@ -57,8 +57,8 @@ public class TileEntityDisplayRenderer extends TileEntitySpecialRenderer<TileEnt
|
|||
tex = new TimedTexture();
|
||||
tex.texture = id;
|
||||
tex.updated = te.lastUpdated;
|
||||
DynamicTexture dtex = new DynamicTexture(16, 16);
|
||||
System.arraycopy(te.data, 0, dtex.getData(), 0, 256);
|
||||
DynamicTexture dtex = new DynamicTexture(te.density, te.density);
|
||||
System.arraycopy(te.data, 0, dtex.getData(), 0, te.data.length);
|
||||
dtex.updateTexture();
|
||||
Client.CLIENT.getTextureManager().loadTexture(tex.texture, dtex);
|
||||
DISPLAYS.put(id, tex);
|
||||
|
@ -66,7 +66,11 @@ public class TileEntityDisplayRenderer extends TileEntitySpecialRenderer<TileEnt
|
|||
else if(te.lastUpdated != tex.updated) {
|
||||
tex.updated = te.lastUpdated;
|
||||
if(Client.CLIENT.getTextureManager().getTexture(tex.texture) instanceof DynamicTexture dtex) {
|
||||
System.arraycopy(te.data, 0, dtex.getData(), 0, 256);
|
||||
if(dtex.getWidth() * dtex.getHeight() != te.data.length) {
|
||||
Client.CLIENT.getTextureManager().deleteTexture(tex.texture);
|
||||
Client.CLIENT.getTextureManager().loadTexture(tex.texture, dtex = new DynamicTexture(te.density, te.density));
|
||||
}
|
||||
System.arraycopy(te.data, 0, dtex.getData(), 0, te.data.length);
|
||||
dtex.updateTexture();
|
||||
}
|
||||
}
|
||||
|
@ -92,10 +96,11 @@ public class TileEntityDisplayRenderer extends TileEntitySpecialRenderer<TileEnt
|
|||
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.0f, (float)z + 0.5F);
|
||||
GL11.glRotatef(-rot, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.5F, 0.0f, -0.5f + 0.0625f + 0.005f);
|
||||
GL11.glScalef(0.0625f, -0.0625f, 0.0625f);
|
||||
float density = 1.0f / (float)(te.density / 16);
|
||||
GL11.glScalef(0.0625f * density, -0.0625f * density, 0.0625f * density);
|
||||
|
||||
GlState.disableLighting();
|
||||
Drawing.drawTexturedRect(Client.CLIENT, getTexture(te), 16, 16, 0, 0, 0, 0, 16, 16);
|
||||
Drawing.drawTexturedRect(Client.CLIENT, getTexture(te), te.density, te.density, 0, 0, 0, 0, te.density, te.density);
|
||||
GlState.enableLighting();
|
||||
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
|
BIN
client/src/main/resources/textures/blocks/display_area.png
Executable file
BIN
client/src/main/resources/textures/blocks/display_area.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
BIN
client/src/main/resources/textures/items/display.png
Executable file
BIN
client/src/main/resources/textures/items/display.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
BIN
client/src/main/resources/textures/items/display2.png
Normal file
BIN
client/src/main/resources/textures/items/display2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
BIN
client/src/main/resources/textures/items/display4.png
Normal file
BIN
client/src/main/resources/textures/items/display4.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
|
@ -1,8 +1,7 @@
|
|||
package common.block;
|
||||
|
||||
import common.tileentity.TileEntity;
|
||||
import common.world.World;
|
||||
|
||||
public interface ITileEntityProvider {
|
||||
TileEntity createNewTileEntity(World world);
|
||||
TileEntity createNewTileEntity();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
package common.block.tech;
|
||||
|
||||
import common.block.ITileEntityProvider;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.item.Item;
|
||||
import common.tileentity.TileEntity;
|
||||
import common.tileentity.TileEntityDisplay;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.util.Pair;
|
||||
import common.world.AWorldServer;
|
||||
import common.world.State;
|
||||
import common.world.World;
|
||||
|
||||
public class BlockActiveDisplay extends BlockDisplay implements ITileEntityProvider {
|
||||
private static boolean removing;
|
||||
|
||||
private final BlockInactiveDisplay inactive;
|
||||
|
||||
public BlockActiveDisplay(BlockInactiveDisplay inactive) {
|
||||
super(inactive.getDensity());
|
||||
this.hasTile = true;
|
||||
this.setLightLevel(1.0f);
|
||||
this.inactive = inactive;
|
||||
inactive.setActive(this);
|
||||
}
|
||||
|
||||
public void onBlockRemoved(AWorldServer world, BlockPos pos, State state) {
|
||||
super.onBlockRemoved(world, pos, state);
|
||||
world.removeTileEntity(pos);
|
||||
Pair<BlockPos, BlockPos> span = removing ? null : this.getSpan(world, pos, state.getValue(FACING));
|
||||
if(span != null) {
|
||||
removing = true;
|
||||
for(BlockPos loc : BlockPos.getAllInBox(span.first(), span.second())) {
|
||||
if(!loc.equals(pos))
|
||||
world.setState(loc, this.inactive.getState().withProperty(FACING, state.getValue(FACING)), 2);
|
||||
}
|
||||
removing = false;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean onBlockEventReceived(World world, BlockPos pos, State state, int id, int param) {
|
||||
super.onBlockEventReceived(world, pos, state, id, param);
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
return tile == null ? false : tile.receiveClientEvent(id, param);
|
||||
}
|
||||
|
||||
public TileEntity createNewTileEntity() {
|
||||
return new TileEntityDisplay(this.density);
|
||||
}
|
||||
|
||||
protected Item getItemToRegister() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean onBlockActivated(World worldIn, BlockPos pos, State state, EntityNPC playerIn, Facing side, float hitX, float hitY, float hitZ) {
|
||||
if(!worldIn.client) {
|
||||
Pair<BlockPos, BlockPos> span = this.getSpan(worldIn, pos, state.getValue(FACING));
|
||||
if(span == null)
|
||||
return true;
|
||||
for(BlockPos loc : BlockPos.getAllInBox(span.first(), span.second())) {
|
||||
worldIn.setState(loc, this.inactive.getState().withProperty(FACING, state.getValue(FACING)), 2);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected BlockDisplay getOtherBlock() {
|
||||
return this.inactive;
|
||||
}
|
||||
}
|
|
@ -51,7 +51,7 @@ public class BlockBeacon extends BlockContainer
|
|||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
public TileEntity createNewTileEntity(World worldIn)
|
||||
public TileEntity createNewTileEntity()
|
||||
{
|
||||
return new TileEntityBeacon();
|
||||
}
|
||||
|
|
|
@ -388,7 +388,7 @@ public class BlockBrewingStand extends BlockContainer
|
|||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
public TileEntity createNewTileEntity(World worldIn)
|
||||
public TileEntity createNewTileEntity()
|
||||
{
|
||||
return new TileEntityBrewingStand();
|
||||
}
|
||||
|
|
|
@ -531,7 +531,7 @@ public class BlockChest extends BlockContainer implements Rotatable
|
|||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
public TileEntity createNewTileEntity(World worldIn)
|
||||
public TileEntity createNewTileEntity()
|
||||
{
|
||||
return new TileEntityChest();
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ public class BlockDaylightDetector extends BlockContainer
|
|||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
public TileEntity createNewTileEntity(World worldIn)
|
||||
public TileEntity createNewTileEntity()
|
||||
{
|
||||
return new TileEntityDaylightDetector();
|
||||
}
|
||||
|
|
|
@ -190,7 +190,7 @@ public class BlockDispenser extends BlockContainer implements Directional
|
|||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
public TileEntity createNewTileEntity(World worldIn)
|
||||
public TileEntity createNewTileEntity()
|
||||
{
|
||||
return new TileEntityDispenser();
|
||||
}
|
||||
|
|
|
@ -1,49 +1,44 @@
|
|||
package common.block.tech;
|
||||
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
import java.util.Set;
|
||||
|
||||
import common.block.Block;
|
||||
import common.block.BlockContainer;
|
||||
import common.block.Material;
|
||||
import common.block.Rotatable;
|
||||
import common.block.liquid.BlockLiquid;
|
||||
import common.block.liquid.BlockStaticLiquid;
|
||||
import common.collect.Sets;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.init.Blocks;
|
||||
import common.item.CheatTab;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.properties.Property;
|
||||
import common.tileentity.TileEntity;
|
||||
import common.tileentity.TileEntityDisplay;
|
||||
import common.util.BlockPos;
|
||||
import common.util.BoundingBox;
|
||||
import common.util.Facing;
|
||||
import common.util.Pair;
|
||||
import common.util.Vec3i;
|
||||
import common.world.AWorldServer;
|
||||
import common.world.IWorldAccess;
|
||||
import common.world.State;
|
||||
import common.world.World;
|
||||
|
||||
public class BlockDisplay extends BlockContainer implements Rotatable
|
||||
public abstract class BlockDisplay extends Block implements Rotatable
|
||||
{
|
||||
public BlockDisplay()
|
||||
protected final int density;
|
||||
|
||||
public BlockDisplay(int density)
|
||||
{
|
||||
super(Material.SOLID);
|
||||
this.setLightLevel(1.0f);
|
||||
this.density = density;
|
||||
this.setBlockBounds(0.0F, 0.0F, 1.0F - 0.0625F, 1.0F, 1.0F, 1.0F);
|
||||
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH));
|
||||
this.setTab(CheatTab.TECHNOLOGY);
|
||||
this.setFlatItemTexture();
|
||||
}
|
||||
|
||||
public int getDensity() {
|
||||
return this.density;
|
||||
}
|
||||
|
||||
public void setBlockBoundsBasedOnState(IWorldAccess worldIn, BlockPos pos)
|
||||
{
|
||||
|
@ -96,29 +91,15 @@ public class BlockDisplay extends BlockContainer implements Rotatable
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to determine ambient occlusion and culling when rebuilding chunks for render
|
||||
*/
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if an entity can be spawned inside the block (used to get the player's bed spawn location)
|
||||
*/
|
||||
public boolean canSpawnInBlock()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
public TileEntity createNewTileEntity(World worldIn)
|
||||
{
|
||||
return new TileEntityDisplay();
|
||||
}
|
||||
|
||||
public boolean isXrayVisible()
|
||||
{
|
||||
|
@ -129,24 +110,17 @@ public class BlockDisplay extends BlockContainer implements Rotatable
|
|||
return this.getState().withProperty(FACING, facing.getAxis().isVertical() ? placer.getHorizontalFacing().getOpposite() : facing);
|
||||
}
|
||||
|
||||
public int getRenderType() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
public boolean shouldSideBeRendered(IWorldAccess worldIn, BlockPos pos, Facing side)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
// public Transforms getTransform() {
|
||||
// return Transforms.LAYER;
|
||||
// }
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
return provider.getModel("iron_block").add(0, 0, 15, 16, 16, 16).n().noCull().s().du().we().rotate(ModelRotation.getNorthRot(state.getValue(FACING)));
|
||||
return provider.getModel("iron_block").add(0, 0, 15, 16, 16, 16).n("display_area").noCull().s().du().we().rotate(ModelRotation.getNorthRot(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
protected abstract BlockDisplay getOtherBlock();
|
||||
|
||||
private boolean test(World world, BlockPos pos, BlockPos origin, Facing dir) {
|
||||
int radius = 9;
|
||||
if(pos.getX() < origin.getX() - radius || pos.getX() > origin.getX() + radius)
|
||||
|
@ -156,14 +130,10 @@ public class BlockDisplay extends BlockContainer implements Rotatable
|
|||
if(pos.getZ() < origin.getZ() - radius || pos.getZ() > origin.getZ() + radius)
|
||||
return false;
|
||||
State state = world.getState(pos);
|
||||
return state.getBlock() == this && state.getValue(FACING) == dir;
|
||||
return (state.getBlock() == this || state.getBlock() == this.getOtherBlock()) && state.getValue(FACING) == dir;
|
||||
}
|
||||
|
||||
private Pair<BlockPos, BlockPos> getSpan(World world, BlockPos origin) {
|
||||
State state = world.getState(origin);
|
||||
if(state.getBlock() != this)
|
||||
return null;
|
||||
Facing dir = state.getValue(FACING);
|
||||
protected Pair<BlockPos, BlockPos> getSpan(World world, BlockPos origin, Facing dir) {
|
||||
Queue<BlockPos> queue = new ArrayDeque<BlockPos>();
|
||||
Set<BlockPos> present = new HashSet<BlockPos>();
|
||||
Set<BlockPos> visited = new HashSet<BlockPos>();
|
||||
|
@ -213,23 +183,4 @@ public class BlockDisplay extends BlockContainer implements Rotatable
|
|||
}
|
||||
return new Pair(min, max);
|
||||
}
|
||||
|
||||
public boolean onBlockActivated(World worldIn, BlockPos pos, State state, EntityNPC playerIn, Facing side, float hitX, float hitY, float hitZ) {
|
||||
if(!worldIn.client) {
|
||||
Pair<BlockPos, BlockPos> span = this.getSpan(worldIn, pos);
|
||||
if(span == null)
|
||||
return true;
|
||||
for(BlockPos loc : BlockPos.getAllInBox(span.first(), span.second())) {
|
||||
TileEntity tileentity = worldIn.getTileEntity(loc);
|
||||
if(tileentity instanceof TileEntityDisplay display) {
|
||||
for(int z = 0; z < 16; z++) {
|
||||
display.setPixel(worldIn.rand.zrange(16), worldIn.rand.zrange(16), worldIn.rand.zrange(0x8000000));
|
||||
}
|
||||
display.markDirty();
|
||||
worldIn.markBlockForUpdate(loc);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ public class BlockDropper extends BlockDispenser
|
|||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
public TileEntity createNewTileEntity(World worldIn)
|
||||
public TileEntity createNewTileEntity()
|
||||
{
|
||||
return new TileEntityDropper();
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ public class BlockEnchantmentTable extends BlockContainer
|
|||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
public TileEntity createNewTileEntity(World worldIn)
|
||||
public TileEntity createNewTileEntity()
|
||||
{
|
||||
return new TileEntityEnchantmentTable();
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ public class BlockFurnace extends BlockContainer implements Rotatable
|
|||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
public TileEntity createNewTileEntity(World worldIn)
|
||||
public TileEntity createNewTileEntity()
|
||||
{
|
||||
return new TileEntityFurnace();
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ public class BlockHopper extends BlockContainer implements DirectionalDown
|
|||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
public TileEntity createNewTileEntity(World worldIn)
|
||||
public TileEntity createNewTileEntity()
|
||||
{
|
||||
return new TileEntityHopper();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
package common.block.tech;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.init.BlockRegistry;
|
||||
import common.item.Item;
|
||||
import common.item.block.ItemBlock;
|
||||
import common.tileentity.TileEntity;
|
||||
import common.tileentity.TileEntityDisplay;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.util.Pair;
|
||||
import common.world.State;
|
||||
import common.world.World;
|
||||
|
||||
public class BlockInactiveDisplay extends BlockDisplay {
|
||||
private BlockActiveDisplay active;
|
||||
|
||||
public BlockInactiveDisplay(int density) {
|
||||
super(density * 16);
|
||||
}
|
||||
|
||||
protected void setActive(BlockActiveDisplay active) {
|
||||
this.active = active;
|
||||
}
|
||||
|
||||
public boolean onBlockActivated(World worldIn, BlockPos pos, State state, EntityNPC playerIn, Facing side, float hitX, float hitY, float hitZ) {
|
||||
if(!worldIn.client) {
|
||||
Pair<BlockPos, BlockPos> span = this.getSpan(worldIn, pos, state.getValue(FACING));
|
||||
if(span == null)
|
||||
return true;
|
||||
for(BlockPos loc : BlockPos.getAllInBox(span.first(), span.second())) {
|
||||
worldIn.setState(loc, this.active.getState().withProperty(FACING, state.getValue(FACING)), 2);
|
||||
TileEntity tileentity = worldIn.getTileEntity(loc);
|
||||
if(tileentity instanceof TileEntityDisplay display) {
|
||||
Arrays.fill(display.data, 0xff000000);
|
||||
worldIn.markBlockForUpdate(loc);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected Item getItemToRegister() {
|
||||
return new ItemBlock(this, BlockRegistry.getName(this));
|
||||
}
|
||||
|
||||
protected BlockDisplay getOtherBlock() {
|
||||
return this.active;
|
||||
}
|
||||
}
|
|
@ -26,7 +26,7 @@ public abstract class BlockMachine extends Block implements Rotatable, ITileEnti
|
|||
this.setTab(CheatTab.TECHNOLOGY);
|
||||
}
|
||||
|
||||
public abstract TileEntity createNewTileEntity(World worldIn);
|
||||
public abstract TileEntity createNewTileEntity();
|
||||
|
||||
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state) {
|
||||
this.updateState(worldIn, pos, state);
|
||||
|
|
|
@ -2,10 +2,9 @@ package common.block.tech;
|
|||
|
||||
import common.tileentity.TileEntity;
|
||||
import common.tileentity.TileEntityMobSpawner;
|
||||
import common.world.World;
|
||||
|
||||
public class BlockMobSpawner extends BlockMachine {
|
||||
public TileEntity createNewTileEntity(World world) {
|
||||
public TileEntity createNewTileEntity() {
|
||||
return new TileEntityMobSpawner();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public class BlockPistonMoving extends BlockContainer
|
|||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
public TileEntity createNewTileEntity(World worldIn)
|
||||
public TileEntity createNewTileEntity()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -246,7 +246,7 @@ public class BlockRedstoneComparator extends BlockRedstoneDiode implements ITile
|
|||
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)
|
||||
{
|
||||
super.onBlockAdded(worldIn, pos, state);
|
||||
worldIn.setTileEntity(pos, this.createNewTileEntity(worldIn));
|
||||
worldIn.setTileEntity(pos, this.createNewTileEntity());
|
||||
}
|
||||
|
||||
public void onBlockRemoved(AWorldServer worldIn, BlockPos pos, State state)
|
||||
|
@ -269,7 +269,7 @@ public class BlockRedstoneComparator extends BlockRedstoneDiode implements ITile
|
|||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
public TileEntity createNewTileEntity(World worldIn)
|
||||
public TileEntity createNewTileEntity()
|
||||
{
|
||||
return new TileEntityComparator();
|
||||
}
|
||||
|
|
|
@ -8,10 +8,9 @@ import common.model.ModelRotation;
|
|||
import common.tileentity.TileEntity;
|
||||
import common.tileentity.TileEntityTianReactor;
|
||||
import common.world.State;
|
||||
import common.world.World;
|
||||
|
||||
public class BlockTianReactor extends BlockMachine {
|
||||
public TileEntity createNewTileEntity(World world) {
|
||||
public TileEntity createNewTileEntity() {
|
||||
return new TileEntityTianReactor();
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ public class BlockBanner extends BlockContainer implements Rotatable
|
|||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
public TileEntity createNewTileEntity(World worldIn)
|
||||
public TileEntity createNewTileEntity()
|
||||
{
|
||||
return new TileEntityBanner();
|
||||
}
|
||||
|
@ -103,10 +103,6 @@ public class BlockBanner extends BlockContainer implements Rotatable
|
|||
ItemStack itemstack = new ItemStack(Items.banner);
|
||||
TagObject tag = new TagObject();
|
||||
tileentity.writeTags(tag);
|
||||
tag.remove("x");
|
||||
tag.remove("y");
|
||||
tag.remove("z");
|
||||
tag.remove("id");
|
||||
itemstack.setTagInfo("BlockEntityTag", tag);
|
||||
spawnAsEntity(worldIn, pos, itemstack);
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ public class BlockSign extends BlockContainer
|
|||
/**
|
||||
* Returns a new instance of a block's tile entity class. Called on placing the block.
|
||||
*/
|
||||
public TileEntity createNewTileEntity(World worldIn)
|
||||
public TileEntity createNewTileEntity()
|
||||
{
|
||||
return new TileEntitySign();
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import common.model.ParticleType;
|
|||
import common.tags.TagObject;
|
||||
import common.util.ExtMath;
|
||||
import common.world.AWorldClient;
|
||||
import common.world.AWorldServer;
|
||||
import common.world.World;
|
||||
|
||||
public class EntityFireworks extends Entity
|
||||
|
|
|
@ -92,6 +92,7 @@ import common.block.natural.BlockSoulSand;
|
|||
import common.block.natural.BlockStone;
|
||||
import common.block.natural.BlockTintedFire;
|
||||
import common.block.natural.BlockWeb;
|
||||
import common.block.tech.BlockActiveDisplay;
|
||||
import common.block.tech.BlockAnvil;
|
||||
import common.block.tech.BlockBeacon;
|
||||
import common.block.tech.BlockBrewingStand;
|
||||
|
@ -101,11 +102,11 @@ import common.block.tech.BlockChest;
|
|||
import common.block.tech.BlockCore;
|
||||
import common.block.tech.BlockDaylightDetector;
|
||||
import common.block.tech.BlockDispenser;
|
||||
import common.block.tech.BlockDisplay;
|
||||
import common.block.tech.BlockDropper;
|
||||
import common.block.tech.BlockEnchantmentTable;
|
||||
import common.block.tech.BlockFurnace;
|
||||
import common.block.tech.BlockHopper;
|
||||
import common.block.tech.BlockInactiveDisplay;
|
||||
import common.block.tech.BlockJukebox;
|
||||
import common.block.tech.BlockLever;
|
||||
import common.block.tech.BlockMobSpawner;
|
||||
|
@ -462,7 +463,13 @@ public abstract class BlockRegistry {
|
|||
.setTab(CheatTab.DECORATION));
|
||||
register("sign", (new BlockStandingSign()).setHardness(1.0F).setStepSound(SoundType.WOOD).setDisplay("Schild"));
|
||||
register("wall_sign", (new BlockWallSign()).setHardness(1.0F).setStepSound(SoundType.WOOD).setDisplay("Schild"));
|
||||
register("display", (new BlockDisplay()).setHardness(1.0F).setStepSound(SoundType.STONE).setDisplay("Anzeige"));
|
||||
for(int density : new int[] {1, 2, 4}) {
|
||||
BlockInactiveDisplay display = (BlockInactiveDisplay)new BlockInactiveDisplay(density).setHardness(1.0F).setStepSound(SoundType.STONE).setDisplay("Displaymodul (" + (density * 16) +
|
||||
"x" + (density * 16) + ")");
|
||||
register("display" + (density == 1 ? "" : density), display);
|
||||
register("display" + (density == 1 ? "" : density) + "_on", new BlockActiveDisplay(display).setHardness(1.0F).setStepSound(SoundType.STONE).setDisplay("Displaymodul (" + (density * 16) +
|
||||
"x" + (density * 16) + ")"));
|
||||
}
|
||||
register("banner", (new BlockBannerStanding()).setHardness(1.0F).setStepSound(SoundType.WOOD).setDisplay("Banner"));
|
||||
register("wall_banner", (new BlockBannerHanging()).setHardness(1.0F).setStepSound(SoundType.WOOD).setDisplay("Banner"));
|
||||
|
||||
|
|
|
@ -591,7 +591,12 @@ public abstract class Blocks {
|
|||
public static final BlockStairs floor_tiles_white_stairs = get("floor_tiles_white_stairs");
|
||||
public static final BlockSlab pentagram_slab = get("pentagram_slab");
|
||||
public static final BlockStairs pentagram_stairs = get("pentagram_stairs");
|
||||
public static final BlockDisplay display = get("display");
|
||||
public static final BlockInactiveDisplay display = get("display");
|
||||
public static final BlockInactiveDisplay display2 = get("display2");
|
||||
public static final BlockInactiveDisplay display4 = get("display4");
|
||||
public static final BlockActiveDisplay display_on = get("display_on");
|
||||
public static final BlockActiveDisplay display2_on = get("display2_on");
|
||||
public static final BlockActiveDisplay display4_on = get("display4_on");
|
||||
|
||||
private static <T extends Block> T get(String id) {
|
||||
T block = (T)BlockRegistry.byNameExact(id);
|
||||
|
|
|
@ -973,6 +973,8 @@ public abstract class Items {
|
|||
public static final ItemSlab pentagram_slab = get("pentagram_slab");
|
||||
public static final ItemBlock pentagram_stairs = get("pentagram_stairs");
|
||||
public static final ItemBlock display = get("display");
|
||||
public static final ItemBlock display2 = get("display2");
|
||||
public static final ItemBlock display4 = get("display4");
|
||||
|
||||
private static <T extends Item> T get(String id) {
|
||||
T item = (T)ItemRegistry.byName(id);
|
||||
|
|
|
@ -114,9 +114,6 @@ public class ItemBlock extends Item
|
|||
tile.writeTags(tag);
|
||||
TagObject stackTag = stack.getTag().getObject("BlockEntityTag");
|
||||
tag.merge(stackTag);
|
||||
tag.setInt("x", pos.getX());
|
||||
tag.setInt("y", pos.getY());
|
||||
tag.setInt("z", pos.getZ());
|
||||
|
||||
if (!tag.equals(tileTag))
|
||||
{
|
||||
|
|
|
@ -2,36 +2,43 @@ package common.packet;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import common.net.handler.codec.DecoderException;
|
||||
import common.network.IClientPlayer;
|
||||
import common.network.Packet;
|
||||
import common.network.PacketBuffer;
|
||||
import common.util.BlockPos;
|
||||
|
||||
public class SPacketUpdateDisplay implements Packet<IClientPlayer> {
|
||||
private int density;
|
||||
private BlockPos position;
|
||||
private int[] pixels;
|
||||
|
||||
public SPacketUpdateDisplay() {
|
||||
}
|
||||
|
||||
public SPacketUpdateDisplay(BlockPos pos, int[] pixels) {
|
||||
public SPacketUpdateDisplay(int density, BlockPos pos, int[] pixels) {
|
||||
this.density = density;
|
||||
this.position = pos;
|
||||
this.pixels = pixels;
|
||||
}
|
||||
|
||||
public void readPacketData(PacketBuffer buf) throws IOException {
|
||||
this.density = buf.readUnsignedByte() * 16;
|
||||
if(this.density < 16 || this.density > 256)
|
||||
throw new DecoderException("Incorrect density");
|
||||
this.position = buf.readBlockPos();
|
||||
this.pixels = new int[256];
|
||||
this.pixels = new int[this.density * this.density];
|
||||
|
||||
for(int i = 0; i < 256; ++i) {
|
||||
for(int i = 0; i < this.density * this.density; ++i) {
|
||||
this.pixels[i] = 0xff000000 | buf.readUnsignedByte() << 16 | buf.readUnsignedByte() << 8 | buf.readUnsignedByte();
|
||||
}
|
||||
}
|
||||
|
||||
public void writePacketData(PacketBuffer buf) throws IOException {
|
||||
buf.writeByte(this.density / 16);
|
||||
buf.writeBlockPos(this.position);
|
||||
|
||||
for(int i = 0; i < 256; ++i) {
|
||||
for(int i = 0; i < this.density * this.density; ++i) {
|
||||
buf.writeByte((this.pixels[i] >> 16) & 255);
|
||||
buf.writeByte((this.pixels[i] >> 8) & 255);
|
||||
buf.writeByte(this.pixels[i] & 255);
|
||||
|
|
|
@ -2,18 +2,20 @@ package common.packet;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import common.init.TileRegistry;
|
||||
import common.block.Block;
|
||||
import common.init.BlockRegistry;
|
||||
import common.network.IClientPlayer;
|
||||
import common.network.Packet;
|
||||
import common.network.PacketBuffer;
|
||||
import common.tags.TagObject;
|
||||
import common.tileentity.TileEntity;
|
||||
import common.util.BlockPos;
|
||||
import common.world.State;
|
||||
|
||||
public class SPacketUpdateTileEntity implements Packet<IClientPlayer>
|
||||
{
|
||||
private BlockPos blockPos;
|
||||
private int type;
|
||||
private Block type;
|
||||
private TagObject tag;
|
||||
|
||||
public SPacketUpdateTileEntity()
|
||||
|
@ -23,7 +25,7 @@ public class SPacketUpdateTileEntity implements Packet<IClientPlayer>
|
|||
public SPacketUpdateTileEntity(TileEntity tile)
|
||||
{
|
||||
this.blockPos = tile.getPos();
|
||||
this.type = TileRegistry.CLASS_TO_ID.get(tile.getClass());
|
||||
this.type = tile.getBlockType();
|
||||
tile.writeTags(this.tag = new TagObject());
|
||||
}
|
||||
|
||||
|
@ -33,7 +35,8 @@ public class SPacketUpdateTileEntity implements Packet<IClientPlayer>
|
|||
public void readPacketData(PacketBuffer buf) throws IOException
|
||||
{
|
||||
this.blockPos = buf.readBlockPos();
|
||||
this.type = buf.readUnsignedByte();
|
||||
State state = BlockRegistry.byId(buf.readVarInt());
|
||||
this.type = state == null ? null : state.getBlock();
|
||||
this.tag = buf.readTag();
|
||||
}
|
||||
|
||||
|
@ -43,7 +46,7 @@ public class SPacketUpdateTileEntity implements Packet<IClientPlayer>
|
|||
public void writePacketData(PacketBuffer buf) throws IOException
|
||||
{
|
||||
buf.writeBlockPos(this.blockPos);
|
||||
buf.writeByte((byte)this.type);
|
||||
buf.writeVarInt(BlockRegistry.getId(this.type.getState()));
|
||||
buf.writeTag(this.tag);
|
||||
}
|
||||
|
||||
|
@ -62,7 +65,7 @@ public class SPacketUpdateTileEntity implements Packet<IClientPlayer>
|
|||
|
||||
public boolean isTileEntityType(TileEntity tile)
|
||||
{
|
||||
return this.type == TileRegistry.CLASS_TO_ID.get(tile.getClass());
|
||||
return this.type == tile.getBlockType();
|
||||
}
|
||||
|
||||
public TagObject getTags()
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
package common.tileentity;
|
||||
|
||||
import common.block.Block;
|
||||
import common.block.ITileEntityProvider;
|
||||
import common.init.BlockRegistry;
|
||||
import common.init.Blocks;
|
||||
import common.init.TileRegistry;
|
||||
import common.log.Log;
|
||||
import common.network.Packet;
|
||||
import common.tags.TagObject;
|
||||
import common.util.BlockPos;
|
||||
import common.world.AWorldServer;
|
||||
import common.world.Chunk;
|
||||
import common.world.State;
|
||||
import common.world.World;
|
||||
|
||||
|
@ -55,54 +57,23 @@ public abstract class TileEntity
|
|||
|
||||
public void readTags(TagObject compound)
|
||||
{
|
||||
this.pos = new BlockPos(compound.getInt("x"), compound.getInt("y"), compound.getInt("z"));
|
||||
}
|
||||
|
||||
public void writeTags(TagObject compound)
|
||||
{
|
||||
String s = (String)TileRegistry.CLASS_TO_NAME.get(this.getClass());
|
||||
|
||||
if (s == null)
|
||||
{
|
||||
throw new RuntimeException(this.getClass() + " is missing a mapping! This is a bug!");
|
||||
}
|
||||
else
|
||||
{
|
||||
compound.setString("id", s);
|
||||
compound.setInt("x", this.pos.getX());
|
||||
compound.setInt("y", this.pos.getY());
|
||||
compound.setInt("z", this.pos.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
public static TileEntity createAndLoadEntity(TagObject tag)
|
||||
public static TileEntity createAndLoadEntity(AWorldServer world, Chunk chunk, BlockPos pos, TagObject tag)
|
||||
{
|
||||
TileEntity tileentity = null;
|
||||
|
||||
try
|
||||
{
|
||||
Class <? extends TileEntity > oclass = (Class)TileRegistry.NAME_TO_CLASS.get(tag.getString("id"));
|
||||
|
||||
if (oclass != null)
|
||||
{
|
||||
tileentity = (TileEntity)oclass.getConstructor().newInstance();
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
exception.printStackTrace();
|
||||
}
|
||||
|
||||
if (tileentity != null)
|
||||
{
|
||||
tileentity.readTags(tag);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.TICK.warn("Ignoriere Block-Objekt mit ID " + tag.getString("id"));
|
||||
}
|
||||
|
||||
return tileentity;
|
||||
Block block = chunk.getState(pos).getBlock();
|
||||
if(!(block instanceof ITileEntityProvider provider)) {
|
||||
Log.TICK.warn("Ignoriere Block-Objekt von unbekanntem Block %s in Chunk %d, %d", BlockRegistry.getName(block), chunk.xPos, chunk.zPos);
|
||||
return null;
|
||||
}
|
||||
TileEntity te = provider.createNewTileEntity();
|
||||
te.setPos(pos);
|
||||
te.readTags(tag);
|
||||
return te;
|
||||
}
|
||||
|
||||
public State getBlockState()
|
||||
|
|
|
@ -4,30 +4,20 @@ import java.util.Arrays;
|
|||
|
||||
import common.network.Packet;
|
||||
import common.packet.SPacketUpdateDisplay;
|
||||
import common.tags.TagObject;
|
||||
|
||||
public class TileEntityDisplay extends TileEntity {
|
||||
public int[] data = new int[256];
|
||||
public final int density;
|
||||
public int[] data;
|
||||
public long lastUpdated;
|
||||
|
||||
public TileEntityDisplay() {
|
||||
public TileEntityDisplay(int density) {
|
||||
this.density = density;
|
||||
this.data = new int[density * density];
|
||||
Arrays.fill(this.data, 0xff000000);
|
||||
}
|
||||
|
||||
public void writeTags(TagObject compound) {
|
||||
super.writeTags(compound);
|
||||
compound.setIntArray("Pixels", this.data);
|
||||
}
|
||||
|
||||
public void readTags(TagObject compound) {
|
||||
super.readTags(compound);
|
||||
this.data = compound.getIntArray("Pixels");
|
||||
if(this.data.length != 256)
|
||||
this.data = new int[256];
|
||||
}
|
||||
|
||||
public Packet getDescriptionPacket() {
|
||||
return new SPacketUpdateDisplay(this.pos, this.data);
|
||||
return new SPacketUpdateDisplay(this.density, this.pos, this.data);
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
|
@ -35,6 +25,6 @@ public class TileEntityDisplay extends TileEntity {
|
|||
}
|
||||
|
||||
public void setPixel(int x, int y, int color) {
|
||||
this.data[x + y * 16] = color | 0xff000000;
|
||||
this.data[x + y * this.density] = color | 0xff000000;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -392,7 +392,7 @@ public abstract class Chunk {
|
|||
TileEntity tile = this.getTileEntity(pos, TileEntity.EnumCreateEntityType.CHECK);
|
||||
|
||||
if(tile == null) {
|
||||
tile = ((ITileEntityProvider)block).createNewTileEntity(this.world);
|
||||
tile = ((ITileEntityProvider)block).createNewTileEntity();
|
||||
this.world.setTileEntity(pos, tile);
|
||||
}
|
||||
|
||||
|
@ -517,7 +517,7 @@ public abstract class Chunk {
|
|||
|
||||
private TileEntity createNewTileEntity(BlockPos pos) {
|
||||
Block block = this.getBlock(pos);
|
||||
return !block.hasTileEntity() ? null : ((ITileEntityProvider)block).createNewTileEntity(this.world);
|
||||
return !block.hasTileEntity() ? null : ((ITileEntityProvider)block).createNewTileEntity();
|
||||
}
|
||||
|
||||
public TileEntity getTileEntity(BlockPos pos, TileEntity.EnumCreateEntityType type) {
|
||||
|
|
|
@ -49,12 +49,8 @@ public class CommandBlock extends Command {
|
|||
if(tile != null) {
|
||||
TagObject te = new TagObject();
|
||||
tile.writeTags(te);
|
||||
tag.setString("id", te.getString("id"));
|
||||
tag.setInt("x", position.getX());
|
||||
tag.setInt("y", position.getY());
|
||||
tag.setInt("z", position.getZ());
|
||||
te.merge(tag);
|
||||
TileEntity newTile = TileEntity.createAndLoadEntity(te);
|
||||
TileEntity newTile = TileEntity.createAndLoadEntity(world, world.getChunk(position), position, te);
|
||||
if(newTile != null) {
|
||||
world.removeTileEntity(position);
|
||||
world.setTileEntity(position, newTile);
|
||||
|
|
|
@ -111,7 +111,6 @@ import common.entity.item.EntityMinecart;
|
|||
import common.init.BlockRegistry;
|
||||
import common.init.Blocks;
|
||||
import common.init.EntityRegistry;
|
||||
import common.init.TileRegistry;
|
||||
import common.log.Log;
|
||||
import common.rng.Random;
|
||||
import common.tags.TagObject;
|
||||
|
@ -310,7 +309,7 @@ public abstract class Converter {
|
|||
|
||||
private static final Random RANDOM = new Random();
|
||||
private static final Map<String, String> ENTITY_MAP = Maps.newHashMap();
|
||||
private static final Map<String, String> TILE_MAP = Maps.newHashMap();
|
||||
private static final Map<String, Class<? extends TileEntity>> TILE_MAP = Maps.newHashMap();
|
||||
private static final State[] BLOCK_MAP = new State[65536];
|
||||
private static final DyeColor[] COLOR_LOOKUP = new DyeColor[] {
|
||||
DyeColor.WHITE, DyeColor.ORANGE, DyeColor.MAGENTA, DyeColor.LIGHT_BLUE, DyeColor.YELLOW, DyeColor.LIME, DyeColor.PINK, DyeColor.GRAY,
|
||||
|
@ -325,9 +324,8 @@ public abstract class Converter {
|
|||
}
|
||||
|
||||
private static void mapTile(Class<? extends TileEntity> clazz, String ... names) {
|
||||
String name = TileRegistry.CLASS_TO_NAME.get(clazz);
|
||||
for(String oldname : names) {
|
||||
TILE_MAP.put(oldname, name);
|
||||
TILE_MAP.put(oldname, clazz);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1717,9 +1715,9 @@ public abstract class Converter {
|
|||
return (NbtTag)read(in, (byte)10);
|
||||
}
|
||||
|
||||
private static TagObject convertTile(NbtTag ent, String id) {
|
||||
private static TagObject convertTile(NbtTag ent, Class<? extends TileEntity> clazz) {
|
||||
TagObject nent = new TagObject();
|
||||
if("Sign".equals(id)) {
|
||||
if(clazz == TileEntitySign.class) {
|
||||
String[] signText = new String[4];
|
||||
for(int i = 0; i < 4; ++i) {
|
||||
signText[i] = ent.getString("Text" + (i + 1));
|
||||
|
@ -1754,7 +1752,7 @@ public abstract class Converter {
|
|||
nent.setString("Text" + (i + 1), signText[i]);
|
||||
}
|
||||
}
|
||||
else if("Comparator".equals(id)) {
|
||||
else if(clazz == TileEntityComparator.class) {
|
||||
nent.setInt("OutputSignal", ent.getInt("OutputSignal"));
|
||||
}
|
||||
return nent;
|
||||
|
@ -1883,13 +1881,12 @@ public abstract class Converter {
|
|||
entities = Lists.newArrayList();
|
||||
for(NbtTag ent : ents) {
|
||||
TagObject nent = new TagObject();
|
||||
String mapped = TILE_MAP.get(trimColon(ent.getString("id")));
|
||||
Class<? extends TileEntity> mapped = TILE_MAP.get(trimColon(ent.getString("id")));
|
||||
if(mapped != null) {
|
||||
nent = convertTile(ent, mapped);
|
||||
nent.setString("id", mapped);
|
||||
nent.setInt("x", ent.getInt("x"));
|
||||
nent.setInt("y", ent.getInt("y"));
|
||||
nent.setInt("z", ent.getInt("z"));
|
||||
nent.setByte("x", (byte)(ent.getInt("x") & 15));
|
||||
nent.setShort("y", (short)ent.getInt("y"));
|
||||
nent.setByte("z", (byte)(ent.getInt("z") & 15));
|
||||
entities.add(nent);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ import common.util.NibbleArray;
|
|||
import common.util.Util;
|
||||
import common.world.BlockArray;
|
||||
import common.world.State;
|
||||
import common.world.World;
|
||||
|
||||
public class Region {
|
||||
private static boolean makeMap(TagObject tag) {
|
||||
|
@ -632,7 +633,13 @@ public class Region {
|
|||
if(tiles != null) {
|
||||
for(int n = 0; n < tiles.size(); ++n) {
|
||||
TagObject tile = tiles.get(n);
|
||||
TileEntity tileentity = TileEntity.createAndLoadEntity(tile);
|
||||
BlockPos pos = new BlockPos(tile.getByte("x"), tile.getShort("y"), tile.getByte("z"));
|
||||
if(pos.getX() < 0 || pos.getX() >= 16 || pos.getZ() < 0 || pos.getZ() >= 16 || pos.getY() < -World.MAX_SIZE_Y || pos.getY() >= World.MAX_SIZE_Y) {
|
||||
Log.TICK.warn("Ignoriere Block-Objekt mit ungültigen Koordinaten %d, %d, %d in Chunk %d, %d", pos.getX(), pos.getY(), pos.getZ(), chunk.xPos, chunk.zPos);
|
||||
continue;
|
||||
}
|
||||
pos = new BlockPos(chunk.xPos << 4 | pos.getX(), pos.getY(), chunk.zPos << 4 | pos.getZ());
|
||||
TileEntity tileentity = TileEntity.createAndLoadEntity(world, chunk, pos, tile);
|
||||
|
||||
if(tileentity != null) {
|
||||
chunk.addTileEntity(tileentity);
|
||||
|
@ -752,6 +759,9 @@ public class Region {
|
|||
for(TileEntity tileentity : chunk.getTiles().values()) {
|
||||
TagObject tile = new TagObject();
|
||||
tileentity.writeTags(tile);
|
||||
tile.setByte("x", (byte)(tileentity.getPos().getX() & 15));
|
||||
tile.setShort("y", (short)tileentity.getPos().getY());
|
||||
tile.setByte("z", (byte)(tileentity.getPos().getZ() & 15));
|
||||
tiles.add(tile);
|
||||
}
|
||||
|
||||
|
|
|
@ -2186,11 +2186,7 @@ public final class WorldServer extends AWorldServer {
|
|||
if(block.getData() != null) {
|
||||
this.removeTileEntity(pos);
|
||||
TagObject tag = block.getData();
|
||||
tag.setString("id", tag.getString("id"));
|
||||
tag.setInt("x", pos.getX());
|
||||
tag.setInt("y", pos.getY());
|
||||
tag.setInt("z", pos.getZ());
|
||||
TileEntity tileEntity = TileEntity.createAndLoadEntity(tag);
|
||||
TileEntity tileEntity = TileEntity.createAndLoadEntity(this, chunk, pos, tag);
|
||||
if(tileEntity != null) {
|
||||
this.setTileEntity(pos, tileEntity);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue