Revert "Fixed world event lag and related cauldron crash"

This commit is contained in:
Blood-Asp 2015-12-29 11:57:53 +01:00
parent f0d8454123
commit 177adcbf32

View file

@ -1421,20 +1421,20 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
} }
} }
if ((aEvent.world.getTotalWorldTime() % 100L == 0L) && ((this.mItemDespawnTime != 6000) || (this.mMaxEqualEntitiesAtOneSpot > 0))) { if ((aEvent.world.getTotalWorldTime() % 100L == 0L) && ((this.mItemDespawnTime != 6000) || (this.mMaxEqualEntitiesAtOneSpot > 0))) {
for (Object object : aEvent.world.loadedEntityList) { for (int i = 0; i < aEvent.world.loadedEntityList.size(); i++) {
if (object instanceof Entity) { if ((aEvent.world.loadedEntityList.get(i) instanceof Entity)) {
Entity tEntity = (Entity) object; Entity tEntity = (Entity) aEvent.world.loadedEntityList.get(i);
if ((tEntity instanceof EntityItem) && (this.mItemDespawnTime != 6000) && (((EntityItem) tEntity).lifespan == 6000)) { if (((tEntity instanceof EntityItem)) && (this.mItemDespawnTime != 6000) && (((EntityItem) tEntity).lifespan == 6000)) {
((EntityItem) tEntity).lifespan = this.mItemDespawnTime; ((EntityItem) tEntity).lifespan = this.mItemDespawnTime;
} else if ((tEntity instanceof EntityLivingBase) && (this.mMaxEqualEntitiesAtOneSpot > 0) && (!(tEntity instanceof EntityPlayer)) } else if (((tEntity instanceof EntityLivingBase)) && (this.mMaxEqualEntitiesAtOneSpot > 0) && (!(tEntity instanceof EntityPlayer))
&& (((EntityLivingBase) tEntity).canBePushed()) && (((EntityLivingBase) tEntity).getHealth() > 0.0F)) { && (((EntityLivingBase) tEntity).canBePushed()) && (((EntityLivingBase) tEntity).getHealth() > 0.0F)) {
List<Entity> tList = tEntity.worldObj.getEntitiesWithinAABBExcludingEntity(tEntity, List tList = tEntity.worldObj.getEntitiesWithinAABBExcludingEntity(tEntity,
tEntity.boundingBox.expand(0.20000000298023224D, 0.0D, 0.20000000298023224D)); tEntity.boundingBox.expand(0.20000000298023224D, 0.0D, 0.20000000298023224D));
Class tClass = tEntity.getClass(); Class tClass = tEntity.getClass();
int tEntityCount = 1; int tEntityCount = 1;
if (tList != null) { if (tList != null) {
for (Entity nearbyEntity : tList) { for (int j = 0; j < tList.size(); j++) {
if ((nearbyEntity != null) && (nearbyEntity.getClass() == tClass)) { if ((tList.get(j) != null) && (tList.get(j).getClass() == tClass)) {
tEntityCount++; tEntityCount++;
} }
} }