コード例 #1
0
 public void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity) {
   if (entity.ridingEntity == null && entity.riddenByEntity == null) {
     entity.setInPortal();
   }
 }
コード例 #2
0
 /**
  * Triggered whenever an entity collides with this block (enters into the block). Args: world, x,
  * y, z, entity
  */
 public void onEntityCollidedWithBlock(
     World par1World, int par2, int par3, int par4, Entity par5Entity) {
   if (par5Entity.ridingEntity == null && par5Entity.riddenByEntity == null) {
     par5Entity.setInPortal();
   }
 }