mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
why are there so many foxes, make it stop
This commit is contained in:
parent
7a36248002
commit
a1c4ef8e04
@ -15,3 +15,6 @@
|
|||||||
* Fixed infinite water barrels voiding water completely after the chemplant's input buffer runs full, infinite barrels can no longer void water in chemplants
|
* Fixed infinite water barrels voiding water completely after the chemplant's input buffer runs full, infinite barrels can no longer void water in chemplants
|
||||||
* Fixed fallout affecting things on Y:0 like bedrock ores and oil
|
* Fixed fallout affecting things on Y:0 like bedrock ores and oil
|
||||||
* Fixed projectiles not being able to pass through open doors
|
* Fixed projectiles not being able to pass through open doors
|
||||||
|
* Fixed material dupe caused by strand caster overflowing
|
||||||
|
* Fixed rampant mode glyphid scout spawn ignoring light level
|
||||||
|
* Fixed glyphid diggers' debris attack being able to break concrete
|
||||||
|
|||||||
@ -23,7 +23,6 @@ import net.minecraft.entity.EntityLivingBase;
|
|||||||
import net.minecraft.entity.EnumCreatureAttribute;
|
import net.minecraft.entity.EnumCreatureAttribute;
|
||||||
import net.minecraft.entity.SharedMonsterAttributes;
|
import net.minecraft.entity.SharedMonsterAttributes;
|
||||||
import net.minecraft.entity.monster.EntityMob;
|
import net.minecraft.entity.monster.EntityMob;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.hbm.entity.mob;
|
package com.hbm.entity.mob;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.entity.projectile.EntityRubble;
|
import com.hbm.entity.projectile.EntityRubble;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.main.ResourceManager;
|
import com.hbm.main.ResourceManager;
|
||||||
@ -9,7 +10,6 @@ import net.minecraft.entity.Entity;
|
|||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.SharedMonsterAttributes;
|
import net.minecraft.entity.SharedMonsterAttributes;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@ -126,9 +126,9 @@ public class EntityGlyphidDigger extends EntityGlyphid {
|
|||||||
|
|
||||||
|
|
||||||
Block b = worldObj.getBlock(x1, y1, z1);
|
Block b = worldObj.getBlock(x1, y1, z1);
|
||||||
float k = b.getExplosionResistance(null);
|
float k = b.getExplosionResistance(this, worldObj, x1, y1, z1, posX, posY, posZ);
|
||||||
|
|
||||||
if (k < 200 && b.isNormalCube()) {
|
if (k < ModBlocks.concrete.getExplosionResistance(this) && b.isNormalCube()) {
|
||||||
|
|
||||||
EntityRubble rubble = new EntityRubble(worldObj);
|
EntityRubble rubble = new EntityRubble(worldObj);
|
||||||
rubble.posX = x1 + 0.5F;
|
rubble.posX = x1 + 0.5F;
|
||||||
|
|||||||
@ -325,4 +325,23 @@ public class EntityGlyphidScout extends EntityGlyphid {
|
|||||||
}
|
}
|
||||||
return PollutionHandler.targetCoords;
|
return PollutionHandler.targetCoords;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Vanilla implementation, minus the RNG */
|
||||||
|
@Override
|
||||||
|
public boolean isValidLightLevel() {
|
||||||
|
int x = MathHelper.floor_double(this.posX);
|
||||||
|
int y = MathHelper.floor_double(this.boundingBox.minY);
|
||||||
|
int z = MathHelper.floor_double(this.posZ);
|
||||||
|
|
||||||
|
int light = this.worldObj.getBlockLightValue(x, y, z);
|
||||||
|
|
||||||
|
if(this.worldObj.isThundering()) {
|
||||||
|
int skylightSubtracted = this.worldObj.skylightSubtracted;
|
||||||
|
this.worldObj.skylightSubtracted = 10;
|
||||||
|
light = this.worldObj.getBlockLightValue(x, y, z);
|
||||||
|
this.worldObj.skylightSubtracted = skylightSubtracted;
|
||||||
|
}
|
||||||
|
|
||||||
|
return light <= 7;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -364,12 +364,14 @@ public class PollutionHandler {
|
|||||||
|
|
||||||
if (soot >= MobConfig.rampantScoutSpawnThresh) {
|
if (soot >= MobConfig.rampantScoutSpawnThresh) {
|
||||||
EntityGlyphidScout scout = new EntityGlyphidScout(event.world);
|
EntityGlyphidScout scout = new EntityGlyphidScout(event.world);
|
||||||
//escort for the scout, which can also deal with obstacles
|
if(scout.isValidLightLevel()) {
|
||||||
EntityGlyphidDigger digger = new EntityGlyphidDigger(event.world);
|
//escort for the scout, which can also deal with obstacles
|
||||||
scout.setLocationAndAngles(event.x, event.y, event.z, event.world.rand.nextFloat() * 360.0F, 0.0F);
|
EntityGlyphidDigger digger = new EntityGlyphidDigger(event.world);
|
||||||
digger.setLocationAndAngles(event.x, event.y, event.z, event.world.rand.nextFloat() * 360.0F, 0.0F);
|
scout.setLocationAndAngles(event.x, event.y, event.z, event.world.rand.nextFloat() * 360.0F, 0.0F);
|
||||||
event.world.spawnEntityInWorld(scout);
|
digger.setLocationAndAngles(event.x, event.y, event.z, event.world.rand.nextFloat() * 360.0F, 0.0F);
|
||||||
event.world.spawnEntityInWorld(digger);
|
event.world.spawnEntityInWorld(scout);
|
||||||
|
event.world.spawnEntityInWorld(digger);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 11 KiB |
Loading…
x
Reference in New Issue
Block a user