Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I want my TE not to render some parts if there is another equal TE on its left, right or top. this is what I've come up with for now, I'm testing if it works right now. I was wondering what offset stands for ( english is not my first language) and if it can help me...
- @Override
- public void updateEntity() {
- if(hasLeft()) System.out.println("d");
- }
- public boolean hasLeft() {
- TileEntity te;
- switch(this.facing) {
- case NORTH: te = this.getWorldObj().getTileEntity(this.xCoord+1, this.yCoord, this.zCoord); break;
- case SOUTH: te = this.getWorldObj().getTileEntity(this.xCoord-1, this.yCoord, this.zCoord); break;
- case EAST: te = this.getWorldObj().getTileEntity(this.xCoord, this.yCoord, this.zCoord-1); break;
- case WEST: te = this.getWorldObj().getTileEntity(this.xCoord, this.yCoord, this.zCoord+1); break;
- default: te = null; break;
- }
- if(te instanceof TileEntityShelve) {
- return true;
- } else
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement