Here's the code:
Edit: And here's the code on paste.minecraftforge.net for the syntax highlighting:
http://paste.minecraftforge.net/view/4eed23b9
public void updateTick(World currentWorld, int x, int y, int z, Random random)
{
currentWorld.scheduleBlockUpdate(x, y, z, this.blockID, this.tickRate());
AxisAlignedBB interactionBox = AxisAlignedBB.getBoundingBox(x, y, z, x+1, y+8, z+1);
List entitiesToPush = currentWorld.getEntitiesWithinAABBExcludingEntity((Entity)null, interactionBox);
Iterator entityToCheck = entitiesToPush.iterator();
while (entityToCheck.hasNext())
{
Object tempObject = entityToCheck.next();
Entity currentEntity = (Entity) tempObject;
System.out.println(currentEntity.toString());
currentEntity.addVelocity(0, 1, 0);
}
}
public boolean onBlockActivated(World currentWorld, int x, int y, int z, EntityPlayer activatingPlayer, int par6, float par7, float par8, float par9)
{
System.out.println(activatingPlayer.toString());
activatingPlayer.addVelocity(0, 1, 0);
return true;
}
The output from updateTick when I stand within the bounding box is:
EntityPlayerMP['Player926'/533, l='New World', x=4.85, y=64.00, z=229.69]
The physical result of standing in the bounding box is absolutely nothing. Though other entities (mobs, items, etc) do get pushed properly, though there is some visual jittering if the block tries to keep them at a steady height.
The output from onBlockActivated is:
EntityClientPlayerMP['Player926'/533, l='MpServer', x=3.44, y=65.62, z=229.95]
EntityPlayerMP['Player926'/533, l='New World', x=3.44, y=64.00, z=229.95]
The physical result of right-clicking the block is that I get flung up into the air, as expected.
The forge modloader version is 4.7.4.520, and the forge version is v6.6.0.497. Minecraft coder pack is version 7.26. The Minecraft version is, of course, 1.4.7.
Does anyone know what I'm doing wrong? Or if this is a bug of some sort?
Edit2: Note, I have changed the types in the updateTick code from "Entity" to "EntityPlayer", and even "EntityPlayerMP", but none of those changed the output or actually moved the player.