Merge pull request #2031 from Lazzzycatwastaken/AAAAAAAAAAAAAAA

im mining my naval
This commit is contained in:
HbmMods 2025-03-31 08:24:44 +02:00 committed by GitHub
commit 54d2314496
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 9777 additions and 2288 deletions

View File

@ -265,6 +265,7 @@ public class ModBlocks {
public static Block deco_tungsten;
public static Block deco_aluminium;
public static Block deco_steel;
public static Block deco_rusty_steel;
public static Block deco_lead;
public static Block deco_beryllium;
public static Block deco_asbestos;
@ -557,6 +558,7 @@ public class ModBlocks {
public static Block mine_he;
public static Block mine_shrap;
public static Block mine_fat;
public static Block mine_naval;
public static Block crate;
public static Block crate_weapon;
@ -1455,6 +1457,7 @@ public class ModBlocks {
deco_tungsten = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_tungsten").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_tungsten");
deco_aluminium = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_aluminium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_aluminium");
deco_steel = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_steel").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_steel");
deco_rusty_steel = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_rusty_steel").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_rusty_steel");
deco_lead = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_lead").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_lead");
deco_beryllium = new BlockDecoCT(Material.iron).noFortune().setBlockName("deco_beryllium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_beryllium");
deco_asbestos = new BlockOutgas(Material.cloth, true, 5, true).noFortune().setBlockName("deco_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_asbestos");
@ -1745,6 +1748,7 @@ public class ModBlocks {
mine_he = new Landmine(Material.iron, 2D, 5D).setBlockName("mine_he").setCreativeTab(MainRegistry.nukeTab).setHardness(1.0F).setBlockTextureName(RefStrings.MODID + ":mine_he");
mine_shrap = new Landmine(Material.iron, 1.5D, 1D).setBlockName("mine_shrap").setCreativeTab(MainRegistry.nukeTab).setHardness(1.0F).setBlockTextureName(RefStrings.MODID + ":mine_shrap");
mine_fat = new Landmine(Material.iron, 2.5D, 1D).setBlockName("mine_fat").setCreativeTab(MainRegistry.nukeTab).setHardness(1.0F).setBlockTextureName(RefStrings.MODID + ":mine_fat");
mine_naval = new Landmine(Material.iron, 2.5D, 1D).setBlockName("mine_naval").setCreativeTab(MainRegistry.nukeTab).setHardness(1.0F).setBlockTextureName(RefStrings.MODID + ":mine_naval");
dynamite = new BlockDynamite().setBlockName("dynamite").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.nukeTab).setHardness(0.0F).setBlockTextureName(RefStrings.MODID + ":dynamite");
tnt = new BlockTNT().setBlockName("tnt_ntm").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.nukeTab).setHardness(0.0F).setBlockTextureName(RefStrings.MODID + ":tnt");
semtex = new BlockSemtex().setBlockName("semtex").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.nukeTab).setHardness(0.0F).setBlockTextureName(RefStrings.MODID + ":semtex");
@ -2603,6 +2607,7 @@ public class ModBlocks {
GameRegistry.registerBlock(deco_tungsten, deco_tungsten.getUnlocalizedName());
GameRegistry.registerBlock(deco_aluminium, deco_aluminium.getUnlocalizedName());
GameRegistry.registerBlock(deco_steel, deco_steel.getUnlocalizedName());
GameRegistry.registerBlock(deco_rusty_steel, deco_rusty_steel.getUnlocalizedName());
GameRegistry.registerBlock(deco_lead, deco_lead.getUnlocalizedName());
GameRegistry.registerBlock(deco_beryllium, deco_beryllium.getUnlocalizedName());
GameRegistry.registerBlock(deco_asbestos, deco_asbestos.getUnlocalizedName());
@ -2898,6 +2903,7 @@ public class ModBlocks {
GameRegistry.registerBlock(mine_shrap, mine_shrap.getUnlocalizedName());
GameRegistry.registerBlock(mine_he, mine_he.getUnlocalizedName());
GameRegistry.registerBlock(mine_fat, mine_fat.getUnlocalizedName());
GameRegistry.registerBlock(mine_naval, mine_naval.getUnlocalizedName());
//Block Bombs
GameRegistry.registerBlock(flame_war, flame_war.getUnlocalizedName());

View File

@ -26,6 +26,7 @@ import net.minecraft.block.BlockFence;
import net.minecraft.block.material.Material;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@ -67,8 +68,7 @@ public class Landmine extends BlockContainer implements IBomb {
if(this == ModBlocks.mine_ap) this.setBlockBounds(5 * f, 0.0F, 5 * f, 11 * f, 1 * f, 11 * f);
if(this == ModBlocks.mine_he) this.setBlockBounds(4 * f, 0.0F, 4 * f, 12 * f, 2 * f, 12 * f);
if(this == ModBlocks.mine_shrap) this.setBlockBounds(5 * f, 0.0F, 5 * f, 11 * f, 1 * f, 11 * f);
if(this == ModBlocks.mine_fat) this.setBlockBounds(5 * f, 0.0F, 4 * f, 11 * f, 6 * f, 12 * f);
}
if(this == ModBlocks.mine_fat) this.setBlockBounds(5 * f, 0.0F, 4 * f, 11 * f, 6 * f, 12 * f);}
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
@ -133,6 +133,18 @@ public class Landmine extends BlockContainer implements IBomb {
return false;
}
public boolean isWaterAbove(World world, int x, int y, int z) {
for(int xo = -1; xo <= 1; xo++) {
for(int zo = -1; zo <= 1; zo++) {
Block blockAbove = world.getBlock(x + xo, y + 1, z + zo);
if(blockAbove == Blocks.water || blockAbove == Blocks.flowing_water) {
return true;
}
}
}
return false;
}
@Override
public BombReturnCode explode(World world, int x, int y, int z) {
@ -162,24 +174,42 @@ public class Landmine extends BlockContainer implements IBomb {
vnt.setPlayerProcessor(new PlayerProcessorStandard());
vnt.setSFX(new ExplosionEffectWeapon(5, 1F, 0.5F));
vnt.explode();
ExplosionLarge.spawnShrapnelShower(world, x + 0.5, y + 0.5, z + 0.5, 0, 1D, 0, 45, 0.2D);
ExplosionLarge.spawnShrapnels(world, x + 0.5, y + 0.5, z + 0.5, 5);
} else if(this == ModBlocks.mine_naval) {
ExplosionVNT vnt = new ExplosionVNT(world, x + 5, y + 5, z + 5, 25F);
vnt.setBlockAllocator(new BlockAllocatorStandard(64));
vnt.setBlockProcessor(new BlockProcessorStandard());
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(0.5, ServerConfig.MINE_NAVAL_DAMAGE.get()).setupPiercing(5F, 0.2F));
vnt.setPlayerProcessor(new PlayerProcessorStandard());
vnt.setSFX(new ExplosionEffectWeapon(10, 1F, 0.5F));
vnt.explode();
ExplosionLarge.spawnParticlesRadial(world, x + 0.5, y + 2, z + 0.5, 30);
ExplosionLarge.spawnRubble(world,x + 0.5, y + 0.5, z + 0.5, 5 );
// Only spawn water effects if there's water above the mine
if (isWaterAbove(world, x, y, z)) {
ExplosionLarge.spawnFoam(world, x + 0.5, y + 0.5, z + 0.5, 60);
}
} else if(this == ModBlocks.mine_fat) {
ExplosionVNT vnt = new ExplosionVNT(world, x + 0.5, y + 0.5, z + 0.5, 10);
vnt.setBlockAllocator(new BlockAllocatorStandard(64));
vnt.setBlockProcessor(new BlockProcessorStandard());
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(2, ServerConfig.MINE_NUKE_DAMAGE.get()).withRangeMod(1.5F));
vnt.setPlayerProcessor(new PlayerProcessorStandard());
vnt.explode();
XFactoryCatapult.incrementRad(world, x, y, z, 1.5F);
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "muke");
data.setBoolean("balefire", MainRegistry.polaroidID == 11 || world.rand.nextInt(100) == 0);
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x + 0.5, y + 0.5, z + 0.5), new TargetPoint(world.provider.dimensionId, x + 0.5, y + 0.5, z + 0.5, 250));
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:weapon.mukeExplosion", 25.0F, 0.9F); // this has to be the single worst solution ever
}
}

View File

