Posted March 19, 20178 yr so i got me a tree chopping loop, then the block position of a tree is selected on the 3 log from the buttom its cuts that log and one down but not the one inside dirt, and then it cuts all blocks from above the 3 log wondering if anyone knows why if(getBlock() == Blocks.LOG | getBlock() == Blocks.LOG2){ test.world.setBlockToAir(getPos()); for(int i=1; getBlock(getPos().down(i)) == Blocks.LOG | getBlock(getPos().down(i)) == Blocks.LOG2; i--){ test.world.setBlockToAir(getPos().down(i)); } for(int i=1; getBlock(getPos().up(i)) == Blocks.LOG | getBlock(getPos().up(i)) == Blocks.LOG2; i++){ test.world.setBlockToAir(getPos().up(i)); } }
March 19, 20178 yr Author case full code is required https://github.com/Clowcadia/MinecraftForge/blob/master/1.11/NPCTesting/src/main/java/com/clowcadia/test/entities/living/ai/AIGoto.java
March 19, 20178 yr Author i cant seem to use Block.isWood() its red, and the get block is going through a loop, it doesnt use on the same value
March 19, 20178 yr Author Ok now it only removes the selected block, but does not go through any of the loops passes first check but fails on the loops https://github.com/Clowcadia/MinecraftForge/blob/master/1.11/NPCTesting/src/main/java/com/clowcadia/test/entities/living/ai/AIGoto.java
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.