mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
commit
0916aa9b17
@ -7,6 +7,7 @@ import static net.minecraftforge.common.util.ForgeDirection.WEST;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import com.hbm.world.gen.nbt.INBTBlockTransformable;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -20,7 +21,7 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockChain extends Block {
|
||||
public class BlockChain extends Block implements INBTBlockTransformable {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconEnd;
|
||||
@ -201,4 +202,12 @@ public class BlockChain extends Block {
|
||||
|
||||
super.onNeighborBlockChange(world, x, y, z, block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int transformMeta(int meta, int coordBaseMode) {
|
||||
if (coordBaseMode == 0) return meta;
|
||||
if (meta == 0) return meta;
|
||||
if (meta == 1) return meta;
|
||||
return INBTBlockTransformable.transformMetaDeco(meta, coordBaseMode);
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ import com.hbm.tileentity.network.TileEntityCableBaseNT;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import com.hbm.world.gen.nbt.INBTBlockTransformable;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -37,7 +38,7 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BlockCableGauge extends BlockContainer implements IBlockMultiPass, ILookOverlay, ITooltipProvider {
|
||||
public class BlockCableGauge extends BlockContainer implements IBlockMultiPass, INBTBlockTransformable, ILookOverlay, ITooltipProvider {
|
||||
|
||||
@SideOnly(Side.CLIENT) protected IIcon overlayGauge;
|
||||
|
||||
@ -84,6 +85,11 @@ public class BlockCableGauge extends BlockContainer implements IBlockMultiPass,
|
||||
this.addStandardInfo(stack, player, list, ext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int transformMeta(int meta, int coordBaseMode) {
|
||||
return INBTBlockTransformable.transformMetaDeco(meta, coordBaseMode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
|
||||
@ -178,5 +184,6 @@ public class BlockCableGauge extends BlockContainer implements IBlockMultiPass,
|
||||
if((PREFIX_VALUE + "deltasecond").equals(name)) return "" + deltaLastSecond;
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ import com.hbm.render.block.RenderBlockMultipass;
|
||||
import com.hbm.tileentity.network.TileEntityPipeBaseNT;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import com.hbm.world.gen.nbt.INBTBlockTransformable;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -37,7 +38,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class FluidDuctGauge extends FluidDuctBase implements IBlockMultiPass, ILookOverlay, ITooltipProvider {
|
||||
public class FluidDuctGauge extends FluidDuctBase implements IBlockMultiPass, INBTBlockTransformable, ILookOverlay, ITooltipProvider {
|
||||
|
||||
@SideOnly(Side.CLIENT) protected IIcon overlay;
|
||||
@SideOnly(Side.CLIENT) protected IIcon overlayGauge;
|
||||
@ -108,6 +109,11 @@ public class FluidDuctGauge extends FluidDuctBase implements IBlockMultiPass, IL
|
||||
return IBlockMultiPass.getRenderType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int transformMeta(int meta, int coordBaseMode) {
|
||||
return INBTBlockTransformable.transformMetaDeco(meta, coordBaseMode);
|
||||
}
|
||||
|
||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||
public static class TileEntityPipeGauge extends TileEntityPipeBaseNT implements SimpleComponent, CompatHandler.OCComponent, IRORValueProvider {
|
||||
|
||||
|
||||
@ -87,7 +87,7 @@ public class WorldConfig {
|
||||
public static int dungeonStructure = 64;
|
||||
public static int relayStructure = 500;
|
||||
public static int satelliteStructure = 500;
|
||||
public static int factoryStructure = 1000;
|
||||
// public static int factoryStructure = 1000;
|
||||
public static int dudStructure = 500;
|
||||
public static int spaceshipStructure = 1000;
|
||||
public static int barrelStructure = 5000;
|
||||
@ -210,7 +210,7 @@ public class WorldConfig {
|
||||
dungeonStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.04_dungeonSpawn", "Spawn library dungeon on every nTH chunk", 64);
|
||||
relayStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.05_relaySpawn", "Spawn relay on every nTH chunk", 500);
|
||||
satelliteStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.06_satelliteSpawn", "Spawn satellite dish on every nTH chunk", 500);
|
||||
factoryStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.09_factorySpawn", "Spawn factory on every nTH chunk", 1000);
|
||||
// factoryStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.09_factorySpawn", "Spawn factory on every nTH chunk", 1000);
|
||||
dudStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.10_dudSpawn", "Spawn dud on every nTH chunk", 500);
|
||||
spaceshipStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.11_spaceshipSpawn", "Spawn spaceship on every nTH chunk", 1000);
|
||||
barrelStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.12_barrelSpawn", "Spawn waste tank on every nTH chunk", 5000);
|
||||
@ -251,7 +251,7 @@ public class WorldConfig {
|
||||
dungeonStructure = CommonConfig.setDefZero(dungeonStructure, 1000);
|
||||
relayStructure = CommonConfig.setDefZero(relayStructure, 1000);
|
||||
satelliteStructure = CommonConfig.setDefZero(satelliteStructure, 1000);
|
||||
factoryStructure = CommonConfig.setDefZero(factoryStructure, 1000);
|
||||
// factoryStructure = CommonConfig.setDefZero(factoryStructure, 1000);
|
||||
dudStructure = CommonConfig.setDefZero(dudStructure, 1000);
|
||||
spaceshipStructure = CommonConfig.setDefZero(spaceshipStructure, 1000);
|
||||
barrelStructure = CommonConfig.setDefZero(barrelStructure, 1000);
|
||||
|
||||
@ -290,13 +290,13 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
if(WorldConfig.factoryStructure > 0 && rand.nextInt(WorldConfig.factoryStructure) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
|
||||
new Factory().generate(world, rand, x, y, z);
|
||||
}
|
||||
// if(WorldConfig.factoryStructure > 0 && rand.nextInt(WorldConfig.factoryStructure) == 0) {
|
||||
// int x = i + rand.nextInt(16);
|
||||
// int z = j + rand.nextInt(16);
|
||||
// int y = world.getHeightValue(x, z);
|
||||
//
|
||||
// new Factory().generate(world, rand, x, y, z);
|
||||
// }
|
||||
|
||||
if(WorldConfig.dudStructure > 0 && rand.nextInt(WorldConfig.dudStructure) == 0) {
|
||||
int x = i + 8 + rand.nextInt(16);
|
||||
|
||||
@ -83,6 +83,8 @@ public class StructureManager {
|
||||
public static final NBTStructure plane1 = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/crashed_plane_1.nbt"));
|
||||
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 spire = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/spire.nbt"));
|
||||
|
||||
// public static final NBTStructure test_rot = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/test-rot.nbt"));
|
||||
|
||||
@ -23,6 +23,14 @@ public class MobUtil {
|
||||
/**Unlike the above two, the Double is interpreted as minimum soot level, instead of armor slot **/
|
||||
public static HashMap<Double, List<WeightedRandomObject>> slotPoolGuns = new HashMap<>();
|
||||
|
||||
//slop pools
|
||||
public static Map<Integer, List<WeightedRandomObject>> slotPoolGunsTier1 = new HashMap<>();
|
||||
public static Map<Integer, List<WeightedRandomObject>> slotPoolGunsTier2 = new HashMap<>();
|
||||
public static Map<Integer, List<WeightedRandomObject>> slotPoolGunsTier3 = new HashMap<>();
|
||||
public static Map<Integer, List<WeightedRandomObject>> slotPoolMasks = new HashMap<>();
|
||||
public static Map<Integer, List<WeightedRandomObject>> slotPoolHelms = new HashMap<>();
|
||||
public static Map<Integer, List<WeightedRandomObject>> slotPoolTierArmor = new HashMap<>();
|
||||
public static Map<Integer, List<WeightedRandomObject>> 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
|
||||
@ -111,6 +119,72 @@ public class MobUtil {
|
||||
{ModItems.wrench, 20}
|
||||
}));
|
||||
|
||||
//For action block
|
||||
slotPoolGunsTier1.put(0, createSlotPool(0, new Object[][]{
|
||||
{ModItems.gun_light_revolver, 16}, {ModItems.gun_greasegun, 8}, {ModItems.gun_maresleg, 2}
|
||||
}));
|
||||
|
||||
slotPoolGunsTier2.put(0, createSlotPool(0, new Object[][]{
|
||||
{ModItems.gun_uzi, 10}, {ModItems.gun_maresleg, 8}, {ModItems.gun_henry, 12}, {ModItems.gun_heavy_revolver, 4}, {ModItems.gun_flaregun, 4}, {ModItems.gun_carbine, 4}
|
||||
}));
|
||||
|
||||
slotPoolGunsTier3.put(0, createSlotPool(0, new Object[][]{
|
||||
{ModItems.gun_uzi, 25}, {ModItems.gun_spas12, 20}, {ModItems.gun_carbine, 20}, {ModItems.gun_g3, 10}, {ModItems.gun_am180, 5}, {ModItems.gun_stg77, 5}
|
||||
}));
|
||||
|
||||
slotPoolMasks.put(4, createSlotPool(0, new Object[][]{
|
||||
{ModItems.gas_mask_m65, 16}, {ModItems.gas_mask_mono, 8}, {ModItems.robes_helmet, 32}, {ModItems.no9, 16},
|
||||
{ModItems.rag_piss, 4}, {ModItems.goggles, 12}
|
||||
}));
|
||||
|
||||
slotPoolHelms.put(4, createSlotPool(0, 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.cobalt_helmet, 2}, {ModItems.hat, 1}, {ModItems.alloy_helmet, 2},
|
||||
{ModItems.titanium_helmet, 4}, {ModItems.steel_helmet, 8}
|
||||
}));
|
||||
|
||||
slotPoolTierArmor.put(4, createSlotPool(new Object[][]{
|
||||
{ModItems.gas_mask_m65, 20},
|
||||
{ModItems.gas_mask_olde, 15},
|
||||
{ModItems.steel_helmet, 25},
|
||||
{ModItems.titanium_helmet, 15},
|
||||
{ModItems.alloy_helmet, 10},
|
||||
}));
|
||||
|
||||
slotPoolTierArmor.put(3, createSlotPool(new Object[][]{
|
||||
{ModItems.steel_plate, 30},
|
||||
{ModItems.titanium_plate, 20},
|
||||
{ModItems.alloy_plate, 15},
|
||||
{ModItems.cobalt_plate, 5},
|
||||
{ModItems.starmetal_plate, 5}
|
||||
}));
|
||||
|
||||
slotPoolTierArmor.put(2, createSlotPool(new Object[][]{
|
||||
{ModItems.steel_legs, 30},
|
||||
{ModItems.titanium_legs, 20},
|
||||
{ModItems.alloy_legs, 15},
|
||||
{ModItems.cobalt_legs, 5},
|
||||
{ModItems.zirconium_legs, 5}
|
||||
}));
|
||||
|
||||
slotPoolTierArmor.put(1, createSlotPool(new Object[][]{
|
||||
{ModItems.steel_boots, 30},
|
||||
{ModItems.robes_boots, 25},
|
||||
{ModItems.titanium_boots, 20},
|
||||
{ModItems.alloy_boots, 15},
|
||||
{ModItems.hazmat_boots, 10},
|
||||
{ModItems.cobalt_boots, 5},
|
||||
}));
|
||||
|
||||
slotPoolMelee.put(0, createSlotPool(2000, new Object[][]{
|
||||
{ModItems.pipe_lead, 40}, {ModItems.crowbar, 35}, {ModItems.wrench, 30},
|
||||
{ModItems.steel_sword, 25}, {ModItems.titanium_sword, 20},
|
||||
{ModItems.reer_graar, 20}, {ModItems.stopsign, 15},
|
||||
{ModItems.lead_gavel, 12}, {ModItems.wrench_flipped, 10},
|
||||
{ModItems.sopsign, 8}, {ModItems.chernobylsign, 8}
|
||||
}));
|
||||
|
||||
slotPoolAdvRanged = new HashMap<>(slotPoolAdv);
|
||||
slotPoolAdvRanged.remove(0);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -188,22 +188,22 @@ public class NTMWorldGenerator implements IWorldGenerator {
|
||||
NBTStructure.registerStructure(0, new SpawnCondition("ruin6") {{
|
||||
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
|
||||
structure = new JigsawPiece("NTMRuinsF", StructureManager.ntmruinsF, -1) {{conformToTerrain = true;}};
|
||||
spawnWeight = 50;
|
||||
spawnWeight = 35;
|
||||
}});
|
||||
NBTStructure.registerStructure(0, new SpawnCondition("ruin7") {{
|
||||
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
|
||||
structure = new JigsawPiece("NTMRuinsG", StructureManager.ntmruinsG, -1) {{conformToTerrain = true;}};
|
||||
spawnWeight = 50;
|
||||
spawnWeight = 35;
|
||||
}});
|
||||
NBTStructure.registerStructure(0, new SpawnCondition("ruin8") {{
|
||||
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
|
||||
structure = new JigsawPiece("NTMRuinsH", StructureManager.ntmruinsH, -1) {{conformToTerrain = true;}};
|
||||
spawnWeight = 50;
|
||||
spawnWeight = 35;
|
||||
}});
|
||||
NBTStructure.registerStructure(0, new SpawnCondition("ruin9") {{
|
||||
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
|
||||
structure = new JigsawPiece("NTMRuinsI", StructureManager.ntmruinsI, -1) {{conformToTerrain = true;}};
|
||||
spawnWeight = 50;
|
||||
spawnWeight = 35;
|
||||
}});
|
||||
NBTStructure.registerStructure(0, new SpawnCondition("ruin10") {{
|
||||
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
|
||||
@ -215,6 +215,11 @@ public class NTMWorldGenerator implements IWorldGenerator {
|
||||
structure = new JigsawPiece("radio_house", StructureManager.radio_house, -6);
|
||||
spawnWeight = 30;
|
||||
}});
|
||||
NBTStructure.registerStructure(0, new SpawnCondition("factory") {{
|
||||
canSpawn = flatbiomes::contains;
|
||||
structure = new JigsawPiece("factory", StructureManager.factory, -6);
|
||||
spawnWeight = 30;
|
||||
}});
|
||||
|
||||
NBTStructure.registerNullWeight(0, 2, biome -> biome == BiomeGenBase.plains);
|
||||
NBTStructure.registerNullWeight(0, 4, oceanBiomes::contains);
|
||||
|
||||
@ -18,6 +18,7 @@ import com.hbm.world.WorldUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.entity.monster.EntityZombie;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@ -111,8 +112,8 @@ public class LogicBlockActions {
|
||||
}
|
||||
}
|
||||
}
|
||||
world.setBlock(x, y, z, ModBlocks.block_steel);
|
||||
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
// world.setBlock(x, y, z, ModBlocks.block_steel); this is useless
|
||||
};
|
||||
|
||||
public static Consumer<LogicBlock.TileEntityLogicBlock> FODDER_WAVE = (tile) -> {
|
||||
@ -134,6 +135,89 @@ public class LogicBlockActions {
|
||||
}
|
||||
};
|
||||
|
||||
public static Consumer<LogicBlock.TileEntityLogicBlock> SKELETON_GUN_TIER_1 = (tile) -> {
|
||||
World world = tile.getWorldObj();
|
||||
int x = tile.xCoord;
|
||||
int y = tile.yCoord;
|
||||
int z = tile.zCoord;
|
||||
if (tile.phase == 1) {
|
||||
Vec3NT vec = new Vec3NT(0, 0, 0);
|
||||
EntitySkeleton mob = new EntitySkeleton(world);
|
||||
mob.setPositionAndRotation(x, y, z, 0, 0);
|
||||
MobUtil.assignItemsToEntity(mob, MobUtil.slotPoolGunsTier1, new Random());
|
||||
MobUtil.assignItemsToEntity(mob, MobUtil.slotPoolMasks, new Random());
|
||||
MobUtil.assignItemsToEntity(mob, MobUtil.slotPoolRanged, new Random());
|
||||
world.spawnEntityInWorld(mob);
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
}
|
||||
};
|
||||
|
||||
public static Consumer<LogicBlock.TileEntityLogicBlock> SKELETON_GUN_TIER_2 = (tile) -> {
|
||||
World world = tile.getWorldObj();
|
||||
int x = tile.xCoord;
|
||||
int y = tile.yCoord;
|
||||
int z = tile.zCoord;
|
||||
if (tile.phase == 1) {
|
||||
Vec3NT vec = new Vec3NT(0, 0, 0);
|
||||
EntitySkeleton mob = new EntitySkeleton(world);
|
||||
mob.setPositionAndRotation(x, y, z, 0, 0);
|
||||
MobUtil.assignItemsToEntity(mob, MobUtil.slotPoolGunsTier2, new Random());
|
||||
MobUtil.assignItemsToEntity(mob, MobUtil.slotPoolMasks, new Random());
|
||||
MobUtil.assignItemsToEntity(mob, MobUtil.slotPoolTierArmor, new Random());
|
||||
world.spawnEntityInWorld(mob);
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
}
|
||||
};
|
||||
|
||||
public static Consumer<LogicBlock.TileEntityLogicBlock> SKELETON_GUN_TIER_3 = (tile) -> {
|
||||
World world = tile.getWorldObj();
|
||||
int x = tile.xCoord;
|
||||
int y = tile.yCoord;
|
||||
int z = tile.zCoord;
|
||||
if (tile.phase == 1) {
|
||||
Vec3NT vec = new Vec3NT(0, 0, 0);
|
||||
EntitySkeleton mob = new EntitySkeleton(world);
|
||||
mob.setPositionAndRotation(x, y, z, 0, 0);
|
||||
MobUtil.assignItemsToEntity(mob, MobUtil.slotPoolGunsTier3, new Random());
|
||||
MobUtil.assignItemsToEntity(mob, MobUtil.slotPoolMasks, new Random());
|
||||
MobUtil.assignItemsToEntity(mob, MobUtil.slotPoolAdvRanged, new Random());
|
||||
world.spawnEntityInWorld(mob);
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
}
|
||||
};
|
||||
|
||||
public static Consumer<LogicBlock.TileEntityLogicBlock> ZOMBIE_TIER_1 = (tile) -> {
|
||||
World world = tile.getWorldObj();
|
||||
int x = tile.xCoord;
|
||||
int y = tile.yCoord;
|
||||
int z = tile.zCoord;
|
||||
if (tile.phase == 1) {
|
||||
Vec3NT vec = new Vec3NT(0, 0, 0);
|
||||
EntityZombie mob = new EntityZombie(world);
|
||||
mob.setPositionAndRotation(x, y, z, 0, 0);
|
||||
MobUtil.assignItemsToEntity(mob, MobUtil.slotPoolMelee, new Random());
|
||||
MobUtil.assignItemsToEntity(mob, MobUtil.slotPoolTierArmor, new Random());
|
||||
world.spawnEntityInWorld(mob);
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
}
|
||||
};
|
||||
|
||||
public static Consumer<LogicBlock.TileEntityLogicBlock> ZOMBIE_TIER_2 = (tile) -> {
|
||||
World world = tile.getWorldObj();
|
||||
int x = tile.xCoord;
|
||||
int y = tile.yCoord;
|
||||
int z = tile.zCoord;
|
||||
if (tile.phase == 1) {
|
||||
Vec3NT vec = new Vec3NT(0, 0, 0);
|
||||
EntityZombie mob = new EntityZombie(world);
|
||||
mob.setPositionAndRotation(x, y, z, 0, 0);
|
||||
MobUtil.assignItemsToEntity(mob, MobUtil.slotPoolTierArmor, new Random());
|
||||
MobUtil.assignItemsToEntity(mob, MobUtil.slotPoolMelee, new Random());
|
||||
world.spawnEntityInWorld(mob);
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
}
|
||||
};
|
||||
|
||||
public static Consumer<LogicBlock.TileEntityLogicBlock> PUZZLE_TEST = (tile) -> {
|
||||
World world = tile.getWorldObj();
|
||||
int x = tile.xCoord;
|
||||
@ -261,8 +345,14 @@ public class LogicBlockActions {
|
||||
actions.put("PUZZLE_TEST", PUZZLE_TEST);
|
||||
actions.put("MISSILE_STRIKE", MISSILE_STRIKE);
|
||||
actions.put("IRRADIATE_ENTITIES_AOE", RAD_CONTAINMENT_SYSTEM);
|
||||
|
||||
//Mob Block Actions
|
||||
actions.put("SKELETON_GUN_TIER_1", SKELETON_GUN_TIER_1);
|
||||
actions.put("SKELETON_GUN_TIER_2", SKELETON_GUN_TIER_2);
|
||||
actions.put("SKELETON_GUN_TIER_3", SKELETON_GUN_TIER_3);
|
||||
|
||||
actions.put("ZOMBIE_TIER_1", ZOMBIE_TIER_1);
|
||||
actions.put("ZOMBIE_TIER_2", ZOMBIE_TIER_2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -51,6 +51,14 @@ public class LogicBlockConditions {
|
||||
return !world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y - 2, z + 1).expand(5, 5, 5)).isEmpty();
|
||||
};
|
||||
|
||||
public static Function<LogicBlock.TileEntityLogicBlock, Boolean> PLAYER_CUBE_25 = (tile) -> {
|
||||
World world = tile.getWorldObj();
|
||||
int x = tile.xCoord;
|
||||
int y = tile.yCoord;
|
||||
int z = tile.zCoord;
|
||||
return !world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y - 2, z + 1).expand(25, 25, 25)).isEmpty();
|
||||
};
|
||||
|
||||
public static Function<LogicBlock.TileEntityLogicBlock, Boolean> REDSTONE = (tile) -> {
|
||||
World world = tile.getWorldObj();
|
||||
int x = tile.xCoord;
|
||||
@ -90,6 +98,7 @@ public class LogicBlockConditions {
|
||||
conditions.put("EMPTY", EMPTY);
|
||||
conditions.put("ABERRATOR", ABERRATOR);
|
||||
conditions.put("PLAYER_CUBE_5", PLAYER_CUBE_5);
|
||||
conditions.put("PLAYER_CUBE_25", PLAYER_CUBE_25);
|
||||
conditions.put("REDSTONE", REDSTONE);
|
||||
conditions.put("PUZZLE_TEST", PUZZLE_TEST);
|
||||
}
|
||||
|
||||
BIN
src/main/resources/assets/hbm/structures/factory.nbt
Normal file
BIN
src/main/resources/assets/hbm/structures/factory.nbt
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user