@ -15,6 +15,7 @@ public class ServerConfig extends RunningConfig {
public static ConfigWrapper<Float> MINE_HE_DAMAGE = new ConfigWrapper(35F);
public static ConfigWrapper<Float> MINE_SHRAP_DAMAGE = new ConfigWrapper(7.5F);
public static ConfigWrapper<Float> MINE_NUKE_DAMAGE = new ConfigWrapper(100F);
public static ConfigWrapper<Float> MINE_NAVAL_DAMAGE = new ConfigWrapper(60F);
public static ConfigWrapper<Boolean> TAINT_TRAILS = new ConfigWrapper(false);
private static void initDefaults() {
@ -23,6 +24,7 @@ public class ServerConfig extends RunningConfig {
configMap.put("MINE_HE_DAMAGE", MINE_HE_DAMAGE);
configMap.put("MINE_SHRAP_DAMAGE", MINE_SHRAP_DAMAGE);
configMap.put("MINE_NUKE_DAMAGE", MINE_NUKE_DAMAGE);
configMap.put("MINE_NAVAL_DAMAGE", MINE_NAVAL_DAMAGE);
configMap.put("TAINT_TRAILS", TAINT_TRAILS);
}

View File

@ -40,6 +40,15 @@ public class ExplosionLarge {
PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(data, x, y, z), new TargetPoint(world.provider.dimensionId, x, y, z, 250));
}
public static void spawnFoam(World world, double x, double y, double z, int count) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "smoke");
data.setString("mode", "foamSplash");
data.setInteger("count", count);
PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(data, x, y, z), new TargetPoint(world.provider.dimensionId, x, y, z, 250));
}
public static void spawnShock(World world, double x, double y, double z, int count, double strength) {
NBTTagCompound data = new NBTTagCompound();

View File

@ -46,18 +46,18 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class AssemblerRecipes extends SerializableRecipe {
public static HashMap<ComparableStack, AssemblerRecipe> recipes = new HashMap();
public static List<ComparableStack> recipeList = new ArrayList();
/** Legacy NOP, WarTec needs this */
public static void loadRecipes() { }
@Override
public void registerDefaults() {
boolean exp = GeneralConfig.enableExpensiveMode;
makeRecipe(new ComparableStack(ModItems.plate_iron, 2), new AStack[] {new OreDictStack(IRON.ingot(), 3), },30);
makeRecipe(new ComparableStack(ModItems.plate_gold, 2), new AStack[] {new OreDictStack(GOLD.ingot(), 3), },30);
makeRecipe(new ComparableStack(ModItems.plate_titanium, 2), new AStack[] {new OreDictStack(TI.ingot(), 3), },30);
@ -153,6 +153,7 @@ public class AssemblerRecipes extends SerializableRecipe {
makeRecipe(new ComparableStack(ModBlocks.watz_element, 3), new AStack[] {new OreDictStack(STEEL.plateCast(), 2), new OreDictStack(ZR.ingot(), 2), new OreDictStack(BIGMT.ingot(), 2), new OreDictStack(ANY_HARDPLASTIC.ingot(), 4)},200);
makeRecipe(new ComparableStack(ModBlocks.watz_cooler, 3), new AStack[] {new OreDictStack(STEEL.plateCast(), 2), new OreDictStack(CU.plateCast(), 4), new OreDictStack(RUBBER.ingot(), 2), }, 200);
makeRecipe(new ComparableStack(ModBlocks.watz_end, 3), new AStack[] {new OreDictStack(ANY_RESISTANTALLOY.plateWelded()), new OreDictStack(B.ingot(), 3), new OreDictStack(STEEL.plateWelded(), 2), }, 100);
makeRecipe(new ComparableStack(ModBlocks.mine_naval, 1), new AStack[] {new ComparableStack(ModItems.sphere_steel, 1), new ComparableStack(ModItems.pipes_steel, 1), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new ComparableStack(ModBlocks.block_semtex, 5)},300);
makeRecipe(new ComparableStack(ModBlocks.nuke_gadget, 1), new AStack[] {new ComparableStack(ModItems.sphere_steel, 1), new ComparableStack(ModItems.fins_flat, 2), new ComparableStack(ModItems.pedestal_steel, 1), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.CONTROLLER), new OreDictStack("dyeGray", 8), },300);
makeRecipe(new ComparableStack(ModBlocks.nuke_boy, 1), new AStack[] {new OreDictStack(STEEL.shell(), 2), new ComparableStack(ModItems.fins_small_steel, 1), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.CONTROLLER), new OreDictStack("dyeBlue", 4), },300);
makeRecipe(new ComparableStack(ModBlocks.nuke_man, 1), new AStack[] {new ComparableStack(ModItems.sphere_steel, 1), new OreDictStack(STEEL.shell(), 2), new ComparableStack(ModItems.fins_big_steel, 1), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.CONTROLLER), new OreDictStack("dyeYellow", 6), },300);
@ -187,7 +188,7 @@ public class AssemblerRecipes extends SerializableRecipe {
makeRecipe(new ComparableStack(ModItems.boy_shielding, 1), new AStack[] {new OreDictStack(OreDictManager.getReflector(), 12), new OreDictStack(STEEL.plate528(), 4), },150);
makeRecipe(new ComparableStack(ModItems.boy_target, 1), new AStack[] {new OreDictStack(U235.nugget(), 18), },200);
makeRecipe(new ComparableStack(ModItems.boy_bullet, 1), new AStack[] {new OreDictStack(U235.nugget(), 9), },100);
makeRecipe(new ComparableStack(ModItems.boy_propellant, 1), new AStack[] {new ComparableStack(ModItems.cordite, 8), new OreDictStack(IRON.plate528(), 8), new OreDictStack(AL.plate528(), 4), new OreDictStack(MINGRADE.wireFine(), 4), },100);
makeRecipe(new ComparableStack(ModItems.boy_propellant, 1), new AStack[] {new ComparableStack(ModItems.cordite, 8), new OreDictStack(IRON.plate528(), 8), new OreDictStack(AL.plate528(), 4), new OreDictStack(MINGRADE.wireFine(), 4), },100);
makeRecipe(new ComparableStack(ModItems.boy_igniter, 1), new AStack[] {new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 1), new OreDictStack(AL.plate528(), 6), new OreDictStack(STEEL.plate528(), 1), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()), new OreDictStack(MINGRADE.wireFine(), 3), },150); //HE for gating purposes
makeRecipe(new ComparableStack(ModItems.man_igniter, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 6), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()), new OreDictStack(MINGRADE.wireFine(), 9), },150);
makeRecipe(new ComparableStack(ModItems.man_core, 1), new AStack[] {new OreDictStack(PU239.nugget(), 8), new OreDictStack(BE.nugget(), 2), },250);
@ -264,7 +265,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.circuit, 4, EnumCircuitType.CONTROLLER),
new ComparableStack(ModItems.part_generic, 32, EnumPartType.LDE)
},600);
makeRecipe(new ComparableStack(ModItems.missile_soyuz_lander, 1), new AStack[] {
new OreDictStack(AL.shell(), 4),
new OreDictStack(RUBBER.ingot(), 16),
@ -273,7 +274,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.circuit, 3, EnumCircuitType.CONTROLLER_ADVANCED),
new ComparableStack(ModItems.part_generic, 12, EnumPartType.LDE)
},600, ModItems.journal_bj);
makeRecipe(new ComparableStack(ModItems.sat_base, 1), new AStack[] {
new OreDictStack(RUBBER.ingot(), 12),
new OreDictStack(TI.shell(), 3),
@ -378,7 +379,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.ingot_cft, 16),
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BISMOID),
}, 500);
makeRecipe(new ComparableStack(ModBlocks.machine_fensu, 1), new AStack[] {
new ComparableStack(ModItems.ingot_electronium, 32),
new ComparableStack(ModBlocks.machine_dineutronium_battery, 16),
@ -477,7 +478,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.drillbit, 1, EnumDrillType.STEEL.ordinal()),
new OreDictStack(DIAMOND.dust(), 16)
}, 100);
makeRecipe(new ComparableStack(ModItems.drillbit, 1, EnumDrillType.HSS.ordinal()), new AStack[] {
new OreDictStack(DURA.ingot(), 12),
new OreDictStack(ANY_PLASTIC.ingot(), 12),
@ -487,7 +488,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.drillbit, 1, EnumDrillType.HSS.ordinal()),
new OreDictStack(DIAMOND.dust(), 24)
}, 100);
makeRecipe(new ComparableStack(ModItems.drillbit, 1, EnumDrillType.DESH.ordinal()), new AStack[] {
new OreDictStack(DESH.ingot(), 16),
new OreDictStack(RUBBER.ingot(), 12),
@ -497,7 +498,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.drillbit, 1, EnumDrillType.DESH.ordinal()),
new OreDictStack(DIAMOND.dust(), 32)
}, 100);
makeRecipe(new ComparableStack(ModItems.drillbit, 1, EnumDrillType.TCALLOY.ordinal()), new AStack[] {
new OreDictStack(ANY_RESISTANTALLOY.ingot(), 20),
new OreDictStack(DESH.ingot(), 12),
@ -507,7 +508,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.drillbit, 1, EnumDrillType.TCALLOY.ordinal()),
new OreDictStack(DIAMOND.dust(), 48)
}, 100);
makeRecipe(new ComparableStack(ModItems.drillbit, 1, EnumDrillType.FERRO.ordinal()), new AStack[] {
new OreDictStack(FERRO.ingot(), 24),
new OreDictStack(ANY_RESISTANTALLOY.ingot(), 12),
@ -517,7 +518,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.drillbit, 1, EnumDrillType.FERRO.ordinal()),
new OreDictStack(DIAMOND.dust(), 56)
}, 100);
makeRecipe(new ComparableStack(ModBlocks.machine_large_turbine, 1), new AStack[] {
!exp ? new OreDictStack(STEEL.plate528(), 12) : new OreDictStack(STEEL.heavyComp(), 1),
new OreDictStack(RUBBER.ingot(), 4),
@ -539,7 +540,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new OreDictStack(DURA.pipe(), 16),
new OreDictStack(STEEL.pipe(), 16)
}, 600);
makeRecipe(new ComparableStack(ModBlocks.machine_condenser_powered, 1), new AStack[] {
!exp ? new OreDictStack(STEEL.plateWelded(), 8) : new OreDictStack(STEEL.heavyComp(), 3),
new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 4),
@ -548,7 +549,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new OreDictStack(STEEL.pipe(), 24),
new OreDictStack(Fluids.LUBRICANT.getDict(1_000), 4)
}, 600);
makeRecipe(new ComparableStack(ModBlocks.machine_cyclotron, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_lithium_battery, 3),
new OreDictStack(ND.wireDense(), 32),
@ -560,7 +561,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new OreDictStack(CU.plateCast(), 8),
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BASIC)
}, 600);
makeRecipe(new ComparableStack(ModBlocks.reactor_zirnox, 1), new AStack[] {
!exp ? new OreDictStack(STEEL.shell(), 4) : new OreDictStack(STEEL.heavyComp(), 1),
new OreDictStack(STEEL.pipe(), 8),
@ -591,7 +592,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.circuit, 64, EnumCircuitType.CONTROLLER_QUANTUM),
new ComparableStack(ModItems.coin_ufo, 1),
}, 1200, ModItems.journal_bj);
makeRecipe(new ComparableStack(ModBlocks.vault_door, 1), new AStack[] {
new OreDictStack(STEEL.ingot(), 32),
new OreDictStack(W.ingot(), 32),
@ -602,7 +603,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new OreDictStack(DURA.bolt(), 16),
new ComparableStack(ModItems.motor, 3),
}, 200);
makeRecipe(new ComparableStack(ModBlocks.blast_door, 1), new AStack[] {
new OreDictStack(STEEL.ingot(), 8),
new OreDictStack(W.ingot(), 8),
@ -613,7 +614,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new OreDictStack(DURA.bolt(), 4),
new ComparableStack(ModItems.motor, 1),
}, 300);
makeRecipe(new ComparableStack(ModBlocks.fire_door, 1), new AStack[] {
new OreDictStack(STEEL.ingot(), 8),
new OreDictStack(STEEL.plate(), 8),
@ -728,7 +729,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModBlocks.machine_radar, 1),
new ComparableStack(ModItems.crt_display, 1)
}, 300);
makeRecipe(new ComparableStack(ModItems.ammo_himars, 1, ItemAmmoHIMARS.SMALL), new AStack[] {
new OreDictStack(STEEL.plate(), 24),
new OreDictStack(ANY_PLASTIC.ingot(), 12),
@ -794,7 +795,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new OreDictStack(Fluids.PEROXIDE.getDict(1_000), 16),
new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED),
}, 100);
makeRecipe(new ComparableStack(ModBlocks.machine_silex, 1), new AStack[] {
new ComparableStack(ModBlocks.glass_quartz, 16),
!exp ? new OreDictStack(STEEL.plateCast(), 8) : new OreDictStack(STEEL.heavyComp(), 1),
@ -810,14 +811,14 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CAPACITOR),
new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC)
}, 400);
makeRecipe(new ComparableStack(ModBlocks.rbmk_blank, 1), new AStack[] {
new ComparableStack(ModBlocks.concrete_asbestos, 4),
!exp ? new OreDictStack(STEEL.plate528(), 4) : new OreDictStack(STEEL.plateCast(), 16),
new OreDictStack(CU.ingot(), 4),
new ComparableStack(ModItems.plate_polymer, 4)
}, 100);
makeRecipe(new ComparableStack(ModItems.multitool_hit, 1), new AStack[] {
new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4),
new OreDictStack(STEEL.plate(), 4),
@ -825,7 +826,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.motor, 4),
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CAPACITOR_BOARD)
}, 100);
makeRecipe(new ComparableStack(ModBlocks.machine_assemfac, 1), new AStack[] {
!exp ? new OreDictStack(STEEL.ingot(), 48) : new OreDictStack(STEEL.heavyComp(), 2),
new OreDictStack(ANY_RESISTANTALLOY.ingot(), 8),
@ -837,7 +838,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new OreDictStack(STEEL.pipe(), 8),
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BASIC)
}, 400);
makeRecipe(new ComparableStack(ModBlocks.machine_chemfac, 1), new AStack[] {
!exp ? new OreDictStack(STEEL.ingot(), 48) : new OreDictStack(STEEL.heavyComp(), 2),
new OreDictStack(ANY_RESISTANTALLOY.ingot(), 8),
@ -850,7 +851,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new OreDictStack(STEEL.pipe(), 8),
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BASIC)
}, 400);
makeRecipe(new ComparableStack(ModItems.missile_shuttle, 1), new AStack[] {
new ComparableStack(ModItems.missile_generic, 2),
new ComparableStack(ModItems.missile_strong, 1),
@ -862,7 +863,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new OreDictStack(KEY_ANYPANE, 6),
new OreDictStack(STEEL.plate(), 4),
}, 100);
makeRecipe(new ComparableStack(ModBlocks.machine_difurnace_rtg_off, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_difurnace_off, 1),
new ComparableStack(ModItems.rtg_unit, 3),
@ -982,7 +983,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModBlocks.capacitor_tantalium, 1),
new ComparableStack(ModBlocks.glass_quartz, 16)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.launch_pad_large, 1), new AStack[] {
new OreDictStack(STEEL.plateCast(), 6),
@ -997,7 +998,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new OreDictStack(ANY_HARDPLASTIC.ingot(), 16),
new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED)
}, 400);
makeRecipe(new ComparableStack(ModItems.euphemium_capacitor, 1), new AStack[] {
new OreDictStack(NB.ingot(), 4),
new ComparableStack(ModItems.redcoil_capacitor, 1),
@ -1083,7 +1084,7 @@ public class AssemblerRecipes extends SerializableRecipe {
makeRecipe(new ComparableStack(ModBlocks.machine_radgen, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 8), new OreDictStack(STEEL.plate(), 32), new ComparableStack(ModItems.coil_magnetized_tungsten, 6), new OreDictStack(MAGTUNG.wireFine(), 24), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BASIC), new ComparableStack(ModItems.reactor_core, 3), new OreDictStack(STAR.ingot(), 1), new OreDictStack("dyeRed", 1), }, 400, ModItems.journal_pip);
makeRecipe(new ComparableStack(ModBlocks.machine_reactor_breeding, 1), new AStack[] {new ComparableStack(ModItems.reactor_core, 1), new OreDictStack(STEEL.ingot(), 12), new OreDictStack(PB.plate(), 16), new ComparableStack(ModBlocks.reinforced_glass, 4), new OreDictStack(ASBESTOS.ingot(), 4), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new ComparableStack(ModItems.crt_display, 1)},150);
makeRecipe(new ComparableStack(ModBlocks.reactor_research, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 8), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new ComparableStack(ModItems.motor_desh, 2), new OreDictStack(B.ingot(), 5), new OreDictStack(PB.plate(), 8), new ComparableStack(ModItems.crt_display, 3), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC), },300);
} else {
addTantalium(new ComparableStack(ModBlocks.machine_centrifuge, 1), 5);
addTantalium(new ComparableStack(ModBlocks.machine_gascent, 1), 25);
@ -1096,7 +1097,7 @@ public class AssemblerRecipes extends SerializableRecipe {
addTantalium(new ComparableStack(ModBlocks.machine_mining_laser, 1), 30);
addTantalium(new ComparableStack(ModBlocks.machine_vacuum_distill, 1), 50);
addTantalium(new ComparableStack(ModBlocks.machine_catalytic_reformer, 1), 50);
addTantalium(new ComparableStack(ModBlocks.turret_chekhov, 1), 3);
addTantalium(new ComparableStack(ModBlocks.turret_friendly, 1), 3);
addTantalium(new ComparableStack(ModBlocks.turret_jeremy, 1), 3);
@ -1106,7 +1107,7 @@ public class AssemblerRecipes extends SerializableRecipe {
addTantalium(new ComparableStack(ModBlocks.turret_maxwell, 1), 3);
addTantalium(new ComparableStack(ModBlocks.turret_fritz, 1), 3);
addTantalium(new ComparableStack(ModBlocks.launch_pad, 1), 5);
makeRecipe(new ComparableStack(ModBlocks.machine_cyclotron, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_lithium_battery, 3),
new ComparableStack(ModBlocks.hadron_coil_neodymium, 8),
@ -1120,7 +1121,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BASIC),
new ComparableStack(ModItems.circuit, 50, EnumCircuitType.CAPACITOR_BOARD)
}, 600);
makeRecipe(new ComparableStack(ModBlocks.rbmk_console, 1), new AStack[] {
new OreDictStack(STEEL.ingot(), 16),
new OreDictStack(AL.plate528(), 32),
@ -1129,7 +1130,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.circuit, 20, EnumCircuitType.CAPACITOR_BOARD),
new ComparableStack(ModItems.crt_display, 8),
}, 300);
makeRecipe(new ComparableStack(ModBlocks.rbmk_crane_console, 1), new AStack[] {
new OreDictStack(STEEL.ingot(), 16),
new OreDictStack(AL.plate528(), 8),
@ -1137,7 +1138,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC),
new ComparableStack(ModItems.circuit, 10, EnumCircuitType.CAPACITOR_BOARD),
}, 300);
makeRecipe(new ComparableStack(ModBlocks.struct_launcher_core, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 3),
new ComparableStack(ModBlocks.steel_scaffold, 10),
@ -1146,7 +1147,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED),
new ComparableStack(ModItems.circuit, 15, EnumCircuitType.CAPACITOR_BOARD),
}, 200);
makeRecipe(new ComparableStack(ModBlocks.struct_launcher_core_large, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 5),
new ComparableStack(ModBlocks.steel_scaffold, 10),
@ -1155,7 +1156,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED),
new ComparableStack(ModItems.circuit, 25, EnumCircuitType.CAPACITOR_BOARD),
}, 200);
makeRecipe(new ComparableStack(ModBlocks.struct_soyuz_core, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_lithium_battery, 5),
new ComparableStack(ModBlocks.steel_scaffold, 24),
@ -1166,7 +1167,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.circuit, 100, EnumCircuitType.CAPACITOR_BOARD),
}, 200);
}
makeRecipe(new ComparableStack(ModBlocks.machine_fracking_tower), new AStack[] {
new ComparableStack(ModBlocks.steel_scaffold, 40),
new ComparableStack(ModBlocks.concrete_smooth, 64),
@ -1177,7 +1178,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.tank_steel, 24),
new ComparableStack(ModItems.pipes_steel, 2)
}, 600);
makeRecipe(new ComparableStack(ModBlocks.machine_catalytic_cracker), new AStack[] {
new ComparableStack(ModBlocks.steel_scaffold, 16),
!exp ? new OreDictStack(STEEL.shell(), 6) : new OreDictStack(STEEL.heavyComp()),
@ -1185,7 +1186,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new OreDictStack(NB.ingot(), 2),
new ComparableStack(ModItems.catalyst_clay, 12),
}, 300);
makeRecipe(new ComparableStack(ModBlocks.machine_liquefactor), new AStack[] {
new OreDictStack(STEEL.ingot(), 8),
new OreDictStack(CU.plate528(), 12),
@ -1195,7 +1196,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.catalyst_clay, 4),
new ComparableStack(ModItems.coil_tungsten, 8)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.machine_solidifier), new AStack[] {
new OreDictStack(ANY_CONCRETE.any(), 8),
new OreDictStack(AL.plate528(), 12),
@ -1205,7 +1206,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.catalyst_clay, 4),
new ComparableStack(ModItems.coil_copper, 4)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.machine_radiolysis), new AStack[] {
new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4),
new OreDictStack(RUBBER.ingot(), 8),
@ -1214,7 +1215,7 @@ public class AssemblerRecipes extends SerializableRecipe {
new ComparableStack(ModItems.thermo_element, 8),
new ComparableStack(ModItems.tank_steel, 3)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.transition_seal, 1), new AStack[]{
new ComparableStack(ModBlocks.cmb_brick_reinforced, 16),
new OreDictStack(STEEL.plate(), 64),
@ -1243,13 +1244,13 @@ public class AssemblerRecipes extends SerializableRecipe {
makeRecipe(new ComparableStack(ModBlocks.sliding_seal_door, 1), new AStack[]{new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModItems.plate_polymer, 4), new ComparableStack(ModItems.motor, 2), new OreDictStack(DURA.bolt(), 4), new OreDictStack("dyeWhite", 2)}, 200);
makeRecipe(new ComparableStack(ModBlocks.silo_hatch, 1), new AStack[]{new OreDictStack(STEEL.plateWelded(), 4), new ComparableStack(ModItems.plate_polymer, 4), new ComparableStack(ModItems.motor, 2), new OreDictStack(STEEL.bolt(), 16), new OreDictStack(KEY_GREEN, 4)}, 200);
makeRecipe(new ComparableStack(ModBlocks.silo_hatch_large, 1), new AStack[]{new OreDictStack(STEEL.plateWelded(), 6), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.motor, 2), new OreDictStack(STEEL.bolt(), 16), new OreDictStack(KEY_GREEN, 8)}, 200);
if(GeneralConfig.enableMekanismChanges && Loader.isModLoaded("Mekanism")) {
Block mb = (Block) Block.blockRegistry.getObject("Mekanism:MachineBlock");
if(mb != null) {
makeRecipe(new ComparableStack(mb, 1, 4), new AStack[] {
new OreDictStack(BIGMT.plateCast(), 16),
new OreDictStack(CU.plateWelded(), 12),
@ -1261,13 +1262,13 @@ public class AssemblerRecipes extends SerializableRecipe {
}, 1200);
}
}
for(NTMMaterial mat : Mats.orderedList) {
if(mat.autogen.contains(MaterialShapes.CASTPLATE) && mat.autogen.contains(MaterialShapes.HEAVY_COMPONENT)) {
makeRecipe(new ComparableStack(ModItems.heavy_component, 1, mat.id), new AStack[] { new OreDictStack(MaterialShapes.CASTPLATE.name() + mat.names[0], 256) }, 12_000);
}
}
// WarTec compatibility code
try {
Class wartecmodAssemblerRecipes = ClassLoader.getSystemClassLoader().loadClass("com.wartec.wartecmod.inventory.wartecmodAssemblerRecipes");
@ -1278,18 +1279,18 @@ public class AssemblerRecipes extends SerializableRecipe {
MainRegistry.logger.info("WarTec recipes loaded!");
} catch(Exception e) { }
}
public static void makeRecipe(ComparableStack out, AStack[] in, int duration) {
makeRecipe(out, in, duration, ModItems.template_folder);
}
public static void makeRecipe(ComparableStack out, AStack[] in, int duration, Item... folder) {
if(out == null || Item.itemRegistry.getNameForObject(out.item) == null) {
MainRegistry.logger.error("Canceling assembler registration, item was null!");
return;
}
AssemblerRecipe recipe = new AssemblerRecipe(in, duration, folder);
recipes.put(out, recipe);
recipeList.add(out);
@ -1314,13 +1315,13 @@ public class AssemblerRecipes extends SerializableRecipe {
@Override
public void readRecipe(JsonElement recipe) {
JsonObject obj = recipe.getAsJsonObject();
ItemStack output = this.readItemStack(obj.get("output").getAsJsonArray());
AStack[] input = this.readAStackArray(obj.get("input").getAsJsonArray());
int duration = obj.get("duration").getAsInt();
if(output == null || output.getItem() == ModItems.nothing) return;
if(obj.has("folders")) {
JsonArray array = obj.get("folders").getAsJsonArray();
List<Item> items = new ArrayList();
@ -1337,46 +1338,46 @@ public class AssemblerRecipes extends SerializableRecipe {
@Override
public void writeRecipe(Object recipe, JsonWriter writer) throws IOException {
Entry<ComparableStack, AssemblerRecipe> entry = (Entry<ComparableStack, AssemblerRecipe>) recipe;
writer.name("output");
this.writeItemStack(entry.getKey().toStack(), writer);
writer.name("input").beginArray();
for(AStack stack : entry.getValue().ingredients) this.writeAStack(stack, writer);
writer.endArray();
writer.name("duration").value(entry.getValue().time);
if(entry.getValue().folders.size() != 1 || !entry.getValue().folders.contains(ModItems.template_folder)) {
writer.name("folders").beginArray();
for(Item folder : entry.getValue().folders) writer.value(Item.itemRegistry.getNameForObject(folder));
writer.endArray();
}
}
public static ItemStack getOutputFromTempate(ItemStack stack) {
if(stack != null && stack.getItem() instanceof ItemAssemblyTemplate) {
ComparableStack comp = ItemAssemblyTemplate.readType(stack);
//NEW
if(comp != null) {
return comp.toStack();
}
//LEGACY
int i = stack.getItemDamage();
if(i >= 0 && i < recipeList.size()) {
return recipeList.get(i).toStack();
}
}
return null;
}
public static List<AStack> getRecipeFromTempate(ItemStack stack) {
if(stack != null && stack.getItem() instanceof ItemAssemblyTemplate) {
//NEW
ComparableStack compStack = ItemAssemblyTemplate.readType(stack);
if(compStack != null) {
@ -1385,12 +1386,12 @@ public class AssemblerRecipes extends SerializableRecipe {
AStack[] ret = recipe.ingredients;
return ret == null ? null : Arrays.asList(ret);
}
//LEGACY
int i = stack.getItemDamage();
if(i >= 0 && i < recipeList.size()) {
ItemStack out = recipeList.get(i).toStack();
if(out != null) {
ComparableStack comp = new ComparableStack(out);
AssemblerRecipe recipe = recipes.get(comp);
@ -1400,55 +1401,55 @@ public class AssemblerRecipes extends SerializableRecipe {
}
}
}
return null;
}
public static void addTantalium(ComparableStack out, int amount) {
AssemblerRecipe recipe = recipes.get(out);
if(recipe != null) {
AStack[] news = new AStack[recipe.ingredients.length + 1];
for(int i = 0; i < recipe.ingredients.length; i++)
news[i] = recipe.ingredients[i];
news[news.length - 1] = new ComparableStack(ModItems.circuit, amount, EnumCircuitType.CAPACITOR_BOARD);
recipe.ingredients = news;
}
}
public static Map<ItemStack, List<Object>> getRecipes() {
Map<ItemStack, List<Object>> recipes = new HashMap();
for(Entry<ComparableStack, AssemblerRecipe> entry : AssemblerRecipes.recipes.entrySet()) {
List<Object> value = new ArrayList();
AssemblerRecipe recipe = entry.getValue();
for(AStack o : recipe.ingredients) {
value.add(o.extractForNEI());
}
recipes.put(entry.getKey().toStack(), value);
}
return recipes;
}
public static class AssemblerRecipe {
public AStack[] ingredients;
public int time;
public HashSet<Item> folders;
public AssemblerRecipe(AStack[] ingredients, int time) {
this(ingredients, time, ModItems.template_folder);
}
public AssemblerRecipe(AStack[] ingredients, int time, Item... folder) {
this.ingredients = ingredients;
this.time = time;

View File

@ -390,6 +390,10 @@ public class ChemplantRecipes extends SerializableRecipe {
new ItemStack(ModItems.niter, 3))
.outputFluids(new FluidStack(Fluids.SALIENT, 250)));
recipes.add(new ChemRecipe(104, "RUSTY_DECO_STEEL", 100)
.inputItems(new ComparableStack(ModBlocks.deco_steel, 8))
.inputFluids(new FluidStack(Fluids.WATER, 1000))
.outputItems(new ItemStack(ModBlocks.deco_rusty_steel, 8)));
}
public static void registerOtherOil() {

View File

@ -40,7 +40,7 @@ public class AnvilRecipes extends SerializableRecipe {
public static List<AnvilSmithingRecipe> smithingRecipes = new ArrayList();
public static List<AnvilConstructionRecipe> constructionRecipes = new ArrayList();
public static void register() {
registerSmithing();
}
@ -49,7 +49,7 @@ public class AnvilRecipes extends SerializableRecipe {
@Override public Object getRecipeObject() { return constructionRecipes; }
@Override public void deleteRecipes() { constructionRecipes.clear(); }
@Override public void registerDefaults() { registerConstruction(); }
/*
* ////// // // // ////// // // // // // //////
* // //// //// // // // // // //// // //
@ -58,9 +58,9 @@ public class AnvilRecipes extends SerializableRecipe {
* ////// // // // // // // // // // //////
*/
public static void registerSmithing() {
Block[] anvils = new Block[]{ModBlocks.anvil_iron, ModBlocks.anvil_lead};
for(Block anvil : anvils) {
smithingRecipes.add(new AnvilSmithingRecipe(1, new ItemStack(ModBlocks.anvil_steel, 1), new ComparableStack(anvil), new OreDictStack(STEEL.ingot(), 10)));
smithingRecipes.add(new AnvilSmithingRecipe(1, new ItemStack(ModBlocks.anvil_desh, 1), new ComparableStack(anvil), new OreDictStack(DESH.ingot(), 10)));
@ -72,14 +72,14 @@ public class AnvilRecipes extends SerializableRecipe {
smithingRecipes.add(new AnvilSmithingRecipe(1, new ItemStack(ModBlocks.anvil_dnt, 1), new ComparableStack(anvil), new OreDictStack(DNT.ingot(), 10)));
smithingRecipes.add(new AnvilSmithingRecipe(1, new ItemStack(ModBlocks.anvil_osmiridium, 1), new ComparableStack(anvil), new OreDictStack(OSMIRIDIUM.ingot(), 10)));
}
for(int i = 0; i < 9; i++)
smithingRecipes.add(new AnvilSmithingHotRecipe(3, new ItemStack(ModItems.ingot_steel_dusted, 1, i + 1),
new ComparableStack(ModItems.ingot_steel_dusted, 1, i), new ComparableStack(ModItems.ingot_steel_dusted, 1, i)));
smithingRecipes.add(new AnvilSmithingHotRecipe(3, new ItemStack(ModItems.ingot_chainsteel, 1),
new ComparableStack(ModItems.ingot_steel_dusted, 1, 9), new ComparableStack(ModItems.ingot_steel_dusted, 1, 9)));
smithingRecipes.add(new AnvilSmithingHotRecipe(3, new ItemStack(ModItems.ingot_meteorite_forged, 1), new ComparableStack(ModItems.ingot_meteorite), new ComparableStack(ModItems.ingot_meteorite)));
smithingRecipes.add(new AnvilSmithingHotRecipe(3, new ItemStack(ModItems.blade_meteorite, 1), new ComparableStack(ModItems.ingot_meteorite_forged), new ComparableStack(ModItems.ingot_meteorite_forged)));
smithingRecipes.add(new AnvilSmithingHotRecipe(3, new ItemStack(ModItems.meteorite_sword_reforged, 1), new ComparableStack(ModItems.meteorite_sword_seared), new ComparableStack(ModItems.ingot_meteorite_forged)));
@ -95,7 +95,7 @@ public class AnvilRecipes extends SerializableRecipe {
smithingRecipes.add(new AnvilSmithingRecipe(4, new ItemStack(ModItems.flask_infusion, 1, EnumInfusion.SHIELD.ordinal()), new ComparableStack(ModItems.gem_alexandrite), new ComparableStack(ModItems.bottle_nuka)));
smithingRecipes.add(new AnvilSmithingRecipe(1, new ItemStack(ModItems.ingot_gunmetal, 1), new OreDictStack(CU.ingot()), new OreDictStack(AL.ingot())));
smithingRecipes.add(new AnvilSmithingMold(0, new OreDictStack(GOLD.nugget()), new OreDictStack("nugget")));
smithingRecipes.add(new AnvilSmithingMold(1, new OreDictStack(U.billet()), new OreDictStack("billet")));
smithingRecipes.add(new AnvilSmithingMold(2, new OreDictStack(IRON.ingot()), new OreDictStack("ingot")));
@ -126,11 +126,11 @@ public class AnvilRecipes extends SerializableRecipe {
smithingRecipes.add(new AnvilSmithingMold(13, new ComparableStack(ModItems.pipes_steel), new ItemStack[] {new ItemStack(ModItems.pipes_steel)}));
smithingRecipes.add(new AnvilSmithingMold(20, new OreDictStack(ALLOY.wireDense(), 1), new OreDictStack("wireDense", 1)));
smithingRecipes.add(new AnvilSmithingMold(21, new OreDictStack(ALLOY.wireDense(), 9), new OreDictStack("wireDense", 9)));
smithingRecipes.add(new AnvilSmithingCyanideRecipe());
smithingRecipes.add(new AnvilSmithingRenameRecipe());
}
/*
* ////// ////// // // ////// ////// //// // // ////// ////// // ////// // //
* // // // //// // // // // // // // // // // // // //// //
@ -139,7 +139,7 @@ public class AnvilRecipes extends SerializableRecipe {
* ////// ////// // // ////// // // // ////// ////// // // ////// // //
*/
public static void registerConstruction() {
constructionRecipes.add(new AnvilConstructionRecipe(new OreDictStack(IRON.ingot()), new AnvilOutput(new ItemStack(ModItems.plate_iron))).setTier(3));
constructionRecipes.add(new AnvilConstructionRecipe(new OreDictStack(GOLD.ingot()), new AnvilOutput(new ItemStack(ModItems.plate_gold))).setTier(3));
constructionRecipes.add(new AnvilConstructionRecipe(new OreDictStack(TI.ingot()), new AnvilOutput(new ItemStack(ModItems.plate_titanium))).setTier(3));
@ -166,13 +166,13 @@ public class AnvilRecipes extends SerializableRecipe {
constructionRecipes.add(new AnvilConstructionRecipe(new OreDictStack(LAPIS.dust()), new AnvilOutput(new ItemStack(Items.dye, 1, 4))).setTier(3));
constructionRecipes.add(new AnvilConstructionRecipe(new OreDictStack(DIAMOND.dust()), new AnvilOutput(new ItemStack(Items.diamond))).setTier(3));
constructionRecipes.add(new AnvilConstructionRecipe(new OreDictStack(EMERALD.dust()), new AnvilOutput(new ItemStack(Items.emerald))).setTier(3));
registerConstructionRecipes();
registerConstructionAmmo();
registerConstructionUpgrades();
registerConstructionRecycling();
}
public static void registerConstructionRecipes() {
constructionRecipes.add(new AnvilConstructionRecipe(new OreDictStack(AL.ingot(), 1), new AnvilOutput(new ItemStack(ModBlocks.deco_aluminium, 4))).setTier(1).setOverlay(OverlayType.CONSTRUCTION));
@ -191,13 +191,13 @@ public class AnvilRecipes extends SerializableRecipe {
new OreDictStack(MaterialShapes.PLATE.name() + mat.names[0], 4),
new AnvilOutput(new ItemStack(ModItems.shell, 1, mat.id))).setTier(1));
for(NTMMaterial mat : Mats.orderedList) if(mat.autogen.contains(MaterialShapes.PIPE)) {
String key = (OreDictionary.doesOreNameExist(MaterialShapes.PLATE.name() + mat.names[0]) ?
String key = (OreDictionary.doesOreNameExist(MaterialShapes.PLATE.name() + mat.names[0]) ?
MaterialShapes.PLATE.name() + mat.names[0] : MaterialShapes.INGOT.name() + mat.names[0]);
constructionRecipes.add(new AnvilConstructionRecipe(
new OreDictStack(key, 3),
new AnvilOutput(new ItemStack(ModItems.pipe, 1, mat.id))).setTier(1));
}
constructionRecipes.add(new AnvilConstructionRecipe(
new ComparableStack(ModItems.coil_copper, 2),
new AnvilOutput(new ItemStack(ModItems.coil_copper_torus))).setTier(1).setOverlay(OverlayType.CONSTRUCTION));
@ -217,7 +217,7 @@ public class AnvilRecipes extends SerializableRecipe {
pullFromAssembler(new ComparableStack(ModItems.filter_coal), 2);
pullFromAssembler(new ComparableStack(ModItems.thermo_element), 2);
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new ComparableStack(Blocks.stonebrick, 4),
@ -225,7 +225,7 @@ public class AnvilRecipes extends SerializableRecipe {
new OreDictStack(CU.plate(), 4)
},
new AnvilOutput(new ItemStack(ModBlocks.machine_difurnace_off))).setTier(1));
int ukModifier = 1;
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
@ -405,7 +405,7 @@ public class AnvilRecipes extends SerializableRecipe {
new ComparableStack(ModItems.circuit, 2, EnumCircuitType.VACUUM_TUBE.ordinal()),
new ComparableStack(ModItems.sawblade)
}, new AnvilOutput(new ItemStack(ModBlocks.machine_autosaw))).setTier(2));
pullFromAssembler(new ComparableStack(ModBlocks.machine_diesel), 2);
/*constructionRecipes.add(new AnvilConstructionRecipe(
@ -432,14 +432,14 @@ public class AnvilRecipes extends SerializableRecipe {
new ComparableStack(ModBlocks.machine_condenser, 16),
new OreDictStack(STEEL.pipe(), 8),
}, new AnvilOutput(new ItemStack(ModBlocks.machine_tower_large))).setTier(4));
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new ComparableStack(Items.bone, 16),
new ComparableStack(Items.leather, 4),
new ComparableStack(Items.feather, 24)
}, new AnvilOutput(new ItemStack(ModItems.wings_limp))).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new ComparableStack(ModItems.sulfur, 12),
@ -448,7 +448,7 @@ public class AnvilRecipes extends SerializableRecipe {
new ComparableStack(ModItems.circuit, 2, EnumCircuitType.BASIC.ordinal())
},
new AnvilOutput(new ItemStack(ModBlocks.machine_deuterium_extractor))).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new ComparableStack(ModItems.deuterium_filter, 2),
@ -459,7 +459,7 @@ public class AnvilRecipes extends SerializableRecipe {
new OreDictStack(Fluids.SOURGAS.getDict(1_000), 8),
},
new AnvilOutput(new ItemStack(ModBlocks.machine_deuterium_tower))).setTier(4));
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new OreDictStack(ANY_CONCRETE.any(), 2),
@ -468,7 +468,7 @@ public class AnvilRecipes extends SerializableRecipe {
new ComparableStack(ModItems.coil_copper, 4)
},
new AnvilOutput(new ItemStack(ModBlocks.red_pylon_large))).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new OreDictStack(ANY_CONCRETE.any(), 8),
@ -477,7 +477,7 @@ public class AnvilRecipes extends SerializableRecipe {
new ComparableStack(ModItems.coil_copper, 8)
},
new AnvilOutput(new ItemStack(ModBlocks.substation, 2))).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new OreDictStack(STEEL.plate(), 4),
@ -485,7 +485,7 @@ public class AnvilRecipes extends SerializableRecipe {
new ComparableStack(ModBlocks.steel_grate, 2)
},
new AnvilOutput(new ItemStack(ModBlocks.chimney_brick))).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new OreDictStack(STEEL.plate(), 16),
@ -494,7 +494,7 @@ public class AnvilRecipes extends SerializableRecipe {
new ComparableStack(ModItems.filter_coal, 4)
},
new AnvilOutput(new ItemStack(ModBlocks.chimney_industrial))).setTier(3));
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new ComparableStack(ModItems.tank_steel, 1),
@ -507,14 +507,14 @@ public class AnvilRecipes extends SerializableRecipe {
new OreDictStack(PB.plate528(), 2),
new ComparableStack(ModItems.nuclear_waste_vitrified, 10)
}, new AnvilOutput(new ItemStack(ModBlocks.vitrified_barrel))).setTier(3));
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {
new ComparableStack(ModItems.man_core, 1),
new OreDictStack(BE.ingot(), 4),
new ComparableStack(ModItems.screwdriver, 1)
}, new AnvilOutput(new ItemStack(ModItems.demon_core_open))).setTier(3));
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {new OreDictStack(DESH.ingot(), 4), new OreDictStack(ANY_PLASTIC.dust(), 2), new OreDictStack(DURA.ingot(), 1)},
new AnvilOutput(new ItemStack(ModItems.plate_desh, 4))).setTier(3));
@ -546,7 +546,7 @@ public class AnvilRecipes extends SerializableRecipe {
constructionRecipes.add(new AnvilConstructionRecipe(
new AStack[] {new ComparableStack(ModItems.plate_dineutronium, 4), new ComparableStack(ModItems.particle_sparkticle, 1), new ComparableStack(ModItems.plate_armor_fau, 6)},
new AnvilOutput(new ItemStack(ModItems.plate_armor_dnt))).setTier(7));
pullFromAssembler(new ComparableStack(ModItems.plate_mixed, 4), 3);
constructionRecipes.add(new AnvilConstructionRecipe(
@ -556,7 +556,7 @@ public class AnvilRecipes extends SerializableRecipe {
new OreDictStack(AL.plateWelded(), 2),
new OreDictStack(PU239.billet(), 3)
}, new AnvilOutput(new ItemStack(ModItems.missile_doomsday))).setTier(5));
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_u233, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_u233))).setTier(4));
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_u235, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_u235))).setTier(4));
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_mox_fuel, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_mox))).setTier(4));
@ -577,7 +577,7 @@ public class AnvilRecipes extends SerializableRecipe {
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.fluid_duct_exhaust, 8, i), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.plate_iron)), new AnvilOutput(new ItemStack(ModItems.plate_polymer))}).setTier(2));
}
}
public static void registerConstructionAmmo() {
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[]{new ComparableStack(ModItems.stamp_iron_flat), new OreDictStack(GUNMETAL.ingot(), 2)}, new AnvilOutput(new ItemStack(ModItems.stamp_9))).setTier(2));
@ -587,7 +587,7 @@ public class AnvilRecipes extends SerializableRecipe {
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[]{new ComparableStack(ModItems.mold_base), new OreDictStack(IRON.ingot(), 2)}, new AnvilOutput(new ItemStack(ModItems.mold, 1, 16))).setTier(1));
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[]{new ComparableStack(ModItems.mold_base), new OreDictStack(IRON.ingot(), 2)}, new AnvilOutput(new ItemStack(ModItems.mold, 1, 17))).setTier(1));
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[]{new ComparableStack(ModItems.mold_base), new OreDictStack(STEEL.ingot(), 4)}, new AnvilOutput(new ItemStack(ModItems.mold, 1, 22))).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[]{new ComparableStack(ModItems.mold_base), new OreDictStack(STEEL.ingot(), 4)}, new AnvilOutput(new ItemStack(ModItems.mold, 1, 23))).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[]{new ComparableStack(ModItems.mold_base), new OreDictStack(STEEL.ingot(), 4)}, new AnvilOutput(new ItemStack(ModItems.mold, 1, 24))).setTier(2));
@ -595,10 +595,10 @@ public class AnvilRecipes extends SerializableRecipe {
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[]{new ComparableStack(ModItems.mold_base), new OreDictStack(STEEL.ingot(), 4)}, new AnvilOutput(new ItemStack(ModItems.mold, 1, 26))).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[]{new ComparableStack(ModItems.mold_base), new OreDictStack(STEEL.ingot(), 4)}, new AnvilOutput(new ItemStack(ModItems.mold, 1, 27))).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(new AStack[]{new ComparableStack(ModItems.mold_base), new OreDictStack(STEEL.ingot(), 4)}, new AnvilOutput(new ItemStack(ModItems.mold, 1, 28))).setTier(2));
pullFromAssembler(new ComparableStack(ModItems.pellet_buckshot), 1);
}
public static void registerConstructionUpgrades() {
pullFromAssembler(new ComparableStack(ModItems.upgrade_template), 2);
pullFromAssembler(new ComparableStack(ModItems.upgrade_speed_1), 2);
@ -626,7 +626,7 @@ public class AnvilRecipes extends SerializableRecipe {
pullFromAssembler(new ComparableStack(ModItems.upgrade_nullifier), 4);
pullFromAssembler(new ComparableStack(ModItems.upgrade_screm), 4);
}
public static void registerConstructionRecycling() {
constructionRecipes.add(new AnvilConstructionRecipe(
@ -648,6 +648,7 @@ public class AnvilRecipes extends SerializableRecipe {
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_tungsten, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_tungsten, 1))}).setTier(1));
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_aluminium, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_aluminium, 1))}).setTier(1));
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_steel, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_steel, 1))}).setTier(1));
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_rusty_steel, 8), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_steel, 1))}).setTier(1));
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_lead, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_lead, 1))}).setTier(1));
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_beryllium, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_beryllium, 1))}).setTier(1));
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModBlocks.deco_asbestos, 4), new AnvilOutput[] {new AnvilOutput(new ItemStack(ModItems.ingot_asbestos, 1))}).setTier(1));
@ -659,7 +660,7 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(ModItems.ingot_copper, 6))
}
).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(
new ComparableStack(ModBlocks.heater_oven),
new AnvilOutput[] {
@ -745,7 +746,7 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(ModItems.circuit, 1, EnumCircuitType.CAPACITOR.ordinal()), 0.75F),
new AnvilOutput(new ItemStack(ModItems.circuit, 1, EnumCircuitType.CAPACITOR.ordinal()), 0.5F),
new AnvilOutput(new ItemStack(ModItems.circuit, 1, EnumCircuitType.ANALOG.ordinal()), 0.1F)
}
).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(
@ -756,7 +757,7 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(ModItems.wire_fine, 2, Mats.MAT_COPPER.id)),
new AnvilOutput(new ItemStack(ModItems.wire_fine, 2, Mats.MAT_GOLD.id), 0.25F),
new AnvilOutput(new ItemStack(ModItems.circuit, 1, EnumCircuitType.VACUUM_TUBE.ordinal()), 0.25F)
}
).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(
@ -769,7 +770,7 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(ModItems.battery_generic, 1), 0.25F),
new AnvilOutput(new ItemStack(ModItems.battery_advanced, 1), 0.1F),
new AnvilOutput(new ItemStack(ModItems.fusion_core, 1), 0.01F)
}
).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(
@ -782,7 +783,7 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(ModItems.battery_lithium, 1), 0.25F),
new AnvilOutput(new ItemStack(ModItems.battery_sc_uranium, 1), 0.1F),
new AnvilOutput(new ItemStack(ModItems.fusion_core, 1), 0.05F)
}
).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(
@ -796,7 +797,7 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(ModItems.fusion_core, 1), 0.5F),
new AnvilOutput(new ItemStack(ModItems.gem_alexandrite, 1), 0.25F),
new AnvilOutput(new ItemStack(ModItems.flame_pony, 1), 0.01F)
}
).setTier(2));
constructionRecipes.add(new AnvilConstructionRecipe(
@ -840,7 +841,7 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(ModItems.plate_steel, 2), 0.5F),
new AnvilOutput(new ItemStack(ModItems.plate_polymer, 2), 0.25F),
new AnvilOutput(new ItemStack(ModItems.scrap, 1))
}
).setTier(1));
@ -870,7 +871,7 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(ModItems.lithium, 1)),
new AnvilOutput(new ItemStack(ModItems.cell_empty, 1))
}).setTier(2));
//RBMK
constructionRecipes.add(new AnvilConstructionRecipe(
new ComparableStack(ModBlocks.rbmk_moderator), new AnvilOutput[] {
@ -929,9 +930,9 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(ModBlocks.rbmk_blank, 1)),
new AnvilOutput(new ItemStack(ModBlocks.crate_steel, 2))
}).setTier(4));
if(!GeneralConfig.enable528) {
constructionRecipes.add(new AnvilConstructionRecipe(
new ComparableStack(ModBlocks.rbmk_rod), new AnvilOutput[] {
new AnvilOutput(new ItemStack(ModBlocks.rbmk_blank, 1)),
@ -1002,7 +1003,7 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(ModItems.coil_copper, 2)),
new AnvilOutput(new ItemStack(ModItems.ingot_steel, 4))
}).setTier(3));
constructionRecipes.add(new AnvilConstructionRecipe(
new ComparableStack(ModBlocks.yellow_barrel), new AnvilOutput[] {
new AnvilOutput(new ItemStack(ModItems.tank_steel, 1)),
@ -1024,91 +1025,91 @@ public class AnvilRecipes extends SerializableRecipe {
new AnvilOutput(new ItemStack(Items.experience_bottle, 1), 0.5F)
}).setTier(1));
}
public static void pullFromAssembler(ComparableStack result, int tier) {
AssemblerRecipe recipe = AssemblerRecipes.recipes.get(result);
if(recipe != null) {
constructionRecipes.add(new AnvilConstructionRecipe(recipe.ingredients, new AnvilOutput(result.toStack())).setTier(tier));
}
}
public static List<AnvilSmithingRecipe> getSmithing() {
return smithingRecipes;
}
public static List<AnvilConstructionRecipe> getConstruction() {
return constructionRecipes;
}
public static class AnvilConstructionRecipe {
public List<AStack> input = new ArrayList();
public List<AnvilOutput> output = new ArrayList();
public int tierLower = 0;
public int tierUpper = -1;
OverlayType overlay = OverlayType.NONE;
public AnvilConstructionRecipe(AStack input, AnvilOutput output) {
this.input.add(input);
this.output.add(output);
this.setOverlay(OverlayType.SMITHING); //preferred overlay for 1:1 conversions is smithing
}
public AnvilConstructionRecipe(AStack[] input, AnvilOutput output) {
for(AStack stack : input) this.input.add(stack);
this.output.add(output);
this.setOverlay(OverlayType.CONSTRUCTION); //preferred overlay for many:1 conversions is construction
}
public AnvilConstructionRecipe(AStack input, AnvilOutput[] output) {
this.input.add(input);
for(AnvilOutput out : output) this.output.add(out);
this.setOverlay(OverlayType.RECYCLING); //preferred overlay for 1:many conversions is recycling
}
public AnvilConstructionRecipe(AStack[] input, AnvilOutput[] output) {
for(AStack stack : input) this.input.add(stack);
for(AnvilOutput out : output) this.output.add(out);
this.setOverlay(OverlayType.NONE); //no preferred overlay for many:many conversions
}
public AnvilConstructionRecipe(AStack[] input, Pair<ItemStack, Float>[] output) {
for(AStack stack : input) this.input.add(stack);
for(Pair<ItemStack, Float> out : output) this.output.add(new AnvilOutput(out.getKey(), out.getValue()));
this.setOverlay(OverlayType.NONE); //no preferred overlay for many:many conversions
}
public AnvilConstructionRecipe setTier(int tier) {
this.tierLower = tier;
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMUnlockAnvil) this.tierLower = 1;
return this;
}
public AnvilConstructionRecipe setTierRange(int lower, int upper) {
this.tierLower = lower;
this.tierUpper = upper;
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMUnlockAnvil) this.tierLower = this.tierUpper = 1;
return this;
}
public boolean isTierValid(int tier) {
if(this.tierUpper == -1)
return tier >= this.tierLower;
return tier >= this.tierLower && tier <= this.tierUpper;
}
public AnvilConstructionRecipe setOverlay(OverlayType overlay) {
this.overlay = overlay;
return this;
}
public OverlayType getOverlay() {
return this.overlay;
}
public ItemStack getDisplay() {
switch(this.overlay) {
case NONE: return this.output.get(0).stack.copy();
@ -1124,21 +1125,21 @@ public class AnvilRecipes extends SerializableRecipe {
}
}
}
public static class AnvilOutput {
public ItemStack stack;
public float chance;
public AnvilOutput(ItemStack stack) {
this(stack, 1F);
}
public AnvilOutput(ItemStack stack, float chance) {
this.stack = stack;
this.chance = chance;
}
}
public static enum OverlayType {
NONE,
CONSTRUCTION,
@ -1149,38 +1150,38 @@ public class AnvilRecipes extends SerializableRecipe {
@Override
public void readRecipe(JsonElement recipe) {
JsonObject obj = (JsonObject) recipe;
AStack[] inputs = this.readAStackArray(obj.get("inputs").getAsJsonArray());
Pair<ItemStack, Float>[] outputs = this.readItemStackArrayChance(obj.get("outputs").getAsJsonArray());
int tierLower = obj.get("tierLower").getAsInt();
int tierUpper = obj.has("tierUpper") ? obj.get("tierUpper").getAsInt() : -1;
OverlayType overlay = OverlayType.NONE;
if(obj.has("overlay")) {
String overlayName = obj.get("overlay").getAsString();
overlay = OverlayType.valueOf(overlayName);
if(overlay == null) overlay = OverlayType.NONE;
}
this.constructionRecipes.add(new AnvilConstructionRecipe(inputs, outputs).setTierRange(tierLower, tierUpper).setOverlay(overlay));
}
@Override
public void writeRecipe(Object recipe, JsonWriter writer) throws IOException {
AnvilConstructionRecipe rec = (AnvilConstructionRecipe) recipe;
writer.name("inputs").beginArray();
for(AStack stack : rec.input) this.writeAStack(stack, writer);
writer.endArray();
writer.name("outputs").beginArray();
for(AnvilOutput stack : rec.output) this.writeItemStackChance(new Pair(stack.stack, stack.chance), writer);
writer.endArray();
writer.name("tierLower").value(rec.tierLower);
writer.name("tierUpper").value(rec.tierUpper);
writer.name("overlay").value(rec.overlay.name());
}
}

File diff suppressed because it is too large Load Diff

View File

@ -61,6 +61,8 @@ public class ResourceManager {
public static final IModelCustom mine_ap = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/ap_mine.obj")).asVBO();
public static final IModelCustom mine_marelet = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/marelet.obj")).asVBO();
public static final IModelCustom mine_fat = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mine_fat.obj"));
public static final IModelCustom mine_naval = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/NMine.obj"));
//Oil Pumps
public static final IModelCustom derrick = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/derrick.obj")).asVBO();
@ -447,6 +449,7 @@ public class ResourceManager {
public static final ResourceLocation mine_marelet_tex = new ResourceLocation(RefStrings.MODID, "textures/models/bombs/mine_marelet.png");
public static final ResourceLocation mine_shrap_tex = new ResourceLocation(RefStrings.MODID, "textures/models/bombs/mine_shrapnel.png");
public static final ResourceLocation mine_fat_tex = new ResourceLocation(RefStrings.MODID, "textures/models/mine_fat.png");
public static final ResourceLocation mine_naval_tex = new ResourceLocation(RefStrings.MODID, "textures/models/NMine.png");
//Heaters
public static final ResourceLocation heater_firebox_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/firebox.png");

View File

@ -0,0 +1,189 @@
package com.hbm.particle;
import com.hbm.main.ModEventHandlerClient;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
@SideOnly(Side.CLIENT)
public class ParticleFoam extends EntityFX {
private int age;
public int maxAge;
private float baseScale = 1.0F;
private float maxScale = 1.5F;
// Parameters for the trail effect
private List<TrailPoint> trail = new ArrayList<TrailPoint>();
private int trailLength = 15;
private float initialVelocity;
private float buoyancy = 0.05F;
private float jitter = 0.15F;
private float drag = 0.96F;
private int explosionPhase; // 0=burst up, 1=peak, 2=settle
private static class TrailPoint {
double x, y, z;
float alpha;
public TrailPoint(double x, double y, double z, float alpha) {
this.x = x;
this.y = y;
this.z = z;
this.alpha = alpha;
}
}
public ParticleFoam(TextureManager p_i1213_1_, World p_i1218_1_, double p_i1218_2_, double p_i1218_4_, double p_i1218_6_) {
super(p_i1218_1_, p_i1218_2_, p_i1218_4_, p_i1218_6_);
particleIcon = ModEventHandlerClient.particleBase;
maxAge = 60 + rand.nextInt(60);
particleGravity = 0.005F + rand.nextFloat() * 0.015F;
initialVelocity = 2.0F + rand.nextFloat() * 3.0F;
motionY = initialVelocity;
double angle = rand.nextDouble() * Math.PI * 2;
double strength = rand.nextDouble() * 0.5;
motionX = Math.cos(angle) * strength;
motionZ = Math.sin(angle) * strength;
explosionPhase = 0; // Start in burst phase
particleScale = 0.3F + rand.nextFloat() * 0.7F;
}
public void setBaseScale(float f) { this.baseScale = f; }
public void setMaxScale(float f) { this.maxScale = f; }
public void setTrailLength(int length) { this.trailLength = length; }
public void setBuoyancy(float buoyancy) { this.buoyancy = buoyancy; }
public void onUpdate() {
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
trail.add(0, new TrailPoint(posX, posY, posZ, particleAlpha));
while (trail.size() > trailLength) {
trail.remove(trail.size() - 1);
}
// Update age and phase
++this.age;
if (this.age == this.maxAge) {
this.setDead();
}
float phaseRatio = (float) age / (float) maxAge;
if (phaseRatio < 0.3F) {
explosionPhase = 0;
if (phaseRatio < 0.15F) {
motionY += buoyancy * 6.0F;
} else {
motionY += buoyancy * (1.0F - (phaseRatio / 0.3F)) * 2.0F;
}
particleScale = baseScale + (maxScale - baseScale) * (phaseRatio / 0.3F);
} else if (phaseRatio < 0.6F) {
explosionPhase = 1;
motionY *= 0.98F;
particleScale = maxScale;
} else {
explosionPhase = 2;
motionY -= particleGravity;
particleScale = maxScale * (1.0F - ((phaseRatio - 0.6F) / 0.4F) * 0.7F);
}
particleAlpha = 0.8F * (1.0F - phaseRatio * phaseRatio);
motionX += (rand.nextFloat() - 0.5F) * jitter;
motionZ += (rand.nextFloat() - 0.5F) * jitter;
// drag like ninja drags the low taper fade
motionX *= drag;
motionY *= drag;
motionZ *= drag;
this.moveEntity(this.motionX, motionY, this.motionZ);
// Kill particle if it hits ground
if (this.onGround || this.isInWeb) {
this.setDead();
}
}
public int getFXLayer() {
return 1;
}
// ty kercig cuz id kms lol
public void renderParticle(Tessellator p_70539_1_, float p_70539_2_, float p_70539_3_, float p_70539_4_, float p_70539_5_, float p_70539_6_, float p_70539_7_) {
renderFoamBubbles(p_70539_1_, p_70539_2_, p_70539_3_, p_70539_4_, p_70539_5_, p_70539_6_, p_70539_7_,
posX, posY, posZ, particleScale, particleAlpha);
for (int i = 1; i < trail.size(); i++) {
TrailPoint point = trail.get(i);
float trailScale = particleScale * (1.0F - (float)i / trailLength);
float trailAlpha = particleAlpha * (1.0F - (float)i / trailLength) * 0.7F;
renderFoamBubbles(p_70539_1_, p_70539_2_, p_70539_3_, p_70539_4_, p_70539_5_, p_70539_6_, p_70539_7_,
point.x, point.y, point.z, trailScale, trailAlpha);
}
}
private void renderFoamBubbles(Tessellator tessellator, float p_70539_2_, float p_70539_3_, float p_70539_4_,
float p_70539_5_, float p_70539_6_, float p_70539_7_, double x, double y, double z, float scale, float alpha) {
Random urandom = new Random(this.getEntityId() + (long)(x * 100) + (long)(y * 10) + (long)z);
int bubbleCount = explosionPhase == 0 ? 8 : (explosionPhase == 1 ? 6 : 4);
for (int i = 0; i < bubbleCount; i++) {
float whiteness = 0.9F + urandom.nextFloat() * 0.1F;
tessellator.setColorRGBA_F(whiteness, whiteness, whiteness, alpha);
tessellator.setNormal(0.0F, 1.0F, 0.0F);
float bubbleScale = scale * (urandom.nextFloat() * 0.5F + 0.75F);
float offset = explosionPhase == 0 ? 0.4F : (explosionPhase == 1 ? 0.6F : 0.9F);
float pX = (float) ((x - interpPosX) + (urandom.nextGaussian()) * offset);
float pY = (float) ((y - interpPosY) + (urandom.nextGaussian()) * offset * 0.7F);
float pZ = (float) ((z - interpPosZ) + (urandom.nextGaussian()) * offset);
tessellator.addVertexWithUV(
(double)(pX - p_70539_3_ * bubbleScale - p_70539_6_ * bubbleScale),
(double)(pY - p_70539_4_ * bubbleScale),
(double)(pZ - p_70539_5_ * bubbleScale - p_70539_7_ * bubbleScale),
particleIcon.getMaxU(), particleIcon.getMaxV());
tessellator.addVertexWithUV(
(double)(pX - p_70539_3_ * bubbleScale + p_70539_6_ * bubbleScale),
(double)(pY + p_70539_4_ * bubbleScale),
(double)(pZ - p_70539_5_ * bubbleScale + p_70539_7_ * bubbleScale),
particleIcon.getMaxU(), particleIcon.getMinV());
tessellator.addVertexWithUV(
(double)(pX + p_70539_3_ * bubbleScale + p_70539_6_ * bubbleScale),
(double)(pY + p_70539_4_ * bubbleScale),
(double)(pZ + p_70539_5_ * bubbleScale + p_70539_7_ * bubbleScale),
particleIcon.getMinU(), particleIcon.getMinV());
tessellator.addVertexWithUV(
(double)(pX + p_70539_3_ * bubbleScale - p_70539_6_ * bubbleScale),
(double)(pY - p_70539_4_ * bubbleScale),
(double)(pZ + p_70539_5_ * bubbleScale - p_70539_7_ * bubbleScale),
particleIcon.getMinU(), particleIcon.getMaxV());
}
}
}

View File

@ -54,6 +54,12 @@ public class RenderLandmine extends TileEntitySpecialRenderer {
bindTexture(ResourceManager.mine_fat_tex);
ResourceManager.mine_fat.renderAll();
}
if(block == ModBlocks.mine_naval) {
GL11.glScaled(1D, 1D, 1D);
GL11.glTranslated(0,0.5,0);
bindTexture(ResourceManager.mine_naval_tex);
ResourceManager.mine_naval.renderAll();
}
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();

View File

@ -794,6 +794,7 @@ public class NBTStructure {
}
// Each jigsaw block in a structure will instance one of these
private static class JigsawConnection {

View File

@ -5337,6 +5337,7 @@ tile.deco_pipe_rim_green_rusted.name=Rusty Green Steel Pipe (Rimmed)
tile.deco_pipe_rim_red.name=Red Steel Pipe (Rimmed)
tile.deco_pipe_rim_marked.name=Gas Pipe (Rimmed)
tile.deco_steel.name=Steel Deco Block
tile.deco_rusty_steel.name=Rusty Steel Deco Block
tile.deco_titanium.name=Titanium Deco Block
tile.deco_toaster.name=Broken Toaster
tile.deco_tungsten.name=Tungsten Deco Block
@ -5739,6 +5740,7 @@ tile.meteor_polished.name=Polished Meteor Block
tile.meteor_spawner.name=Cyber Crab Assembler
tile.mine_ap.name=Anti-Personell Mine
tile.mine_fat.name=Fat Mine
tile.mine_naval.name=Naval Mine
tile.mine_he.name=Anti-Tank Mine
tile.mine_shrap.name=Shrapnel Mine
tile.moon_turf.name=Moon Turf

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 922 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 874 B