diff --git a/src/main/java/com/hbm/blocks/generic/LogicBlock.java b/src/main/java/com/hbm/blocks/generic/LogicBlock.java index 5487f4263..e78a85355 100644 --- a/src/main/java/com/hbm/blocks/generic/LogicBlock.java +++ b/src/main/java/com/hbm/blocks/generic/LogicBlock.java @@ -56,6 +56,11 @@ public class LogicBlock extends BlockContainer { return this != ModBlocks.logic_block_invis; } + @Override + public int getRenderType() { + return this == ModBlocks.logic_block_invis ? -1 : 0; + } + @Override public boolean onBlockActivated(World worldIn, int x, int y, int z, EntityPlayer player, int side, float subX, float subY, float subZ) { TileEntity te = worldIn.getTileEntity(x, y, z); diff --git a/src/main/java/com/hbm/main/ModEventHandler.java b/src/main/java/com/hbm/main/ModEventHandler.java index 2284c4c70..931502cde 100644 --- a/src/main/java/com/hbm/main/ModEventHandler.java +++ b/src/main/java/com/hbm/main/ModEventHandler.java @@ -398,10 +398,10 @@ public class ModEventHandler { MobUtil.equipFullSet(entity, ModItems.hazmat_helmet, ModItems.hazmat_plate, ModItems.hazmat_legs, ModItems.hazmat_boots); return; } - slotPools = MobUtil.slotPoolCommon; + slotPools = MobUtil.slotPoolCommonS; } else if(entity instanceof EntitySkeleton) { - slotPools = MobUtil.slotPoolRanged; + slotPools = MobUtil.slotPoolRangedS; ItemStack bowReplacement = getSkelegun(soot, world.rand); slotPools.put(0, createSlotPool(50, bowReplacement != null ? new Object[][]{{bowReplacement, 1}} : new Object[][]{})); } @@ -506,7 +506,7 @@ public class ModEventHandler { @SubscribeEvent public void onLivingUpdate(LivingUpdateEvent event) { - + if(event.entityLiving instanceof EntityCreeper && event.entityLiving.getEntityData().getBoolean("hfr_defused")) { ItemModDefuser.defuse((EntityCreeper) event.entityLiving, null, false); } @@ -516,7 +516,7 @@ public class ModEventHandler { if(event.entityLiving instanceof EntityPlayerMP && prevArmor != null && event.entityLiving.getHeldItem() != null && (prevArmor[0] == null || prevArmor[0].getItem() != event.entityLiving.getHeldItem().getItem()) && event.entityLiving.getHeldItem().getItem() instanceof IEquipReceiver) { - + ((IEquipReceiver)event.entityLiving.getHeldItem().getItem()).onEquip((EntityPlayer) event.entityLiving, event.entityLiving.getHeldItem()); } @@ -1193,7 +1193,7 @@ public class ModEventHandler { int y = event.y; int z = event.z; World world = event.world; - + if(GeneralConfig.enable528ExplosiveEnergistics && !world.isRemote && event.action == Action.RIGHT_CLICK_BLOCK) { Block b = world.getBlock(x, y, z); String name = Block.blockRegistry.getNameForObject(b); diff --git a/src/main/java/com/hbm/main/StructureManager.java b/src/main/java/com/hbm/main/StructureManager.java index 639f9a402..1fa86803a 100644 --- a/src/main/java/com/hbm/main/StructureManager.java +++ b/src/main/java/com/hbm/main/StructureManager.java @@ -84,7 +84,7 @@ public class StructureManager { public static final NBTStructure plane2 = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/crashed_plane_2.nbt")); public static final NBTStructure factory = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/factory.nbt")); - public static final NBTStructure crane = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/crane.nbt")); + public static final NBTStructure crane = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/crane_mod.nbt")); public static final NBTStructure broadcasting_tower = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/broadcasting_tower.nbt")); public static final NBTStructure excavator = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/excavator.nbt")); diff --git a/src/main/java/com/hbm/util/MobUtil.java b/src/main/java/com/hbm/util/MobUtil.java index 803619357..f16795a0f 100644 --- a/src/main/java/com/hbm/util/MobUtil.java +++ b/src/main/java/com/hbm/util/MobUtil.java @@ -14,7 +14,11 @@ import java.util.*; public class MobUtil { + //for soot mobs + public static Map> slotPoolCommonS = new HashMap<>(); + public static Map> slotPoolRangedS = new HashMap<>(); + //for gob block public static Map> slotPoolCommon = new HashMap<>(); public static Map> slotPoolRanged = new HashMap<>(); @@ -33,25 +37,73 @@ public class MobUtil { public static Map> slotPoolMelee = new HashMap<>(); public static void intializeMobPools(){ - slotPoolCommon.put(4, createSlotPool(8000, new Object[][]{ //new slots, smooth, brushed, no wrinkles // old slots, wrinkled, rusty, not smooth + //soot mobs + slotPoolCommonS.put(4, createSlotPool(8000, new Object[][]{ //new slots, smooth, brushed, no wrinkles // old slots, wrinkled, rusty, not smooth {ModItems.gas_mask_m65, 16}, {ModItems.gas_mask_olde, 12}, {ModItems.mask_of_infamy, 8}, {ModItems.gas_mask_mono, 8}, {ModItems.robes_helmet, 32}, {ModItems.no9, 16}, {ModItems.cobalt_helmet, 2}, {ModItems.rag_piss, 1}, {ModItems.hat, 1}, {ModItems.alloy_helmet, 2}, {ModItems.titanium_helmet, 4}, {ModItems.steel_helmet, 8} })); - slotPoolCommon.put(3, createSlotPool(7000, new Object[][]{ + slotPoolCommonS.put(3, createSlotPool(7000, new Object[][]{ {ModItems.starmetal_plate, 1}, {ModItems.cobalt_plate, 2}, {ModItems.robes_plate, 32}, {ModItems.jackt, 32}, {ModItems.jackt2, 32}, {ModItems.alloy_plate, 2}, {ModItems.steel_plate, 2} })); - slotPoolCommon.put(2, createSlotPool(7000, new Object[][]{ + slotPoolCommonS.put(2, createSlotPool(7000, new Object[][]{ {ModItems.zirconium_legs, 1}, {ModItems.cobalt_legs, 2}, {ModItems.steel_legs, 16}, {ModItems.titanium_legs, 8}, {ModItems.robes_legs, 32}, {ModItems.alloy_legs, 2} })); - slotPoolCommon.put(1, createSlotPool(7000, new Object[][]{ + slotPoolCommonS.put(1, createSlotPool(7000, new Object[][]{ {ModItems.robes_boots, 32}, {ModItems.steel_boots, 16}, {ModItems.cobalt_boots, 2}, {ModItems.alloy_boots, 2} })); - slotPoolCommon.put(0, createSlotPool(10000, new Object[][]{ + slotPoolCommonS.put(0, createSlotPool(10000, new Object[][]{ + {ModItems.pipe_lead, 30}, {ModItems.crowbar, 25}, {ModItems.geiger_counter, 20}, + {ModItems.reer_graar, 16}, {ModItems.steel_pickaxe, 12}, {ModItems.stopsign, 10}, + {ModItems.sopsign, 8}, {ModItems.chernobylsign, 6}, {ModItems.steel_sword, 15}, + {ModItems.titanium_sword, 8}, {ModItems.lead_gavel, 4}, {ModItems.wrench_flipped, 2}, + {ModItems.wrench, 20} + })); + + slotPoolRangedS.put(4, createSlotPool(8000, new Object[][]{ + {ModItems.gas_mask_m65, 16}, {ModItems.gas_mask_olde, 12}, {ModItems.mask_of_infamy, 8}, + {ModItems.gas_mask_mono, 8}, {ModItems.robes_helmet, 32}, {ModItems.no9, 16}, + {ModItems.rag_piss, 1}, {ModItems.goggles, 1}, {ModItems.alloy_helmet, 2}, + {ModItems.titanium_helmet, 4}, {ModItems.steel_helmet, 8} + })); + slotPoolRangedS.put(3, createSlotPool(7000, new Object[][]{ + {ModItems.starmetal_plate, 1}, {ModItems.cobalt_plate, 2}, {ModItems.alloy_plate, 2}, //sadly they cant wear jackets bc it breaks it + {ModItems.steel_plate, 8}, {ModItems.titanium_plate, 4} + })); + slotPoolRangedS.put(2, createSlotPool(7000, new Object[][]{ + {ModItems.zirconium_legs, 1}, {ModItems.cobalt_legs, 2}, {ModItems.steel_legs, 16}, + {ModItems.titanium_legs, 8}, {ModItems.robes_legs, 32}, {ModItems.alloy_legs, 2}, + })); + slotPoolRangedS.put(1, createSlotPool(10000, new Object[][]{ + {ModItems.robes_boots, 32}, {ModItems.steel_boots, 16}, {ModItems.cobalt_boots, 2}, {ModItems.alloy_boots, 2}, + {ModItems.titanium_boots, 6} + })); + + //gob block + //soot mobs + slotPoolCommon.put(4, createSlotPool(0, new Object[][]{ //new slots, smooth, brushed, no wrinkles // old slots, wrinkled, rusty, not smooth + {ModItems.gas_mask_m65, 16}, {ModItems.gas_mask_olde, 12}, {ModItems.mask_of_infamy, 8}, + {ModItems.gas_mask_mono, 8}, {ModItems.robes_helmet, 32}, {ModItems.no9, 16}, + {ModItems.cobalt_helmet, 2}, {ModItems.rag_piss, 1}, {ModItems.hat, 1}, {ModItems.alloy_helmet, 2}, + {ModItems.titanium_helmet, 4}, {ModItems.steel_helmet, 8} + })); + slotPoolCommon.put(3, createSlotPool(10, new Object[][]{ + {ModItems.starmetal_plate, 1}, {ModItems.cobalt_plate, 2}, {ModItems.robes_plate, 32}, + {ModItems.jackt, 32}, {ModItems.jackt2, 32}, {ModItems.alloy_plate, 2}, + {ModItems.steel_plate, 2} + })); + slotPoolCommon.put(2, createSlotPool(20, new Object[][]{ + {ModItems.zirconium_legs, 1}, {ModItems.cobalt_legs, 2}, {ModItems.steel_legs, 16}, + {ModItems.titanium_legs, 8}, {ModItems.robes_legs, 32}, {ModItems.alloy_legs, 2} + })); + slotPoolCommon.put(1, createSlotPool(10, new Object[][]{ + {ModItems.robes_boots, 32}, {ModItems.steel_boots, 16}, {ModItems.cobalt_boots, 2}, {ModItems.alloy_boots, 2} + })); + slotPoolCommon.put(0, createSlotPool(1000, new Object[][]{ {ModItems.pipe_lead, 30}, {ModItems.crowbar, 25}, {ModItems.geiger_counter, 20}, {ModItems.reer_graar, 16}, {ModItems.steel_pickaxe, 12}, {ModItems.stopsign, 10}, {ModItems.sopsign, 8}, {ModItems.chernobylsign, 6}, {ModItems.steel_sword, 15}, @@ -78,6 +130,7 @@ public class MobUtil { {ModItems.titanium_boots, 6} })); + //soot guns slotPoolGuns.put(0.3, createSlotPool(new Object[][]{ {ModItems.gun_light_revolver, 16}, {ModItems.gun_greasegun, 8}, {ModItems.gun_maresleg, 2} })); @@ -111,9 +164,9 @@ public class MobUtil { {ModItems.t51_boots, 4}, {ModItems.hazmat_boots, 6}, {ModItems.robes_boots, 8} })); - slotPoolAdv.put(0, createSlotPool(new Object[][]{ - {ModItems.pipe_lead, 20}, {ModItems.crowbar, 30}, {ModItems.geiger_counter, 20}, - {ModItems.reer_graar, 20}, {ModItems.wrench_flipped, 12}, {ModItems.stopsign, 16}, + slotPoolAdv.put(0, createSlotPool(500,new Object[][]{ + {ModItems.pipe_lead, 20}, {ModItems.crowbar, 10}, {ModItems.geiger_counter, 10}, + {ModItems.reer_graar, 20}, {ModItems.wrench_flipped, 20}, {ModItems.stopsign, 16}, {ModItems.sopsign, 4}, {ModItems.chernobylsign, 16}, {ModItems.titanium_sword, 18}, {ModItems.lead_gavel, 8}, {ModItems.wrench, 20} diff --git a/src/main/java/com/hbm/world/gen/util/LogicBlockActions.java b/src/main/java/com/hbm/world/gen/util/LogicBlockActions.java index 2a9db50d0..0aebf583b 100644 --- a/src/main/java/com/hbm/world/gen/util/LogicBlockActions.java +++ b/src/main/java/com/hbm/world/gen/util/LogicBlockActions.java @@ -2,7 +2,6 @@ package com.hbm.world.gen.util; import com.hbm.blocks.BlockDummyable; import com.hbm.blocks.ModBlocks; -import com.hbm.blocks.bomb.BlockChargeBase; import com.hbm.blocks.generic.BlockSkeletonHolder; import com.hbm.blocks.generic.LogicBlock; import com.hbm.entity.item.EntityFallingBlockNT; @@ -201,6 +200,14 @@ public class LogicBlockActions { for (int i = 0; i < 3; i++) { EntitySkeleton mob = new EntitySkeleton(world); mob.setPositionAndRotation(x, y, z, 0, 0); + EntityAIFireGun gunTask = new EntityAIFireGun(mob); + gunTask.minWait = 4; + gunTask.maxWait = 5; + gunTask.maxRange = 50; + gunTask.burstTime = 6; + gunTask.inaccuracy = 5F; + gunTask.randomBurst = false; + MobUtil.addFireTask(mob, gunTask); MobUtil.assignItemsToEntity(mob, MobUtil.slotPoolGunsTier2, new Random()); MobUtil.assignItemsToEntity(mob, MobUtil.slotPoolRanged, new Random()); world.spawnEntityInWorld(mob); @@ -221,8 +228,9 @@ public class LogicBlockActions { EntityAIFireGun gunTask = new EntityAIFireGun(mob); gunTask.minWait = 4; gunTask.maxWait = 5; + gunTask.maxRange = 100; gunTask.burstTime = 6; - gunTask.inaccuracy = 5F; + gunTask.inaccuracy = 1F; gunTask.randomBurst = false; MobUtil.addFireTask(mob, gunTask); MobUtil.assignItemsToEntity(mob, MobUtil.slotPoolGunsTier3, new Random()); @@ -436,7 +444,7 @@ public class LogicBlockActions { TileEntity te = world.getTileEntity(x, y + 1, z); if (te instanceof TileEntityCharge) { TileEntityCharge bomb = (TileEntityCharge) te; - bomb.timer = 200; + bomb.timer = 1200; } } @@ -446,6 +454,7 @@ public class LogicBlockActions { TileEntityCharge bomb = (TileEntityCharge) te; bomb.started = true; } + world.setBlock(x, y, z, ModBlocks.block_steel); } diff --git a/src/main/resources/assets/hbm/structures/crane_mod.nbt b/src/main/resources/assets/hbm/structures/crane_mod.nbt index 7a13e830d..fe86cd9b0 100644 Binary files a/src/main/resources/assets/hbm/structures/crane_mod.nbt and b/src/main/resources/assets/hbm/structures/crane_mod.nbt differ