Removeold potion handlers

This commit is contained in:
Vincent Lee committed 2016-03-16 22:54:47 -05:00
1 parent f86f42b895
commit 6622ec5270
2 files changed
-19

No files matched your search

@@ -34,7 +34,6 @@ public class PotionBloodthirst extends PotionMod {
@SubscribeEvent
public void onSpawn(LivingSpawnEvent.CheckSpawn event) {
if(event.getResult() != Result.ALLOW && event.entityLiving instanceof IMob) {
AxisAlignedBB aabb = new AxisAlignedBB(event.x - RANGE, event.y - RANGE, event.z - RANGE, event.x + RANGE, event.y + RANGE, event.z + RANGE);
for(EntityPlayer player : event.world.playerEntities) {
if(hasEffect(player) && !hasEffect(player, ModPotions.emptiness) && player.getEntityBoundingBox().intersectsWith(aabb)) {
@@ -42,15 +41,6 @@ public class PotionBloodthirst extends PotionMod {
return;
}
}
// TODO 1.8 report to forge? world.getEntitiesWithinAABB is hell slow in 1.8+
// List<EntityPlayer> players = event.world.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(event.x - RANGE, event.y - RANGE, event.z - RANGE, event.x + RANGE, event.y + RANGE, event.z + RANGE));
// for(EntityPlayer player : players)
// if(hasEffect(player) && !hasEffect(player, ModPotions.emptiness)) {
// event.setResult(Result.ALLOW);
// return;
// }
}
}
@@ -40,15 +40,6 @@ public class PotionEmptiness extends PotionMod {
return;
}
}
// TODO 1.8 report to forge? world.getEntitiesWithinAABB is hell slow in 1.8+
// List<EntityPlayer> players = event.world.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(event.x - RANGE, event.y - RANGE, event.z - RANGE, event.x + RANGE, event.y + RANGE, event.z + RANGE));
// for(EntityPlayer player : players)
// if(hasEffect(player)) {
// event.setResult(Result.DENY);
// return;
// }
}
}