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 fallout affecting things on Y:0 like bedrock ores and oil
|
||||
* 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.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.entity.mob;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.projectile.EntityRubble;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.ResourceManager;
|
||||
@ -9,7 +10,6 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
@ -126,9 +126,9 @@ public class EntityGlyphidDigger extends EntityGlyphid {
|
||||
|
||||
|
||||
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);
|
||||
rubble.posX = x1 + 0.5F;
|
||||
|
||||
@ -325,4 +325,23 @@ public class EntityGlyphidScout extends EntityGlyphid {
|
||||
}
|
||||
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) {
|
||||
EntityGlyphidScout scout = new EntityGlyphidScout(event.world);
|
||||
//escort for the scout, which can also deal with obstacles
|
||||
EntityGlyphidDigger digger = new EntityGlyphidDigger(event.world);
|
||||
scout.setLocationAndAngles(event.x, event.y, event.z, event.world.rand.nextFloat() * 360.0F, 0.0F);
|
||||
digger.setLocationAndAngles(event.x, event.y, event.z, event.world.rand.nextFloat() * 360.0F, 0.0F);
|
||||
event.world.spawnEntityInWorld(scout);
|
||||
event.world.spawnEntityInWorld(digger);
|
||||
if(scout.isValidLightLevel()) {
|
||||
//escort for the scout, which can also deal with obstacles
|
||||
EntityGlyphidDigger digger = new EntityGlyphidDigger(event.world);
|
||||
scout.setLocationAndAngles(event.x, event.y, event.z, event.world.rand.nextFloat() * 360.0F, 0.0F);
|
||||
digger.setLocationAndAngles(event.x, event.y, event.z, event.world.rand.nextFloat() * 360.0F, 0.0F);
|
||||
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