Merge branch 'master' into master
13
changelog
@ -1,4 +1,12 @@
|
||||
## Added
|
||||
* Electrolysis machine
|
||||
* A large machine that can do the chemical plant's electrolysis recipes, as well as crystal processing
|
||||
* Crystals are turned into molten metals as well as byproducts, the metal can be cast using foundry blocks
|
||||
* Processing crystals requires nitric acid and yields more than what the centrifuge would give
|
||||
* Environment suit
|
||||
* An airtight suit for diving with high radiation resistance
|
||||
* Relatively cheap, but protection is comparatively low
|
||||
* Has sprint assist and accelerated diving
|
||||
|
||||
## Changed
|
||||
* Bedrock ores now spawn in the nether
|
||||
@ -8,8 +16,13 @@
|
||||
* All it took was battling NEI's source code for 3 hours and my sanity
|
||||
* Changed energy OC compatibility
|
||||
* Make sure to update your programs, as the getEnergyStored and getMaxEnergy have been deprecated.
|
||||
* The chlorocalcite centrifugation process now requires 8,000mB of sulfuric acid instead of 100mB of water
|
||||
* Mixed chlorocalcite solution now requires flux as a reducing agent
|
||||
* All chlorine producing electrolysis recipes have been moved to the electrolysis machine and can no longer be done in the chemical plant
|
||||
* If only there was a much simpler recipe that may have existed at some point, life could be a dream
|
||||
|
||||
## Fixed
|
||||
* Fixed custom machines not sending fluid
|
||||
* Fixed custom machine item IO not working beyond the first slot
|
||||
* Fixed target designators not accepting coordinates when not designated first (OC compatibility)
|
||||
* Fixed the player's arms clipping through the armor model when punching
|
||||
|
||||
@ -105,6 +105,10 @@ public class ArmorRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.dieselsuit_plate, 1), new Object[] { "W W", "CDC", "SWS", 'W', new ItemStack(Blocks.wool, 1, 14), 'S', STEEL.ingot(), 'C', ModItems.circuit_targeting_tier3, 'D', ModBlocks.machine_diesel });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.dieselsuit_legs, 1), new Object[] { "M M", "S S", "W W", 'W', new ItemStack(Blocks.wool, 1, 14), 'S', STEEL.ingot(), 'M', ModItems.motor });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.dieselsuit_boots, 1), new Object[] { "W W", "S S", 'W', new ItemStack(Blocks.wool, 1, 14), 'S', STEEL.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.envsuit_helmet, 1), new Object[] { "TCT", "TGT", "RRR", 'T', TI.plate(), 'C', ModItems.circuit_red_copper, 'G', KEY_ANYPANE, 'R', RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.envsuit_plate, 1), new Object[] { "T T", "TCT", "RRR", 'T', TI.plate(), 'C', TI.plateCast(), 'R', RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.envsuit_legs, 1), new Object[] { "TCT", "R R", "T T", 'T', TI.plate(), 'C', TI.plateCast(), 'R', RUBBER.ingot() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.envsuit_boots, 1), new Object[] { "R R", "T T", 'T', TI.plate(), 'R', RUBBER.ingot() });
|
||||
|
||||
//Bismuth fursui- I mean armor
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bismuth_helmet, 1), new Object[] { "GPP", "P ", "FPP", 'G', Items.gold_ingot, 'P', ModItems.plate_bismuth, 'F', ModItems.rag });
|
||||
|
||||
@ -53,6 +53,7 @@ public class HazmatRegistry {
|
||||
double t45 = 1D; // 90%
|
||||
double ajr = 1.3D; // 95%
|
||||
double bj = 1D; // 90%
|
||||
double env = 2D; // 99%
|
||||
double hev = 2.3D; // 99.5%
|
||||
double rpa = 2D; // 99%
|
||||
double fau = 4D; // 99.99%
|
||||
@ -108,6 +109,11 @@ public class HazmatRegistry {
|
||||
HazmatRegistry.registerHazmat(ModItems.steamsuit_legs, 1.3 * legs);
|
||||
HazmatRegistry.registerHazmat(ModItems.steamsuit_boots, 1.3 * boots);
|
||||
|
||||
HazmatRegistry.registerHazmat(ModItems.envsuit_helmet, env * helmet);
|
||||
HazmatRegistry.registerHazmat(ModItems.envsuit_plate, env * chest);
|
||||
HazmatRegistry.registerHazmat(ModItems.envsuit_legs, env * legs);
|
||||
HazmatRegistry.registerHazmat(ModItems.envsuit_boots, env * boots);
|
||||
|
||||
HazmatRegistry.registerHazmat(ModItems.hev_helmet, hev * helmet);
|
||||
HazmatRegistry.registerHazmat(ModItems.hev_plate, hev * chest);
|
||||
HazmatRegistry.registerHazmat(ModItems.hev_legs, hev * legs);
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
package com.hbm.handler.nei;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.gui.GUIElectrolyserFluid;
|
||||
import com.hbm.inventory.recipes.ElectrolyserFluidRecipes;
|
||||
|
||||
public class ElectrolyserFluidHandler extends NEIUniversalHandler {
|
||||
|
||||
public ElectrolyserFluidHandler() {
|
||||
super("Electrolysis", ModBlocks.machine_electrolyser, ElectrolyserFluidRecipes.getRecipes());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return "ntmElectrolysisFluid";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
super.loadTransferRects();
|
||||
transferRectsGui.add(new RecipeTransferRect(new Rectangle(57, 15, 12, 40), "ntmElectrolysisFluid"));
|
||||
guiGui.add(GUIElectrolyserFluid.class);
|
||||
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package com.hbm.handler.nei;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.gui.GUIElectrolyserMetal;
|
||||
import com.hbm.inventory.recipes.ElectrolyserMetalRecipes;
|
||||
|
||||
public class ElectrolyserMetalHandler extends NEIUniversalHandler {
|
||||
|
||||
public ElectrolyserMetalHandler() {
|
||||
super("Electrolysis", ModBlocks.machine_electrolyser, ElectrolyserMetalRecipes.getRecipes());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return "ntmElectrolysisMetal";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
super.loadTransferRects();
|
||||
transferRectsGui.add(new RecipeTransferRect(new Rectangle(2, 35, 22, 25), "ntmElectrolysisMetal"));
|
||||
guiGui.add(GUIElectrolyserMetal.class);
|
||||
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
|
||||
}
|
||||
}
|
||||
@ -1,12 +1,17 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotTakeOnly;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityElectrolyser;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerElectrolyserFluid extends Container {
|
||||
|
||||
@ -47,6 +52,48 @@ public class ContainerElectrolyserFluid extends Container {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if(var4 != null && var4.getHasStack()) {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if(par2 <= 13) {
|
||||
if(!this.mergeItemStack(var5, 14, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(var3.getItem() instanceof IBatteryItem || var3.getItem() == ModItems.battery_creative) {
|
||||
if(!this.mergeItemStack(var5, 0, 1, false)) {
|
||||
return null;
|
||||
}
|
||||
} else if(var3.getItem() instanceof ItemMachineUpgrade) {
|
||||
if(!this.mergeItemStack(var5, 1, 3, false)) {
|
||||
return null;
|
||||
}
|
||||
} else if(var3.getItem() instanceof IItemFluidIdentifier) {
|
||||
if(!this.mergeItemStack(var5, 3, 4, false)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if(var5.stackSize == 0) {
|
||||
var4.putStack((ItemStack) null);
|
||||
} else {
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return electrolyser.isUseableByPlayer(player);
|
||||
|
||||
@ -1,12 +1,16 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityElectrolyser;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerElectrolyserMetal extends Container {
|
||||
|
||||
@ -41,6 +45,46 @@ public class ContainerElectrolyserMetal extends Container {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if(var4 != null && var4.getHasStack()) {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if(par2 <= 10) {
|
||||
if(!this.mergeItemStack(var5, 11, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(var3.getItem() instanceof IBatteryItem || var3.getItem() == ModItems.battery_creative) {
|
||||
if(!this.mergeItemStack(var5, 0, 1, false)) {
|
||||
return null;
|
||||
}
|
||||
} else if(var3.getItem() instanceof ItemMachineUpgrade) {
|
||||
if(!this.mergeItemStack(var5, 1, 3, false)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
if(!this.mergeItemStack(var5, 3, 4, false)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(var5.stackSize == 0) {
|
||||
var4.putStack((ItemStack) null);
|
||||
} else {
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return electrolyser.isUseableByPlayer(player);
|
||||
|
||||
@ -320,9 +320,11 @@ public class GUIRBMKConsole extends GuiScreen {
|
||||
case FUEL_SIM:
|
||||
if(col.data.hasKey("c_heat")) {
|
||||
int fh = (int)Math.ceil((col.data.getDouble("c_heat") - 20) * 8 / col.data.getDouble("c_maxHeat"));
|
||||
if(fh > 8) fh = 8;
|
||||
drawTexturedModalRect(guiLeft + x + 1, guiTop + y + size - fh - 1, 11, 191 - fh, 2, fh);
|
||||
|
||||
int fe = (int)Math.ceil((col.data.getDouble("enrichment")) * 8);
|
||||
if(fe > 8) fe = 8;
|
||||
drawTexturedModalRect(guiLeft + x + 4, guiTop + y + size - fe - 1, 14, 191 - fe, 2, fe);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -399,15 +399,8 @@ public class ChemplantRecipes extends SerializableRecipe {
|
||||
.inputFluids(new FluidStack(Fluids.MUSTARDGAS, 4000))
|
||||
.outputItems(new ItemStack(ModItems.ammo_arty, 1, 11)));
|
||||
recipes.add(new ChemRecipe(101, "CC_CENTRIFUGE", 200)
|
||||
.inputFluids(new FluidStack(Fluids.CHLOROCALCITE_CLEANED, 500), new FluidStack(Fluids.WATER, 1_000))
|
||||
.inputFluids(new FluidStack(Fluids.CHLOROCALCITE_CLEANED, 500), new FluidStack(Fluids.SULFURIC_ACID, 8_000))
|
||||
.outputFluids(new FluidStack(Fluids.POTASSIUM_CHLORIDE, 250), new FluidStack(Fluids.CALCIUM_CHLORIDE, 250)));
|
||||
recipes.add(new ChemRecipe(102, "PC_ELECTROLYSIS", 200)
|
||||
.inputFluids(new FluidStack(Fluids.POTASSIUM_CHLORIDE, 250))
|
||||
.outputItems(new ItemStack(ModItems.dust))
|
||||
.outputFluids(new FluidStack(Fluids.CHLORINE, 125)));
|
||||
recipes.add(new ChemRecipe(103, "CC_ELECTROLYSIS", 200)
|
||||
.inputFluids(new FluidStack(Fluids.CALCIUM_CHLORIDE, 250))
|
||||
.outputFluids(new FluidStack(Fluids.CHLORINE, 125), new FluidStack(Fluids.CALCIUM_SOLUTION, 125)));
|
||||
}
|
||||
|
||||
public static void registerFuelProcessing() {
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
@ -10,8 +12,10 @@ import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@ -28,6 +32,25 @@ public class ElectrolyserFluidRecipes extends SerializableRecipe {
|
||||
recipes.put(Fluids.CALCIUM_CHLORIDE, new ElectrolysisRecipe(250, new FluidStack(Fluids.CHLORINE, 125), new FluidStack(Fluids.CALCIUM_SOLUTION, 125)));
|
||||
}
|
||||
|
||||
public static HashMap getRecipes() {
|
||||
|
||||
HashMap<Object, Object[]> recipes = new HashMap<Object, Object[]>();
|
||||
|
||||
for(Entry<FluidType, ElectrolysisRecipe> entry : ElectrolyserFluidRecipes.recipes.entrySet()) {
|
||||
|
||||
ElectrolysisRecipe recipe = entry.getValue();
|
||||
FluidStack input = new FluidStack(entry.getKey(), recipe.amount);
|
||||
List outputs = new ArrayList();
|
||||
if(recipe.output1.type != Fluids.NONE) outputs.add(ItemFluidIcon.make(recipe.output1));
|
||||
if(recipe.output2.type != Fluids.NONE) outputs.add(ItemFluidIcon.make(recipe.output2));
|
||||
for(ItemStack byproduct : recipe.byproduct) outputs.add(byproduct);
|
||||
|
||||
recipes.put(new ComparableStack(ItemFluidIcon.make(input)), outputs.toArray());
|
||||
}
|
||||
|
||||
return recipes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileName() {
|
||||
return "hbmElectrolyzerFluid.json";
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
@ -12,11 +13,14 @@ import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.material.MaterialShapes;
|
||||
import com.hbm.inventory.material.Mats;
|
||||
import com.hbm.inventory.material.Mats.MaterialStack;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.items.machine.ItemScraps;
|
||||
import com.hbm.util.ItemStackUtil;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -55,6 +59,25 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static HashMap getRecipes() {
|
||||
|
||||
HashMap<Object[], Object[]> recipes = new HashMap<Object[], Object[]>();
|
||||
|
||||
for(Entry<AStack, ElectrolysisMetalRecipe> entry : ElectrolyserMetalRecipes.recipes.entrySet()) {
|
||||
|
||||
ElectrolysisMetalRecipe recipe = entry.getValue();
|
||||
Object[] input = new Object[] { entry.getKey().copy(), new ComparableStack(ItemFluidIcon.make(Fluids.NITRIC_ACID, 100)) };
|
||||
List outputs = new ArrayList();
|
||||
if(recipe.output1 != null) outputs.add(ItemScraps.create(recipe.output1, true));
|
||||
if(recipe.output2 != null) outputs.add(ItemScraps.create(recipe.output2, true));
|
||||
for(ItemStack byproduct : recipe.byproduct) outputs.add(byproduct);
|
||||
|
||||
recipes.put(input, outputs.toArray());
|
||||
}
|
||||
|
||||
return recipes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileName() {
|
||||
return "hbmElectrolyzerMetal.json";
|
||||
|
||||
@ -79,7 +79,7 @@ public class MixerRecipes extends SerializableRecipe {
|
||||
|
||||
|
||||
register(Fluids.CHLOROCALCITE_SOLUTION, new MixerRecipe(500, 50).setStack1(new FluidStack(Fluids.WATER, 250)).setStack2(new FluidStack(Fluids.NITRIC_ACID, 250)).setSolid(new OreDictStack(CHLOROCALCITE.dust())));
|
||||
register(Fluids.CHLOROCALCITE_MIX, new MixerRecipe(1000, 50).setStack1(new FluidStack(Fluids.CHLOROCALCITE_SOLUTION, 500)).setStack2(new FluidStack(Fluids.SULFURIC_ACID, 500)));
|
||||
register(Fluids.CHLOROCALCITE_MIX, new MixerRecipe(1000, 50).setStack1(new FluidStack(Fluids.CHLOROCALCITE_SOLUTION, 500)).setStack2(new FluidStack(Fluids.SULFURIC_ACID, 500)).setSolid(new ComparableStack(ModItems.powder_flux)));
|
||||
}
|
||||
|
||||
public static void register(FluidType type, MixerRecipe... rec) {
|
||||
|
||||
@ -4866,17 +4866,17 @@ public class ModItems {
|
||||
|
||||
ArmorMaterial aMatEnv = EnumHelper.addArmorMaterial("HBM_ENV", 150, new int[] { 3, 8, 6, 3 }, 100);
|
||||
aMatEnv.customCraftingMaterial = ModItems.plate_armor_hev;
|
||||
envsuit_helmet = new ArmorEnvsuit(aMatEnv, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 2500, 0).setMod(0.5F).setThreshold(2.0F)
|
||||
envsuit_helmet = new ArmorEnvsuit(aMatEnv, 0, RefStrings.MODID + ":textures/armor/starmetal_1.png", 100_000, 1_000, 250, 0).setMod(0.5F).setThreshold(2.0F)
|
||||
.addEffect(new PotionEffect(Potion.moveSpeed.id, 20, 1))
|
||||
.addEffect(new PotionEffect(Potion.jump.id, 20, 0))
|
||||
.addResistance("fall", 0.75F)
|
||||
.addResistance("fall", 0.25F)
|
||||
.addResistance("monoxide", 0F)
|
||||
.addResistance("onFire", 0F)
|
||||
.hides(EnumPlayerPart.HAT)
|
||||
.setUnlocalizedName("envsuit_helmet").setTextureName(RefStrings.MODID + ":hev_helmet");
|
||||
envsuit_plate = new ArmorEnvsuit(aMatEnv, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 2500, 0).cloneStats((ArmorFSB) envsuit_helmet).setUnlocalizedName("envsuit_plate").setTextureName(RefStrings.MODID + ":hev_plate");
|
||||
envsuit_legs = new ArmorEnvsuit(aMatEnv, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 1000000, 10000, 2500, 0).cloneStats((ArmorFSB) envsuit_helmet).setUnlocalizedName("envsuit_legs").setTextureName(RefStrings.MODID + ":hev_legs");
|
||||
envsuit_boots = new ArmorEnvsuit(aMatEnv, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 1000000, 10000, 2500, 0).cloneStats((ArmorFSB) envsuit_helmet).setUnlocalizedName("envsuit_boots").setTextureName(RefStrings.MODID + ":hev_boots");
|
||||
.setUnlocalizedName("envsuit_helmet").setTextureName(RefStrings.MODID + ":envsuit_helmet");
|
||||
envsuit_plate = new ArmorEnvsuit(aMatEnv, 1, RefStrings.MODID + ":textures/armor/starmetal_1.png", 100_000, 1_000, 250, 0).cloneStats((ArmorFSB) envsuit_helmet).setUnlocalizedName("envsuit_plate").setTextureName(RefStrings.MODID + ":envsuit_plate");
|
||||
envsuit_legs = new ArmorEnvsuit(aMatEnv, 2, RefStrings.MODID + ":textures/armor/starmetal_2.png", 100_000, 1_000, 250, 0).cloneStats((ArmorFSB) envsuit_helmet).setUnlocalizedName("envsuit_legs").setTextureName(RefStrings.MODID + ":envsuit_legs");
|
||||
envsuit_boots = new ArmorEnvsuit(aMatEnv, 3, RefStrings.MODID + ":textures/armor/starmetal_1.png", 100_000, 1_000, 250, 0).cloneStats((ArmorFSB) envsuit_helmet).setUnlocalizedName("envsuit_boots").setTextureName(RefStrings.MODID + ":envsuit_boots");
|
||||
|
||||
ArmorMaterial aMatHEV = EnumHelper.addArmorMaterial("HBM_HEV", 150, new int[] { 3, 8, 6, 3 }, 100);
|
||||
aMatHEV.customCraftingMaterial = ModItems.plate_armor_hev;
|
||||
|
||||
@ -63,9 +63,10 @@ public class ArmorEnvsuit extends ArmorFSBPowered {
|
||||
|
||||
if(player.isInWater()) {
|
||||
|
||||
player.setAir(300);
|
||||
|
||||
player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 15 * 20, 0));
|
||||
if(!world.isRemote) {
|
||||
player.setAir(300);
|
||||
player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 15 * 20, 0));
|
||||
}
|
||||
|
||||
double mo = 0.1 * player.moveForward;
|
||||
Vec3 vec = player.getLookVec();
|
||||
@ -77,7 +78,7 @@ public class ArmorEnvsuit extends ArmorFSBPowered {
|
||||
player.motionY += vec.yCoord;
|
||||
player.motionZ += vec.zCoord;
|
||||
} else {
|
||||
if(player.isPotionActive(Potion.nightVision.id) && player.getActivePotionEffect(Potion.nightVision).getDuration() > 15 * 20) {
|
||||
if(!world.isRemote) {
|
||||
player.removePotionEffect(Potion.nightVision.id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
@ -21,7 +22,7 @@ import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemGlitch extends Item {
|
||||
public class ItemGlitch extends Item implements IBatteryItem {
|
||||
|
||||
public ItemGlitch()
|
||||
{
|
||||
@ -235,4 +236,12 @@ public class ItemGlitch extends Item {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override public void chargeBattery(ItemStack stack, long i) { }
|
||||
@Override public void setCharge(ItemStack stack, long i) { }
|
||||
@Override public void dischargeBattery(ItemStack stack, long i) { }
|
||||
@Override public long getCharge(ItemStack stack) { return 200; }
|
||||
@Override public long getMaxCharge() { return 200; }
|
||||
@Override public long getChargeRate() { return 0; }
|
||||
@Override public long getDischargeRate() { return 200; }
|
||||
}
|
||||
|
||||
@ -41,58 +41,60 @@ public class ItemPowerNetTool extends Item {
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(!(te instanceof IEnergyConductor))
|
||||
return false;
|
||||
|
||||
if(world.isRemote)
|
||||
return true;
|
||||
|
||||
IEnergyConductor con = (IEnergyConductor) te;
|
||||
IPowerNet net = con.getPowerNet();
|
||||
if((te instanceof IEnergyConductor)) {
|
||||
|
||||
IEnergyConductor con = (IEnergyConductor) te;
|
||||
IPowerNet net = con.getPowerNet();
|
||||
|
||||
if(net == null) {
|
||||
player.addChatComponentMessage(ChatBuilder.start("Error: No network found! This should be impossible!").color(EnumChatFormatting.RED).flush());
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!(net instanceof PowerNet)) {
|
||||
player.addChatComponentMessage(ChatBuilder.start("Error: Cannot print diagnostic for non-standard power net implementation!").color(EnumChatFormatting.RED).flush());
|
||||
}
|
||||
|
||||
PowerNet network = (PowerNet) net;
|
||||
String id = Integer.toHexString(net.hashCode());
|
||||
|
||||
player.addChatComponentMessage(ChatBuilder.start("Start of diagnostic for network " + id).color(EnumChatFormatting.GOLD).flush());
|
||||
player.addChatComponentMessage(ChatBuilder.start("Links: " + network.getLinks().size()).color(EnumChatFormatting.YELLOW).flush());
|
||||
player.addChatComponentMessage(ChatBuilder.start("Proxies: " + network.getProxies().size()).color(EnumChatFormatting.YELLOW).flush());
|
||||
player.addChatComponentMessage(ChatBuilder.start("Subscribers: " + network.getSubscribers().size()).color(EnumChatFormatting.YELLOW).flush());
|
||||
player.addChatComponentMessage(ChatBuilder.start("End of diagnostic for network " + id).color(EnumChatFormatting.GOLD).flush());
|
||||
|
||||
for(IEnergyConductor link : network.getLinks()) {
|
||||
Vec3 pos = link.getDebugParticlePos();
|
||||
|
||||
boolean errored = link.getPowerNet() != net;
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "debug");
|
||||
data.setInteger("color", errored ? 0xff0000 : 0xffff00);
|
||||
data.setFloat("scale", 0.5F);
|
||||
data.setString("text", id);
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, pos.xCoord, pos.yCoord, pos.zCoord), new TargetPoint(world.provider.dimensionId, pos.xCoord, pos.yCoord, pos.zCoord, radius));
|
||||
}
|
||||
|
||||
for(IEnergyConnector subscriber : network.getSubscribers()) {
|
||||
Vec3 pos = subscriber.getDebugParticlePos();
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "debug");
|
||||
data.setInteger("color", 0x0000ff);
|
||||
data.setFloat("scale", 1.5F);
|
||||
data.setString("text", id);
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, pos.xCoord, pos.yCoord, pos.zCoord), new TargetPoint(world.provider.dimensionId, pos.xCoord, pos.yCoord, pos.zCoord, radius));
|
||||
}
|
||||
|
||||
if(net == null) {
|
||||
player.addChatComponentMessage(ChatBuilder.start("Error: No network found! This should be impossible!").color(EnumChatFormatting.RED).flush());
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!(net instanceof PowerNet)) {
|
||||
player.addChatComponentMessage(ChatBuilder.start("Error: Cannot print diagnostic for non-standard power net implementation!").color(EnumChatFormatting.RED).flush());
|
||||
}
|
||||
|
||||
PowerNet network = (PowerNet) net;
|
||||
String id = Integer.toHexString(net.hashCode());
|
||||
|
||||
player.addChatComponentMessage(ChatBuilder.start("Start of diagnostic for network " + id).color(EnumChatFormatting.GOLD).flush());
|
||||
player.addChatComponentMessage(ChatBuilder.start("Links: " + network.getLinks().size()).color(EnumChatFormatting.YELLOW).flush());
|
||||
player.addChatComponentMessage(ChatBuilder.start("Proxies: " + network.getProxies().size()).color(EnumChatFormatting.YELLOW).flush());
|
||||
player.addChatComponentMessage(ChatBuilder.start("Subscribers: " + network.getSubscribers().size()).color(EnumChatFormatting.YELLOW).flush());
|
||||
player.addChatComponentMessage(ChatBuilder.start("End of diagnostic for network " + id).color(EnumChatFormatting.GOLD).flush());
|
||||
|
||||
for(IEnergyConductor link : network.getLinks()) {
|
||||
Vec3 pos = link.getDebugParticlePos();
|
||||
|
||||
boolean errored = link.getPowerNet() != net;
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "debug");
|
||||
data.setInteger("color", errored ? 0xff0000 : 0xffff00);
|
||||
data.setFloat("scale", 0.5F);
|
||||
data.setString("text", id);
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, pos.xCoord, pos.yCoord, pos.zCoord), new TargetPoint(world.provider.dimensionId, pos.xCoord, pos.yCoord, pos.zCoord, radius));
|
||||
}
|
||||
|
||||
for(IEnergyConnector subscriber : network.getSubscribers()) {
|
||||
Vec3 pos = subscriber.getDebugParticlePos();
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "debug");
|
||||
data.setInteger("color", 0x0000ff);
|
||||
data.setFloat("scale", 1.5F);
|
||||
data.setString("text", id);
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, pos.xCoord, pos.yCoord, pos.zCoord), new TargetPoint(world.provider.dimensionId, pos.xCoord, pos.yCoord, pos.zCoord, radius));
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private static final int radius = 20;
|
||||
|
||||
@ -73,6 +73,8 @@ public class NEIConfig implements IConfigureNEI {
|
||||
registerHandler(new SawmillHandler());
|
||||
registerHandler(new MixerHandler());
|
||||
registerHandler(new OutgasserHandler());
|
||||
registerHandler(new ElectrolyserFluidHandler());
|
||||
registerHandler(new ElectrolyserMetalHandler());
|
||||
|
||||
for(MachineConfiguration conf : CustomMachineConfigJSON.niceList) registerHandlerBypass(new CustomMachineHandler(conf));
|
||||
|
||||
|
||||
@ -1191,17 +1191,6 @@ public class ItemRenderLibrary {
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.machine_electrolyser), new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glScaled(3, 3, 3);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.electrolyser_tex); ResourceManager.electrolyser.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.red_pylon_large), new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -5, 0);
|
||||
|
||||
@ -12,6 +12,9 @@ public class ModelRendererObj {
|
||||
public float rotationPointX;
|
||||
public float rotationPointY;
|
||||
public float rotationPointZ;
|
||||
public float originPointX;
|
||||
public float originPointY;
|
||||
public float originPointZ;
|
||||
public float rotateAngleX;
|
||||
public float rotateAngleY;
|
||||
public float rotateAngleZ;
|
||||
@ -35,9 +38,9 @@ public class ModelRendererObj {
|
||||
}
|
||||
|
||||
public ModelRendererObj setRotationPoint(float x, float y, float z) {
|
||||
this.rotationPointX = x;
|
||||
this.rotationPointY = y;
|
||||
this.rotationPointZ = z;
|
||||
this.originPointX = this.rotationPointX = x;
|
||||
this.originPointY = this.rotationPointY = y;
|
||||
this.originPointZ = this.rotationPointZ = z;
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -90,7 +93,7 @@ public class ModelRendererObj {
|
||||
GL11.glRotatef(this.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
GL11.glTranslatef(-this.rotationPointX * scale, -this.rotationPointY * scale, -this.rotationPointZ * scale);
|
||||
GL11.glTranslatef(-this.rotationPointX * scale, -this.rotationPointY * scale, -this.originPointZ * scale); //yes, that is correct
|
||||
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
|
||||
172
src/main/java/com/hbm/render/loader/ModelRendererTest.java
Normal file
@ -0,0 +1,172 @@
|
||||
package com.hbm.render.loader;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBox;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
|
||||
public class ModelRendererTest extends ModelRenderer {
|
||||
|
||||
//TODO: blow up mojank HQ with a JDAM
|
||||
private boolean compiled;
|
||||
private int displayList;
|
||||
|
||||
public ModelRendererTest(ModelBase p_i1173_1_) {
|
||||
super(p_i1173_1_);
|
||||
}
|
||||
|
||||
public ModelRendererTest(ModelBase p_i1174_1_, int p_i1174_2_, int p_i1174_3_) {
|
||||
this(p_i1174_1_);
|
||||
this.setTextureOffset(p_i1174_2_, p_i1174_3_);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void render(float p_78785_1_) {
|
||||
if(!this.isHidden) {
|
||||
if(this.showModel) {
|
||||
if(!this.compiled) {
|
||||
this.compileDisplayList(p_78785_1_);
|
||||
}
|
||||
|
||||
GL11.glTranslatef(this.offsetX, this.offsetY, this.offsetZ);
|
||||
int i;
|
||||
|
||||
if(this.rotateAngleX == 0.0F && this.rotateAngleY == 0.0F && this.rotateAngleZ == 0.0F) {
|
||||
if(this.rotationPointX == 0.0F && this.rotationPointY == 0.0F && this.rotationPointZ == 0.0F) {
|
||||
GL11.glCallList(this.displayList);
|
||||
|
||||
if(this.childModels != null) {
|
||||
for(i = 0; i < this.childModels.size(); ++i) {
|
||||
((ModelRenderer) this.childModels.get(i)).render(p_78785_1_);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
GL11.glTranslatef(this.rotationPointX * p_78785_1_, this.rotationPointY * p_78785_1_, this.rotationPointZ * p_78785_1_);
|
||||
GL11.glCallList(this.displayList);
|
||||
|
||||
if(this.childModels != null) {
|
||||
for(i = 0; i < this.childModels.size(); ++i) {
|
||||
((ModelRenderer) this.childModels.get(i)).render(p_78785_1_);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glTranslatef(-this.rotationPointX * p_78785_1_, -this.rotationPointY * p_78785_1_, -this.rotationPointZ * p_78785_1_);
|
||||
}
|
||||
} else {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(this.rotationPointX * p_78785_1_, this.rotationPointY * p_78785_1_, this.rotationPointZ * p_78785_1_);
|
||||
|
||||
if(this.rotateAngleZ != 0.0F) {
|
||||
GL11.glRotatef(this.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
if(this.rotateAngleY != 0.0F) {
|
||||
GL11.glRotatef(this.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
if(this.rotateAngleX != 0.0F) {
|
||||
GL11.glRotatef(this.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScaled(0.1, 0.1, 0.1);
|
||||
ResourceManager.chemplant_body.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
//GL11.glCallList(this.displayList);
|
||||
|
||||
if(this.childModels != null) {
|
||||
for(i = 0; i < this.childModels.size(); ++i) {
|
||||
((ModelRenderer) this.childModels.get(i)).render(p_78785_1_);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glTranslatef(-this.offsetX, -this.offsetY, -this.offsetZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderWithRotation(float p_78791_1_) {
|
||||
if(!this.isHidden) {
|
||||
if(this.showModel) {
|
||||
if(!this.compiled) {
|
||||
this.compileDisplayList(p_78791_1_);
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(this.rotationPointX * p_78791_1_, this.rotationPointY * p_78791_1_, this.rotationPointZ * p_78791_1_);
|
||||
|
||||
if(this.rotateAngleY != 0.0F) {
|
||||
GL11.glRotatef(this.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
if(this.rotateAngleX != 0.0F) {
|
||||
GL11.glRotatef(this.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
if(this.rotateAngleZ != 0.0F) {
|
||||
GL11.glRotatef(this.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
GL11.glCallList(this.displayList);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void postRender(float p_78794_1_) {
|
||||
if(!this.isHidden) {
|
||||
if(this.showModel) {
|
||||
if(!this.compiled) {
|
||||
this.compileDisplayList(p_78794_1_);
|
||||
}
|
||||
|
||||
if(this.rotateAngleX == 0.0F && this.rotateAngleY == 0.0F && this.rotateAngleZ == 0.0F) {
|
||||
if(this.rotationPointX != 0.0F || this.rotationPointY != 0.0F || this.rotationPointZ != 0.0F) {
|
||||
GL11.glTranslatef(this.rotationPointX * p_78794_1_, this.rotationPointY * p_78794_1_, this.rotationPointZ * p_78794_1_);
|
||||
}
|
||||
} else {
|
||||
GL11.glTranslatef(this.rotationPointX * p_78794_1_, this.rotationPointY * p_78794_1_, this.rotationPointZ * p_78794_1_);
|
||||
|
||||
if(this.rotateAngleZ != 0.0F) {
|
||||
GL11.glRotatef(this.rotateAngleZ * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
if(this.rotateAngleY != 0.0F) {
|
||||
GL11.glRotatef(this.rotateAngleY * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
if(this.rotateAngleX != 0.0F) {
|
||||
GL11.glRotatef(this.rotateAngleX * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private void compileDisplayList(float p_78788_1_) {
|
||||
this.displayList = GLAllocation.generateDisplayLists(1);
|
||||
GL11.glNewList(this.displayList, GL11.GL_COMPILE);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
for(int i = 0; i < this.cubeList.size(); ++i) {
|
||||
((ModelBox) this.cubeList.get(i)).render(tessellator, p_78788_1_);
|
||||
}
|
||||
|
||||
GL11.glEndList();
|
||||
this.compiled = true;
|
||||
}
|
||||
}
|
||||
@ -40,6 +40,7 @@ public class ModelArmorBase extends ModelBiped {
|
||||
}
|
||||
|
||||
public void setRotationAngles(float walkCycle, float walkAmplitude, float idleCycle, float headYaw, float headPitch, float scale, Entity entity) {
|
||||
//super.setRotationAngles(walkCycle, walkAmplitude, idleCycle, headYaw, headPitch, scale, entity);
|
||||
|
||||
head.rotateAngleY = headYaw / (180F / (float) Math.PI);
|
||||
head.rotateAngleX = headPitch / (180F / (float) Math.PI);
|
||||
|
||||
@ -3,19 +3,20 @@ package com.hbm.render.tileentity;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.machine.TileEntityElectrolyser;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderElectrolyser extends TileEntitySpecialRenderer {
|
||||
public class RenderElectrolyser extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float interp) {
|
||||
|
||||
TileEntityElectrolyser electrolyser = (TileEntityElectrolyser) te;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
|
||||
@ -40,4 +41,25 @@ public class RenderElectrolyser extends TileEntitySpecialRenderer {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.machine_electrolyser);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(-1, -1, 0);
|
||||
GL11.glScaled(2.5, 2.5, 2.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.electrolyser_tex); ResourceManager.electrolyser.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -368,6 +368,44 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
|
||||
this.decrStackSize(14, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
this.power = nbt.getLong("power");
|
||||
this.progressFluid = nbt.getInteger("progressFluid");
|
||||
this.progressOre = nbt.getInteger("progressOre");
|
||||
this.usage = nbt.getInteger("usage");
|
||||
this.processFluidTime = nbt.getInteger("processFluidTime");
|
||||
this.processOreTime = nbt.getInteger("processOreTime");
|
||||
if(nbt.hasKey("leftType")) this.leftStack = new MaterialStack(Mats.matById.get(nbt.getInteger("leftType")), nbt.getInteger("leftAmount"));
|
||||
else this.leftStack = null;
|
||||
if(nbt.hasKey("rightType")) this.rightStack = new MaterialStack(Mats.matById.get(nbt.getInteger("rightType")), nbt.getInteger("rightAmount"));
|
||||
else this.rightStack = null;
|
||||
for(int i = 0; i < 4; i++) tanks[i].readFromNBT(nbt, "t" + i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
|
||||
nbt.setLong("power", this.power);
|
||||
nbt.setInteger("progressFluid", this.progressFluid);
|
||||
nbt.setInteger("progressOre", this.progressOre);
|
||||
nbt.setInteger("usage", this.usage);
|
||||
nbt.setInteger("processFluidTime", this.processFluidTime);
|
||||
nbt.setInteger("processOreTime", this.processOreTime);
|
||||
if(this.leftStack != null) {
|
||||
nbt.setInteger("leftType", leftStack.material.id);
|
||||
nbt.setInteger("leftAmount", leftStack.amount);
|
||||
}
|
||||
if(this.rightStack != null) {
|
||||
nbt.setInteger("rightType", rightStack.material.id);
|
||||
nbt.setInteger("rightAmount", rightStack.amount);
|
||||
}
|
||||
for(int i = 0; i < 4; i++) tanks[i].writeToNBT(nbt, "t" + i);
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
|
||||
@ -11,6 +11,8 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemRBMKRod;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.ColumnType;
|
||||
import com.hbm.util.Compat;
|
||||
import com.hbm.util.ParticleUtil;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -83,11 +85,18 @@ public class TileEntityRBMKRod extends TileEntityRBMKSlottedBase implements IRBM
|
||||
|
||||
super.updateEntity();
|
||||
|
||||
if(this.heat > this.maxHeat() && !RBMKDials.getMeltdownsDisabled(worldObj)) {
|
||||
this.meltdown();
|
||||
if(this.heat > this.maxHeat()) {
|
||||
|
||||
if(RBMKDials.getMeltdownsDisabled(worldObj)) {
|
||||
ParticleUtil.spawnGasFlame(worldObj, xCoord + 0.5, yCoord + RBMKDials.getColumnHeight(worldObj) + 0.5, zCoord + 0.5, 0, 0.2, 0);
|
||||
} else {
|
||||
this.meltdown();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.heat > 10_000) this.heat = 10_000;
|
||||
|
||||
//for spreading, we want the buffered flux to be 0 because we want to know exactly how much gets reflected back
|
||||
this.fluxFast = 0;
|
||||
this.fluxSlow = 0;
|
||||
|
||||
219
src/main/resources/assets/hbm/models/armor/test.obj
Normal file
@ -0,0 +1,219 @@
|
||||
# Blender v2.79 (sub 0) OBJ File: 'test.blend'
|
||||
# www.blender.org
|
||||
o Chest
|
||||
v -4.000000 12.000000 2.000000
|
||||
v 4.000000 12.000000 2.000000
|
||||
v -4.000000 12.000000 -2.000000
|
||||
v 4.000000 12.000000 -2.000000
|
||||
v 4.000000 0.000000 -2.000000
|
||||
v -4.000000 0.000000 -2.000000
|
||||
v 4.000000 0.000000 2.000000
|
||||
v -4.000000 0.000000 2.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
s off
|
||||
f 5/1/1 2/2/1 7/3/1
|
||||
f 8/4/2 3/5/2 6/6/2
|
||||
f 6/6/3 4/7/3 5/1/3
|
||||
f 7/3/4 1/8/4 8/4/4
|
||||
f 2/2/5 3/5/5 1/8/5
|
||||
f 6/6/6 7/3/6 8/4/6
|
||||
f 5/1/1 4/7/1 2/2/1
|
||||
f 8/4/2 1/8/2 3/5/2
|
||||
f 6/6/3 3/5/3 4/7/3
|
||||
f 7/3/4 2/2/4 1/8/4
|
||||
f 2/2/5 4/7/5 3/5/5
|
||||
f 6/6/6 5/1/6 7/3/6
|
||||
o LeftArm
|
||||
v 4.000000 12.000000 2.000000
|
||||
v 8.000000 12.000000 2.000000
|
||||
v 4.000000 12.000000 -2.000000
|
||||
v 8.000000 12.000000 -2.000000
|
||||
v 8.000000 0.000000 -2.000000
|
||||
v 4.000000 0.000000 -2.000000
|
||||
v 8.000000 0.000000 2.000000
|
||||
v 4.000000 0.000000 2.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
s off
|
||||
f 13/9/7 10/10/7 15/11/7
|
||||
f 16/12/8 11/13/8 14/14/8
|
||||
f 14/14/9 12/15/9 13/9/9
|
||||
f 15/11/10 9/16/10 16/12/10
|
||||
f 10/10/11 11/13/11 9/16/11
|
||||
f 14/14/12 15/11/12 16/12/12
|
||||
f 13/9/7 12/15/7 10/10/7
|
||||
f 16/12/8 9/16/8 11/13/8
|
||||
f 14/14/9 11/13/9 12/15/9
|
||||
f 15/11/10 10/10/10 9/16/10
|
||||
f 10/10/11 12/15/11 11/13/11
|
||||
f 14/14/12 13/9/12 15/11/12
|
||||
o RightArm
|
||||
v -8.000000 12.000000 2.000000
|
||||
v -4.000000 12.000000 2.000000
|
||||
v -8.000000 12.000000 -2.000000
|
||||
v -4.000000 12.000000 -2.000000
|
||||
v -4.000000 0.000000 -2.000000
|
||||
v -8.000000 0.000000 -2.000000
|
||||
v -4.000000 0.000000 2.000000
|
||||
v -8.000000 0.000000 2.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
s off
|
||||
f 21/17/13 18/18/13 23/19/13
|
||||
f 24/20/14 19/21/14 22/22/14
|
||||
f 22/22/15 20/23/15 21/17/15
|
||||
f 23/19/16 17/24/16 24/20/16
|
||||
f 18/18/17 19/21/17 17/24/17
|
||||
f 22/22/18 23/19/18 24/20/18
|
||||
f 21/17/13 20/23/13 18/18/13
|
||||
f 24/20/14 17/24/14 19/21/14
|
||||
f 22/22/15 19/21/15 20/23/15
|
||||
f 23/19/16 18/18/16 17/24/16
|
||||
f 18/18/17 20/23/17 19/21/17
|
||||
f 22/22/18 21/17/18 23/19/18
|
||||
o RightLeg
|
||||
v -4.000000 24.000000 2.000000
|
||||
v 0.000000 24.000000 2.000000
|
||||
v -4.000000 24.000000 -2.000000
|
||||
v 0.000000 24.000000 -2.000000
|
||||
v 0.000000 12.000000 -2.000000
|
||||
v -4.000000 12.000000 -2.000000
|
||||
v 0.000000 12.000000 2.000000
|
||||
v -4.000000 12.000000 2.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
s off
|
||||
f 29/25/19 26/26/19 31/27/19
|
||||
f 32/28/20 27/29/20 30/30/20
|
||||
f 30/30/21 28/31/21 29/25/21
|
||||
f 31/27/22 25/32/22 32/28/22
|
||||
f 26/26/23 27/29/23 25/32/23
|
||||
f 30/30/24 31/27/24 32/28/24
|
||||
f 29/25/19 28/31/19 26/26/19
|
||||
f 32/28/20 25/32/20 27/29/20
|
||||
f 30/30/21 27/29/21 28/31/21
|
||||
f 31/27/22 26/26/22 25/32/22
|
||||
f 26/26/23 28/31/23 27/29/23
|
||||
f 30/30/24 29/25/24 31/27/24
|
||||
o LeftLeg
|
||||
v 0.000000 24.000000 2.000000
|
||||
v 4.000000 24.000000 2.000000
|
||||
v 0.000000 24.000000 -2.000000
|
||||
v 4.000000 24.000000 -2.000000
|
||||
v 4.000000 12.000000 -2.000000
|
||||
v 0.000000 12.000000 -2.000000
|
||||
v 4.000000 12.000000 2.000000
|
||||
v 0.000000 12.000000 2.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
s off
|
||||
f 37/33/25 34/34/25 39/35/25
|
||||
f 40/36/26 35/37/26 38/38/26
|
||||
f 38/38/27 36/39/27 37/33/27
|
||||
f 39/35/28 33/40/28 40/36/28
|
||||
f 34/34/29 35/37/29 33/40/29
|
||||
f 38/38/30 39/35/30 40/36/30
|
||||
f 37/33/25 36/39/25 34/34/25
|
||||
f 40/36/26 33/40/26 35/37/26
|
||||
f 38/38/27 35/37/27 36/39/27
|
||||
f 39/35/28 34/34/28 33/40/28
|
||||
f 34/34/29 36/39/29 35/37/29
|
||||
f 38/38/30 37/33/30 39/35/30
|
||||
o Helmet
|
||||
v 25.451866 -3.037100 4.881973
|
||||
v -4.000000 0.000000 4.000000
|
||||
v 4.000000 0.000000 4.000000
|
||||
v -4.000000 0.000000 -4.000000
|
||||
v 4.000000 0.000000 -4.000000
|
||||
v 4.000000 -8.000000 -4.000000
|
||||
v -4.000000 -8.000000 -4.000000
|
||||
v 4.000000 -8.000000 4.000000
|
||||
v -4.000000 -8.000000 4.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
s off
|
||||
f 46/41/31 43/42/31 48/43/31
|
||||
f 49/44/32 44/45/32 47/46/32
|
||||
f 47/46/33 45/47/33 46/41/33
|
||||
f 48/43/34 42/48/34 49/44/34
|
||||
f 43/42/35 44/45/35 42/48/35
|
||||
f 47/46/36 48/43/36 49/44/36
|
||||
f 46/41/31 45/47/31 43/42/31
|
||||
f 49/44/32 42/48/32 44/45/32
|
||||
f 47/46/33 44/45/33 45/47/33
|
||||
f 48/43/34 43/42/34 42/48/34
|
||||
f 43/42/35 45/47/35 44/45/35
|
||||
f 47/46/36 46/41/36 48/43/36
|
||||
|
Before Width: | Height: | Size: 332 B After Width: | Height: | Size: 344 B |
|
Before Width: | Height: | Size: 366 B After Width: | Height: | Size: 404 B |
|
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 357 B |
|
Before Width: | Height: | Size: 347 B After Width: | Height: | Size: 344 B |
|
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 361 B |
|
Before Width: | Height: | Size: 351 B After Width: | Height: | Size: 362 B |
BIN
src/main/resources/assets/hbm/textures/items/envsuit_boots.png
Normal file
|
After Width: | Height: | Size: 154 B |
BIN
src/main/resources/assets/hbm/textures/items/envsuit_helmet.png
Normal file
|
After Width: | Height: | Size: 252 B |
BIN
src/main/resources/assets/hbm/textures/items/envsuit_legs.png
Normal file
|
After Width: | Height: | Size: 282 B |
BIN
src/main/resources/assets/hbm/textures/items/envsuit_plate.png
Normal file
|
After Width: | Height: | Size: 258 B |