diff --git a/src/main/java/cr0s/warpdrive/block/detection/BlockCamera.java b/src/main/java/cr0s/warpdrive/block/detection/BlockCamera.java index ad1ae8d6..035bf68a 100644 --- a/src/main/java/cr0s/warpdrive/block/detection/BlockCamera.java +++ b/src/main/java/cr0s/warpdrive/block/detection/BlockCamera.java @@ -39,6 +39,11 @@ public class BlockCamera extends BlockAbstractContainer { return new TileEntityCamera(); } + @Override + public boolean isOpaqueCube() { + return false; + } + @Override public int quantityDropped(Random par1Random) { return 1; diff --git a/src/main/java/cr0s/warpdrive/block/weapon/BlockLaserCamera.java b/src/main/java/cr0s/warpdrive/block/weapon/BlockLaserCamera.java index 6a959e66..2ae3d24e 100644 --- a/src/main/java/cr0s/warpdrive/block/weapon/BlockLaserCamera.java +++ b/src/main/java/cr0s/warpdrive/block/weapon/BlockLaserCamera.java @@ -43,25 +43,21 @@ public class BlockLaserCamera extends BlockAbstractContainer { return new TileEntityLaserCamera(); } - /** - * Returns the quantity of items to drop on block destruction. - */ + @Override + public boolean isOpaqueCube() { + return false; + } + @Override public int quantityDropped(Random par1Random) { return 1; } - /** - * Returns the ID of the items to drop on destruction. - */ @Override public Item getItemDropped(int par1, Random par2Random, int par3) { return Item.getItemFromBlock(this); } - /** - * Called upon block activation (right click on the block.) - */ @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int side, float hitX, float hitY, float hitZ) { if (entityPlayer.getHeldItem() == null) { diff --git a/src/main/java/cr0s/warpdrive/render/EntityCamera.java b/src/main/java/cr0s/warpdrive/render/EntityCamera.java index 4270b9e7..2d1260bd 100644 --- a/src/main/java/cr0s/warpdrive/render/EntityCamera.java +++ b/src/main/java/cr0s/warpdrive/render/EntityCamera.java @@ -40,8 +40,6 @@ public final class EntityCamera extends EntityLivingBase { public EntityCamera(World world, final int x, final int y, final int z, EntityPlayer player) { super(world); - setInvisible(true); - // yOffset = 1.9F; // set viewpoint inside camera (requires a 3D model of the camera) posX = x; posY = y; posZ = z; @@ -49,9 +47,25 @@ public final class EntityCamera extends EntityLivingBase { cameraY = y; cameraZ = z; this.player = player; + } + + @Override + protected void entityInit() { + super.entityInit(); + setInvisible(true); + // set viewpoint inside camera + yOffset = 1.62F; noClip = true; } + // override to skip the block bounding override on client side + @Override + public void setPositionAndRotation2(double x, double y, double z, float yaw, float pitch, int p_70056_9_) { + // super.setPositionAndRotation2(x, y, z, yaw, pitch, p_70056_9_); + this.setPosition(x, y, z); + this.setRotation(yaw, pitch); + } + private void closeCamera() { if (!isActive) { return;