Posted May 2, 20169 yr Hey there! I'm trying to replace a block on a random tick. However, with every attempt I always come to a crash. I've got a good hold of Forge, and this confuses me greatly. Current code: http://pastebin.com/YGbabsXr I'm trying to change the block to another block called "FullGrapeVine". I don't think that should be incredibly helpful, but it's something. Thanks!
May 2, 20169 yr Author You call Random#nextInt(1-1). 1-1 == 0 and Random#nextInt(0) is not allowed (read the Javadoc). I'm in awe that I missed that. Thanks! I solved the rest of it by myself, though! For anybody interested: here's what should be entered: @Override public void updateTick(World world, int x, int y, int z, Random ran) { super.updateTick(world, x, y, z, ran); world.setBlock(x,y,z, Blocks.clay); //Or whatever block you want }
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.