mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
more work on the fusion reactor & plasma heater, vaporwave
This commit is contained in:
parent
e090483fe2
commit
4589e3aaea
@ -871,7 +871,8 @@ item.fusion_core.name=Fusionskern
|
||||
item.fusion_core_infinite.name=Unendlicher Fusionskern
|
||||
item.fusion_shield_chlorophyte.name=Fusionsreaktor-Blanket (Grünalgen-bedampft)
|
||||
item.fusion_shield_desh.name=Fusionsreaktor-Blanket (Desh)
|
||||
item.fusion_shield_tungsten.name=usionsreaktor-Blanket (Wolfram)
|
||||
item.fusion_shield_tungsten.name=Fusionsreaktor-Blanket (Wolfram)
|
||||
item.fusion_shield_vaporwave.name=Fusionsreaktor-Blanket (Vaporwave)
|
||||
item.gadget_core.name=Plutoniumkern
|
||||
item.gadget_explosive.name=Sprenglinse erster Generation
|
||||
item.gadget_explosive8.name=Implosions-Treibladung erster Generation
|
||||
@ -1457,6 +1458,7 @@ item.powder_aluminium.name=Aluminiumstaub
|
||||
item.powder_asbestos.name=Asbeststaub
|
||||
item.powder_astatine.name=Astatstaub
|
||||
item.powder_australium.name=Australiumstaub
|
||||
item.powder_balefire.name=Thermonukleare Asche
|
||||
item.powder_beryllium.name=Berylliumstaub
|
||||
item.powder_bromine.name=Bromstaub
|
||||
item.powder_caesium.name=Caesiumstaub
|
||||
|
||||
@ -872,6 +872,7 @@ item.fusion_core_infinite.name=Infinite Fusion Core
|
||||
item.fusion_shield_chlorophyte.name=Chlorophyte-Metallized Fusion Reactor Blanket
|
||||
item.fusion_shield_desh.name=Desh Fusion Reactor Blanket
|
||||
item.fusion_shield_tungsten.name=Tungsten Fusion Reactor Blanket
|
||||
item.fusion_shield_vaporwave.name=Vaporwave Fusion Reactor Blanket
|
||||
item.gadget_core.name=Plutonium Core
|
||||
item.gadget_explosive.name=First Generation Explosive Lens
|
||||
item.gadget_explosive8.name=Bundle of First Generation Implosion Propellant
|
||||
@ -1457,6 +1458,7 @@ item.powder_aluminium.name=Aluminium Powder
|
||||
item.powder_asbestos.name=Asbestos Powder
|
||||
item.powder_astatine.name=Astatine Powder
|
||||
item.powder_australium.name=Australium Powder
|
||||
item.powder_balefire.name=Thermonuclear Ashes
|
||||
item.powder_beryllium.name=Beryllium Powder
|
||||
item.powder_bromine.name=Bromine Powder
|
||||
item.powder_caesium.name=Caesium Powder
|
||||
|
||||
BIN
src/main/java/assets/hbm/textures/blocks/struct_plasma_core.png
Normal file
BIN
src/main/java/assets/hbm/textures/blocks/struct_plasma_core.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 555 B |
BIN
src/main/java/assets/hbm/textures/gui/gui_nei_fusion.png
Normal file
BIN
src/main/java/assets/hbm/textures/gui/gui_nei_fusion.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 961 B |
Binary file not shown.
|
After Width: | Height: | Size: 384 B |
BIN
src/main/java/assets/hbm/textures/items/powder_balefire.png
Normal file
BIN
src/main/java/assets/hbm/textures/items/powder_balefire.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 366 B |
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
@ -478,6 +478,7 @@ public class ModBlocks {
|
||||
public static Block struct_launcher_core_large;
|
||||
public static Block struct_soyuz_core;
|
||||
public static Block struct_iter_core;
|
||||
public static Block struct_plasma_core;
|
||||
|
||||
public static Block factory_titanium_hull;
|
||||
public static Block factory_titanium_furnace;
|
||||
@ -1182,6 +1183,7 @@ public class ModBlocks {
|
||||
struct_launcher_core_large = new BlockStruct(Material.iron).setBlockName("struct_launcher_core_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":struct_launcher_core_large");
|
||||
struct_soyuz_core = new BlockSoyuzStruct(Material.iron).setBlockName("struct_soyuz_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":struct_soyuz_core");
|
||||
struct_iter_core = new BlockITERStruct(Material.iron).setBlockName("struct_iter_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":struct_iter_core");
|
||||
struct_plasma_core = new BlockPlasmaStruct(Material.iron).setBlockName("struct_plasma_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":struct_plasma_core");
|
||||
|
||||
factory_titanium_hull = new BlockGeneric(Material.iron).setBlockName("factory_titanium_hull").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":factory_titanium_hull");
|
||||
factory_titanium_furnace = new FactoryHatch(Material.iron).setBlockName("factory_titanium_furnace").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":factory_titanium_furnace");
|
||||
@ -1207,8 +1209,8 @@ public class ModBlocks {
|
||||
fusion_hatch = new FusionHatch(Material.iron).setBlockName("fusion_hatch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fusion_hatch");
|
||||
fusion_core = new FusionCore(Material.iron).setBlockName("fusion_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fusion_core_side");
|
||||
plasma = new BlockPlasma(Material.iron).setBlockName("plasma").setHardness(5.0F).setResistance(6000.0F).setLightLevel(1.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":plasma");
|
||||
iter = new MachineITER().setBlockName("iter").setHardness(5.0F).setResistance(6000.0F).setLightLevel(1.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":iter");
|
||||
plasma_heater = new MachinePlasmaHeater().setBlockName("plasma_heater").setHardness(5.0F).setResistance(6000.0F).setLightLevel(1.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":plasma_heater");
|
||||
iter = new MachineITER().setBlockName("iter").setHardness(5.0F).setResistance(6000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":iter");
|
||||
plasma_heater = new MachinePlasmaHeater().setBlockName("plasma_heater").setHardness(5.0F).setResistance(6000.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":plasma_heater");
|
||||
|
||||
watz_element = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_element_top").setBlockName("watz_element").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_element_side");
|
||||
watz_control = new BlockPillar(Material.iron, RefStrings.MODID + ":watz_control_top").setBlockName("watz_control").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":watz_control_side");
|
||||
@ -1907,6 +1909,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(struct_launcher_core_large, struct_launcher_core_large.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(struct_soyuz_core, struct_soyuz_core.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(struct_iter_core, struct_iter_core.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(struct_plasma_core, struct_plasma_core.getUnlocalizedName());
|
||||
|
||||
//Absorbers
|
||||
GameRegistry.registerBlock(absorber, absorber.getUnlocalizedName());
|
||||
|
||||
@ -195,7 +195,7 @@ public class NukeN2 extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(world, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
world.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(world, x, y, z, BombConfig.fleijaRadius);
|
||||
igniteTestBomb(world, x, y, z, BombConfig.n2Radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -208,7 +208,7 @@ public class NukeSolinium extends BlockContainer implements IBomb {
|
||||
this.onBlockDestroyedByPlayer(world, x, y, z, 1);
|
||||
entity.clearSlots();
|
||||
world.setBlockToAir(x, y, z);
|
||||
igniteTestBomb(world, x, y, z, BombConfig.fleijaRadius);
|
||||
igniteTestBomb(world, x, y, z, BombConfig.soliniumRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -51,7 +52,12 @@ public abstract class BlockMachineBase extends BlockContainer {
|
||||
|
||||
if (!keepInventory) {
|
||||
|
||||
ISidedInventory tileentityfurnace = (ISidedInventory)world.getTileEntity(x, y, z);
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(!(te instanceof ISidedInventory))
|
||||
return;
|
||||
|
||||
ISidedInventory tileentityfurnace = (ISidedInventory)te;
|
||||
|
||||
if (tileentityfurnace != null) {
|
||||
|
||||
|
||||
26
src/main/java/com/hbm/blocks/machine/BlockPlasmaStruct.java
Normal file
26
src/main/java/com/hbm/blocks/machine/BlockPlasmaStruct.java
Normal file
@ -0,0 +1,26 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.tileentity.machine.TileEntityPlasmaStruct;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockPlasmaStruct extends BlockMachineBase {
|
||||
|
||||
public BlockPlasmaStruct(Material mat) {
|
||||
super(mat, 0);
|
||||
this.rotatable = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityPlasmaStruct();
|
||||
}
|
||||
|
||||
public boolean isOpaqueCube() {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityITER;
|
||||
@ -11,6 +12,8 @@ import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@ -59,6 +62,8 @@ public class MachinePlasmaHeater extends BlockDummyable {
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {4, -3, 2, 1, 1, 1}, this, dir);
|
||||
|
||||
ForgeDirection side = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
for(int i = 1; i < 4; i++) {
|
||||
@ -68,6 +73,39 @@ public class MachinePlasmaHeater extends BlockDummyable {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
|
||||
float f = 0.0625F;
|
||||
|
||||
if(world.getBlockMetadata(x, y, z) == ForgeDirection.UP.ordinal() && world.getBlock(x, y + 1, z) != this) {
|
||||
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + f * 8F, z + 1);
|
||||
} else {
|
||||
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
|
||||
}
|
||||
}
|
||||
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
|
||||
float f = 0.0625F;
|
||||
|
||||
if(world.getBlockMetadata(x, y, z) == ForgeDirection.UP.ordinal() && world.getBlock(x, y + 1, z) != this) {
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, f * 8F, 1.0F);
|
||||
} else {
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, getDimensions(), x, y, z, dir))
|
||||
return false;
|
||||
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {4, -3, 1, 1, 1, 1}, x, y, z, dir))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
|
||||
@ -12,8 +12,8 @@ public class BombConfig {
|
||||
public static int tsarRadius = 500;
|
||||
public static int prototypeRadius = 150;
|
||||
public static int fleijaRadius = 50;
|
||||
public static int soliniumRadius = 75;
|
||||
public static int n2Radius = 100;
|
||||
public static int soliniumRadius = 150;
|
||||
public static int n2Radius = 200;
|
||||
public static int missileRadius = 100;
|
||||
public static int mirvRadius = 100;
|
||||
public static int fatmanRadius = 35;
|
||||
@ -65,10 +65,10 @@ public class BombConfig {
|
||||
Property propASchrab = config.get(CATEGORY_NUKES, "3.11_aSchrabRadius", 20);
|
||||
propASchrab.comment = "Radius of dropped anti schrabidium";
|
||||
aSchrabRadius = propASchrab.getInt();
|
||||
Property propSolinium = config.get(CATEGORY_NUKES, "3.12_soliniumRadius", 75);
|
||||
Property propSolinium = config.get(CATEGORY_NUKES, "3.12_soliniumRadius", 150);
|
||||
propSolinium.comment = "Radius of the blue rinse";
|
||||
soliniumRadius = propSolinium.getInt();
|
||||
Property propN2 = config.get(CATEGORY_NUKES, "3.13_n2Radius", 130);
|
||||
Property propN2 = config.get(CATEGORY_NUKES, "3.13_n2Radius", 200);
|
||||
propN2.comment = "Radius of the N2 mine";
|
||||
n2Radius = propN2.getInt();
|
||||
|
||||
|
||||
@ -563,7 +563,9 @@ public class EntityBulletBase extends Entity implements IProjectile {
|
||||
}
|
||||
|
||||
if(config.instakill && e instanceof EntityLivingBase && !worldObj.isRemote) {
|
||||
((EntityLivingBase)e).setHealth(0.0F);
|
||||
|
||||
if(!(e instanceof EntityPlayer && ((EntityPlayer)e).capabilities.isCreativeMode))
|
||||
((EntityLivingBase)e).setHealth(0.0F);
|
||||
}
|
||||
|
||||
if(config.caustic > 0 && e instanceof EntityPlayer){
|
||||
|
||||
@ -19,10 +19,8 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BookRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
public static ArrayList<Fuel> batteries;
|
||||
|
||||
public class RecipeSet extends TemplateRecipeHandler.CachedRecipe
|
||||
{
|
||||
public class RecipeSet extends TemplateRecipeHandler.CachedRecipe {
|
||||
|
||||
List<PositionedStack> input;
|
||||
PositionedStack result;
|
||||
|
||||
@ -47,16 +45,6 @@ public class BookRecipeHandler extends TemplateRecipeHandler {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Fuel
|
||||
{
|
||||
public Fuel(ItemStack ingred) {
|
||||
|
||||
this.stack = new PositionedStack(ingred, 3, 42, false);
|
||||
}
|
||||
|
||||
public PositionedStack stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
|
||||
122
src/main/java/com/hbm/handler/nei/FusionRecipeHandler.java
Normal file
122
src/main/java/com/hbm/handler/nei/FusionRecipeHandler.java
Normal file
@ -0,0 +1,122 @@
|
||||
package com.hbm.handler.nei;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.hbm.inventory.FusionRecipes;
|
||||
import com.hbm.inventory.gui.GUIITER;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class FusionRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
public LinkedList<RecipeTransferRect> transferRectsRec = new LinkedList<RecipeTransferRect>();
|
||||
public LinkedList<RecipeTransferRect> transferRectsGui = new LinkedList<RecipeTransferRect>();
|
||||
public LinkedList<Class<? extends GuiContainer>> guiRec = new LinkedList<Class<? extends GuiContainer>>();
|
||||
public LinkedList<Class<? extends GuiContainer>> guiGui = new LinkedList<Class<? extends GuiContainer>>();
|
||||
|
||||
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe {
|
||||
|
||||
PositionedStack input;
|
||||
PositionedStack result;
|
||||
|
||||
public SmeltingSet(ItemStack in, ItemStack out) {
|
||||
|
||||
this.input = new PositionedStack(in, 30, 24);
|
||||
this.result = new PositionedStack(out, 120, 24);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients() {
|
||||
|
||||
return new ArrayList() {{ add(input); }};
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionedStack getResult() {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return "Fusion Reactor";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
|
||||
if(outputId.equals("fusion") && getClass() == FusionRecipeHandler.class) {
|
||||
|
||||
Map<ItemStack, ItemStack> recipes = FusionRecipes.getRecipes();
|
||||
|
||||
for(Map.Entry<ItemStack, ItemStack> recipe : recipes.entrySet()) {
|
||||
this.arecipes.add(new SmeltingSet(recipe.getKey(), recipe.getValue()));
|
||||
}
|
||||
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
|
||||
Map<ItemStack, ItemStack> recipes = FusionRecipes.getRecipes();
|
||||
|
||||
for(Map.Entry<ItemStack, ItemStack> recipe : recipes.entrySet()) {
|
||||
|
||||
if(NEIServerUtils.areStacksSameTypeCrafting(recipe.getValue(), result)) {
|
||||
this.arecipes.add(new SmeltingSet(recipe.getKey(), recipe.getValue()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(String inputId, Object... ingredients) {
|
||||
|
||||
if(inputId.equals("fusion") && getClass() == FusionRecipeHandler.class) {
|
||||
loadCraftingRecipes("fusion", new Object[0]);
|
||||
} else {
|
||||
super.loadUsageRecipes(inputId, ingredients);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
|
||||
Map<ItemStack, ItemStack> recipes = FusionRecipes.getRecipes();
|
||||
|
||||
for(Map.Entry<ItemStack, ItemStack> recipe : recipes.entrySet()) {
|
||||
|
||||
if(NEIServerUtils.areStacksSameTypeCrafting(recipe.getKey(), ingredient)) {
|
||||
this.arecipes.add(new SmeltingSet(recipe.getKey(), recipe.getValue()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRectsGui = new LinkedList<RecipeTransferRect>();
|
||||
guiGui = new LinkedList<Class<? extends GuiContainer>>();
|
||||
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(52 - 5, 34 - 11, 18 * 4, 18), "fusion"));
|
||||
transferRectsGui.add(new RecipeTransferRect(new Rectangle(115 - 5, 17 - 11, 18, 18), "fusion"));
|
||||
guiGui.add(GUIITER.class);
|
||||
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
|
||||
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture() {
|
||||
return RefStrings.MODID + ":textures/gui/gui_nei_fusion.png";
|
||||
}
|
||||
}
|
||||
40
src/main/java/com/hbm/inventory/FusionRecipes.java
Normal file
40
src/main/java/com/hbm/inventory/FusionRecipes.java
Normal file
@ -0,0 +1,40 @@
|
||||
package com.hbm.inventory;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class FusionRecipes {
|
||||
|
||||
public static int getByproductChance(FluidType plasma) {
|
||||
|
||||
switch(plasma) {
|
||||
case PLASMA_XM: return 3 * 60 * 20;
|
||||
case PLASMA_BF: return 10 * 60 * 20;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static ItemStack getByproduct(FluidType plasma) {
|
||||
|
||||
switch(plasma) {
|
||||
case PLASMA_XM: return new ItemStack(ModItems.powder_chlorophyte);
|
||||
case PLASMA_BF: return new ItemStack(ModItems.powder_balefire);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static HashMap<ItemStack, ItemStack> getRecipes() {
|
||||
|
||||
HashMap<ItemStack, ItemStack> map = new HashMap();
|
||||
|
||||
map.put(new ItemStack(ModItems.fluid_icon, 1, FluidType.PLASMA_XM.ordinal()), new ItemStack(ModItems.powder_chlorophyte));
|
||||
map.put(new ItemStack(ModItems.fluid_icon, 1, FluidType.PLASMA_BF.ordinal()), new ItemStack(ModItems.powder_balefire));
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
@ -295,6 +295,7 @@ public class ModItems {
|
||||
public static Item powder_yellowcake;
|
||||
public static Item powder_magic;
|
||||
public static Item powder_cloud;
|
||||
public static Item powder_balefire;
|
||||
|
||||
public static Item fragment_neodymium;
|
||||
public static Item fragment_cobalt;
|
||||
@ -578,6 +579,7 @@ public class ModItems {
|
||||
public static Item fusion_shield_tungsten;
|
||||
public static Item fusion_shield_desh;
|
||||
public static Item fusion_shield_chlorophyte;
|
||||
public static Item fusion_shield_vaporwave;
|
||||
|
||||
public static Item cell_empty;
|
||||
public static Item cell_uf6;
|
||||
@ -2188,6 +2190,7 @@ public class ModItems {
|
||||
powder_yellowcake = new ItemRadioactive(0.5F).setUnlocalizedName("powder_yellowcake").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_yellowcake");
|
||||
powder_magic = new Item().setUnlocalizedName("powder_magic").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_magic");
|
||||
powder_cloud = new Item().setUnlocalizedName("powder_cloud").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_cloud");
|
||||
powder_balefire = new ItemRadioactive(500F, true).setUnlocalizedName("powder_balefire").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_balefire");
|
||||
|
||||
fragment_neodymium = new Item().setUnlocalizedName("fragment_neodymium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":fragment_neodymium");
|
||||
fragment_cobalt = new Item().setUnlocalizedName("fragment_cobalt").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":fragment_cobalt");
|
||||
@ -3317,6 +3320,7 @@ public class ModItems {
|
||||
fusion_shield_tungsten = new ItemFusionShield(60 * 60 * 60 * 5, 3500).setUnlocalizedName("fusion_shield_tungsten").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fusion_shield_tungsten");
|
||||
fusion_shield_desh = new ItemFusionShield(60 * 60 * 60 * 10, 4500).setUnlocalizedName("fusion_shield_desh").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fusion_shield_desh");
|
||||
fusion_shield_chlorophyte = new ItemFusionShield(60 * 60 * 60 * 15, 9000).setUnlocalizedName("fusion_shield_chlorophyte").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fusion_shield_chlorophyte");
|
||||
fusion_shield_vaporwave = new ItemFusionShield(60 * 60 * 60 * 10, 1916169).setUnlocalizedName("fusion_shield_vaporwave").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fusion_shield_vaporwave");
|
||||
|
||||
upgrade_template = new ItemCustomLore().setUnlocalizedName("upgrade_template").setMaxStackSize(1).setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":upgrade_template");
|
||||
upgrade_speed_1 = new ItemMachineUpgrade().setUnlocalizedName("upgrade_speed_1").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_speed_1");
|
||||
@ -4085,6 +4089,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(powder_asbestos, powder_asbestos.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_magic, powder_magic.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_cloud, powder_cloud.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_balefire, powder_balefire.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_semtex_mix, powder_semtex_mix.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_desh_mix, powder_desh_mix.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_desh_ready, powder_desh_ready.getUnlocalizedName());
|
||||
@ -4709,6 +4714,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(fusion_shield_tungsten, fusion_shield_tungsten.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fusion_shield_desh, fusion_shield_desh.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fusion_shield_chlorophyte, fusion_shield_chlorophyte.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fusion_shield_vaporwave, fusion_shield_vaporwave.getUnlocalizedName());
|
||||
|
||||
//Fuel Rods
|
||||
GameRegistry.registerItem(rod_empty, rod_empty.getUnlocalizedName());
|
||||
|
||||
@ -174,6 +174,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMultiblock.class, new RenderMultiblock());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySoyuzStruct.class, new RenderSoyuzMultiblock());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityITERStruct.class, new RenderITERMultiblock());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPlasmaStruct.class, new RenderPlasmaMultiblock());
|
||||
//ITER
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityITER.class, new RenderITER());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachinePlasmaHeater.class, new RenderPlasmaHeater());
|
||||
|
||||
@ -131,6 +131,7 @@ public class CraftingManager {
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.hazmat, 8), new Object[] { "###", "# #", "###", '#', ModItems.hazmat_cloth });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.hazmat_cloth, 1), new Object[] { "#", '#', ModBlocks.hazmat });
|
||||
GameRegistry.addRecipe(new ItemStack(ModItems.egg_balefire_shard, 1), new Object[] { "##", "##", '#', ModItems.powder_balefire });
|
||||
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.ingot_uranium_fuel, 1), new Object[] { "nuggetUranium235", "nuggetUranium235", "nuggetUranium235", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238" }));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModItems.ingot_uranium_fuel, 1), new Object[] { "nuggetUranium233", "nuggetUranium233", "nuggetUranium233", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238", "nuggetUranium238" }));
|
||||
|
||||
@ -421,6 +421,7 @@ public class MainRegistry {
|
||||
GameRegistry.registerTileEntity(TileEntityMachinePlasmaHeater.class, "tileentity_plasma_heater");
|
||||
GameRegistry.registerTileEntity(TileEntityMachineFENSU.class, "tileentity_fensu");
|
||||
GameRegistry.registerTileEntity(TileEntityTrappedBrick.class, "tileentity_trapped_brick");
|
||||
GameRegistry.registerTileEntity(TileEntityPlasmaStruct.class, "tileentity_plasma_struct");
|
||||
|
||||
EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true);
|
||||
|
||||
@ -33,8 +33,6 @@ public class NEIConfig implements IConfigureNEI {
|
||||
API.registerUsageHandler(new RefineryRecipeHandler());
|
||||
API.registerRecipeHandler(new BoilerRecipeHandler());
|
||||
API.registerUsageHandler(new BoilerRecipeHandler());
|
||||
//API.registerRecipeHandler(new ModInfoHandler());
|
||||
//API.registerUsageHandler(new ModInfoHandler());
|
||||
API.registerRecipeHandler(new ChemplantRecipeHandler());
|
||||
API.registerUsageHandler(new ChemplantRecipeHandler());
|
||||
API.registerRecipeHandler(new FluidRecipeHandler());
|
||||
@ -45,6 +43,8 @@ public class NEIConfig implements IConfigureNEI {
|
||||
API.registerUsageHandler(new CrystallizerRecipeHandler());
|
||||
API.registerRecipeHandler(new BookRecipeHandler());
|
||||
API.registerUsageHandler(new BookRecipeHandler());
|
||||
API.registerRecipeHandler(new FusionRecipeHandler());
|
||||
API.registerUsageHandler(new FusionRecipeHandler());
|
||||
|
||||
//Some things are even beyond my control...or are they?
|
||||
API.hideItem(new ItemStack(ModItems.memory));
|
||||
|
||||
@ -285,6 +285,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation iter_torus_tungsten = new ResourceLocation(RefStrings.MODID, "textures/models/iter/torus_tungsten.png");
|
||||
public static final ResourceLocation iter_torus_desh = new ResourceLocation(RefStrings.MODID, "textures/models/iter/torus_desh.png");
|
||||
public static final ResourceLocation iter_torus_chlorophyte = new ResourceLocation(RefStrings.MODID, "textures/models/iter/torus_chlorophyte.png");
|
||||
public static final ResourceLocation iter_torus_vaporwave = new ResourceLocation(RefStrings.MODID, "textures/models/iter/torus_vaporwave.png");
|
||||
|
||||
//FENSU
|
||||
public static final ResourceLocation fensu_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensu.png");
|
||||
|
||||
@ -37,6 +37,7 @@ public class RenderITER extends TileEntitySpecialRenderer {
|
||||
case 1: bindTexture(ResourceManager.iter_torus_tungsten); break;
|
||||
case 2: bindTexture(ResourceManager.iter_torus_desh); break;
|
||||
case 3: bindTexture(ResourceManager.iter_torus_chlorophyte); break;
|
||||
case 4: bindTexture(ResourceManager.iter_torus_vaporwave); break;
|
||||
default: bindTexture(ResourceManager.iter_torus); break;
|
||||
}
|
||||
ResourceManager.iter.renderPart("Torus");
|
||||
|
||||
@ -0,0 +1,60 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.render.util.IconUtil;
|
||||
import com.hbm.render.util.SmallBlockPronter;
|
||||
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderPlasmaMultiblock extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float f) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef((float)x + 0.5F, (float)y, (float)z + 0.5F);
|
||||
|
||||
switch(te.getBlockMetadata()) {
|
||||
case 2: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glTranslatef(-0.5F, 0, -0.5F);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
ResourceLocation heater = IconUtil.getTextureFromBlockAndSide(ModBlocks.fusion_heater, 2);
|
||||
bindTexture(heater);
|
||||
|
||||
for(int iy = 1; iy < 5; iy ++) {
|
||||
|
||||
for(int ix = 0; ix < 10; ix++) {
|
||||
|
||||
for(int iz = -2; iz < 3; iz++) {
|
||||
|
||||
SmallBlockPronter.renderSmolBlockAt(ix, iy, iz);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -9,6 +9,7 @@ import com.hbm.interfaces.IConsumer;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.FusionRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemFusionShield;
|
||||
import com.hbm.lib.Library;
|
||||
@ -16,6 +17,7 @@ import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Vec3;
|
||||
@ -83,6 +85,14 @@ public class TileEntityITER extends TileEntityMachineBase implements IConsumer,
|
||||
if(isOn && power >= powerReq) {
|
||||
power -= powerReq;
|
||||
|
||||
if(plasma.getFill() > 0) {
|
||||
|
||||
int chance = FusionRecipes.getByproductChance(plasma.getTankType());
|
||||
|
||||
if(chance > 0 && worldObj.rand.nextInt() == 0)
|
||||
produceByproduct();
|
||||
}
|
||||
|
||||
for(int i = 0; i < 20; i++) {
|
||||
|
||||
if(tanks[0].getFill() >= 10) {
|
||||
@ -118,6 +128,8 @@ public class TileEntityITER extends TileEntityMachineBase implements IConsumer,
|
||||
data.setInteger("blanket", 2);
|
||||
} else if(slots[3].getItem() == ModItems.fusion_shield_chlorophyte) {
|
||||
data.setInteger("blanket", 3);
|
||||
} else if(slots[3].getItem() == ModItems.fusion_shield_vaporwave) {
|
||||
data.setInteger("blanket", 4);
|
||||
}
|
||||
|
||||
this.networkPack(data, 250);
|
||||
@ -136,6 +148,31 @@ public class TileEntityITER extends TileEntityMachineBase implements IConsumer,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void produceByproduct() {
|
||||
|
||||
ItemStack by = FusionRecipes.getByproduct(plasma.getTankType());
|
||||
|
||||
if(by == null)
|
||||
return;
|
||||
|
||||
if(slots[4] == null) {
|
||||
slots[4] = by;
|
||||
return;
|
||||
}
|
||||
|
||||
if(slots[4].getItem() == by.getItem() && slots[4].getItemDamage() == by.getItemDamage() && slots[4].stackSize < slots[4].getMaxStackSize()) {
|
||||
slots[4].stackSize++;
|
||||
}
|
||||
}
|
||||
|
||||
public int getShield() {
|
||||
|
||||
if(slots[3] == null || !(slots[3].getItem() instanceof ItemFusionShield))
|
||||
return 273;
|
||||
|
||||
return ((ItemFusionShield)slots[3].getItem()).maxTemp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
@ -310,14 +347,6 @@ public class TileEntityITER extends TileEntityMachineBase implements IConsumer,
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
public int getShield() {
|
||||
|
||||
if(slots[3] == null || !(slots[3].getItem() instanceof ItemFusionShield))
|
||||
return 273;
|
||||
|
||||
return ((ItemFusionShield)slots[3].getItem()).maxTemp;
|
||||
}
|
||||
|
||||
public void disassemble() {
|
||||
|
||||
int[][][] layout = TileEntityITERStruct.layout;
|
||||
|
||||
@ -22,7 +22,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase implements IFluidAcceptor, IConsumer {
|
||||
|
||||
public static long power;
|
||||
public long power;
|
||||
public static final long maxPower = 100000000;
|
||||
|
||||
public FluidTank[] tanks;
|
||||
@ -61,15 +61,17 @@ public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase impleme
|
||||
convert = Math.min(convert, maxConv);
|
||||
convert = (int) Math.min(convert, power / powerReq);
|
||||
convert = Math.max(0, convert);
|
||||
|
||||
if(convert > 0) {
|
||||
|
||||
tanks[0].setFill(tanks[0].getFill() - convert);
|
||||
tanks[1].setFill(tanks[1].getFill() - convert);
|
||||
|
||||
plasma.setFill(plasma.getFill() + convert * 2);
|
||||
power -= convert * powerReq;
|
||||
|
||||
if(convert > 0)
|
||||
tanks[0].setFill(tanks[0].getFill() - convert);
|
||||
tanks[1].setFill(tanks[1].getFill() - convert);
|
||||
|
||||
plasma.setFill(plasma.getFill() + convert * 2);
|
||||
power -= convert * powerReq;
|
||||
|
||||
this.markDirty();
|
||||
}
|
||||
/// END Managing all the internal stuff ///
|
||||
|
||||
/// START Loading plasma into the ITER ///
|
||||
@ -112,10 +114,18 @@ public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase impleme
|
||||
for(int i = 0; i < tanks.length; i++)
|
||||
tanks[i].updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
plasma.updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setLong("power", power);
|
||||
this.networkPack(data, 50);
|
||||
/// END Notif packets ///
|
||||
}
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
this.power = nbt.getLong("power");
|
||||
}
|
||||
|
||||
private void updateType() {
|
||||
|
||||
//if(plasma.getFill() > 0)
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntityPlasmaStruct extends TileEntity {
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return TileEntity.INFINITE_EXTENT_AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user