forked from xjboss/KCauldronX
Check for valid entities on load stage
This commit is contained in:
parent
bab4bd8b46
commit
31cdc9fe6c
@ -1209,7 +1209,15 @@
|
||||
++i;
|
||||
}
|
||||
}
|
||||
@@ -3314,8 +3971,17 @@
|
||||
@@ -3298,6 +3955,7 @@
|
||||
for (int i = 0; i < p_72868_1_.size(); ++i)
|
||||
{
|
||||
Entity entity = (Entity)p_72868_1_.get(i);
|
||||
+ if (!entity.entityAllowedToSpawn()) continue;
|
||||
if (!MinecraftForge.EVENT_BUS.post(new EntityJoinWorldEvent(entity, this)))
|
||||
{
|
||||
loadedEntityList.add(entity);
|
||||
@@ -3314,8 +3972,17 @@
|
||||
public boolean canPlaceEntityOnSide(Block p_147472_1_, int p_147472_2_, int p_147472_3_, int p_147472_4_, boolean p_147472_5_, int p_147472_6_, Entity p_147472_7_, ItemStack p_147472_8_)
|
||||
{
|
||||
Block block1 = this.getBlock(p_147472_2_, p_147472_3_, p_147472_4_);
|
||||
@ -1228,7 +1236,7 @@
|
||||
}
|
||||
|
||||
public PathEntity getPathEntityToEntity(Entity p_72865_1_, Entity p_72865_2_, float p_72865_3_, boolean p_72865_4_, boolean p_72865_5_, boolean p_72865_6_, boolean p_72865_7_)
|
||||
@@ -3464,6 +4130,12 @@
|
||||
@@ -3464,6 +4131,12 @@
|
||||
for (int i = 0; i < this.playerEntities.size(); ++i)
|
||||
{
|
||||
EntityPlayer entityplayer1 = (EntityPlayer)this.playerEntities.get(i);
|
||||
@ -1241,7 +1249,7 @@
|
||||
double d5 = entityplayer1.getDistanceSq(p_72977_1_, p_72977_3_, p_72977_5_);
|
||||
|
||||
if ((p_72977_7_ < 0.0D || d5 < p_72977_7_ * p_72977_7_) && (d4 == -1.0D || d5 < d4))
|
||||
@@ -3489,7 +4161,12 @@
|
||||
@@ -3489,7 +4162,12 @@
|
||||
for (int i = 0; i < this.playerEntities.size(); ++i)
|
||||
{
|
||||
EntityPlayer entityplayer1 = (EntityPlayer)this.playerEntities.get(i);
|
||||
@ -1255,7 +1263,7 @@
|
||||
if (!entityplayer1.capabilities.disableDamage && entityplayer1.isEntityAlive())
|
||||
{
|
||||
double d5 = entityplayer1.getDistanceSq(p_72846_1_, p_72846_3_, p_72846_5_);
|
||||
@@ -3660,6 +4337,18 @@
|
||||
@@ -3660,6 +4338,18 @@
|
||||
|
||||
public void updateAllPlayersSleepingFlag() {}
|
||||
|
||||
@ -1274,7 +1282,7 @@
|
||||
public float getWeightedThunderStrength(float p_72819_1_)
|
||||
{
|
||||
return (this.prevThunderingStrength + (this.thunderingStrength - this.prevThunderingStrength) * p_72819_1_) * this.getRainStrength(p_72819_1_);
|
||||
@@ -3932,8 +4621,8 @@
|
||||
@@ -3932,8 +4622,8 @@
|
||||
*/
|
||||
public void addTileEntity(TileEntity entity)
|
||||
{
|
||||
@ -1285,7 +1293,7 @@
|
||||
{
|
||||
dest.add(entity);
|
||||
}
|
||||
@@ -4029,4 +4718,73 @@
|
||||
@@ -4029,4 +4719,73 @@
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user