suffering builds character

This commit is contained in:
Bob 2023-08-05 16:33:23 +02:00
parent 77dc34c5a8
commit ef44b79f83
29 changed files with 2232 additions and 1607 deletions

View File

@ -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
@ -9,4 +17,5 @@
## Fixed
* Fixed custom machines not sending fluid
* Fixed custom machine item IO not working beyond the first slot
* Fixed custom machine item IO not working beyond the first slot
* Fixed the player's arms clipping through the armor model when punching

View File

@ -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 });

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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; }
}

View File

@ -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(net == null) {
player.addChatComponentMessage(ChatBuilder.start("Error: No network found! This should be impossible!").color(EnumChatFormatting.RED).flush());
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));
}
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;

View File

@ -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);

View File

@ -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);

View 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;
}
}

View File

@ -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);

View File

@ -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);
}
};
}
}

View File

@ -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

View File

@ -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;

File diff suppressed because it is too large Load Diff

View 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 B

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 B

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 B

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 B

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B