Posted June 19, 201312 yr Hi everyone, first I must say I'm new to modding minecraft and new to Java. I'm trying to create a new redstone powered block that works like a springboard. It's intended for adventure maps so it's indestructible. My problem is that when the block is activated by the player(right clicking) everything works fine and the player is launched to the air but when it's activated by redstone every other entity is launched(pigs, mobs, etc..) EXCEPT for the player. Anyone can tell me what I'm doing wrong? I'm working on minecraft version 1.4.7 if that helps. Here is the block class code: http://paste.minecraftforge.net/view/3677cf49 Here is the problematic function: private void BumpEntities(World world, int x, int y, int z) { List<Entity> list = world.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(x, y, z, x+1, y+1, z+1)); for(Entity entity : list) { entity.addVelocity(0, Force, 0); } }
June 20, 201312 yr check if its a player with instanceof if ( entity instanceof EntityPlayer) { code here} http://mag.racked.eu/cimage/i6000/Achievement++get%21/Newb+Modder%21/mca.png[/img]
June 20, 201312 yr Author I actually want any entity to be pushed up, so it's fine if it's not a player. again, the problem is that the player does not move, I looked in debug the player is found and addVelocity() adds the right amount of motion to the player entity and yet he does not move..
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.