Posted July 20, 201510 yr I have this here code snippet in the update method for a custom tile entity: if(flag&&rand.nextDouble()>0.8&worldObj.canSeeSky(pos.up())){ if(!worldObj.isRemote){ System.out.println("TEST"); EntityTNTPrimed f=new EntityTNTPrimed(this.worldObj); f.setVelocity(0,-3,0); f.fuse=120; f.setPosition(pos.getX()+rand.nextDouble()-0.5,250,pos.getX()+rand.nextDouble()-0.5); worldObj.spawnEntityInWorld(f); } } (flag being a custom boolean field indicating if the block has ever detected a redstone signal since having been placed) I know from reading the console output that this block of code is being executed, but the TNT entities are consistently refusing to spawn. Why is this?
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.