chunkier fatman, silicon compat
@ -4,6 +4,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.IBlockMulti;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.projectile.EntityShrapnel;
|
||||
@ -28,7 +29,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockVolcano extends BlockContainer implements ITooltipProvider {
|
||||
public class BlockVolcano extends BlockContainer implements ITooltipProvider, IBlockMulti {
|
||||
|
||||
public BlockVolcano() {
|
||||
super(Material.iron);
|
||||
@ -38,6 +39,11 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider {
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityVolcanoCore();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSubCount() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
@ -299,7 +305,7 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider {
|
||||
|
||||
/* count per tick, radius, depth */
|
||||
private Object[] surfaceMeltingParams() {
|
||||
return this.getBlockMetadata() == META_SMOLDERING ? new Object[] {2, 50D, 10D} : null;
|
||||
return this.getBlockMetadata() == META_SMOLDERING ? new Object[] {50, 50D, 10D} : null;
|
||||
}
|
||||
|
||||
private int getUpdateRate() {
|
||||
@ -307,7 +313,7 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider {
|
||||
case META_STATIC_EXTINGUISHING: return 60 * 60 * 20; //once per hour
|
||||
case META_GROWING_ACTIVE:
|
||||
case META_GROWING_EXTINGUISHING: return 60 * 60 * 20 / 250; //250x per hour
|
||||
default: return 1;
|
||||
default: return 10;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,6 +48,6 @@ public class RadiationConfig {
|
||||
disableExplosive = CommonConfig.createConfigBool(config, CATEGORY_HAZ, "HAZ_03_disableExplosive", "When turned off, all explosive hazards are disabled", false);
|
||||
disableHydro = CommonConfig.createConfigBool(config, CATEGORY_HAZ, "HAZ_04_disableHydroactive", "When turned off, all hydroactive hazards are disabled", false);
|
||||
disableBlinding = CommonConfig.createConfigBool(config, CATEGORY_HAZ, "HAZ_05_disableBlinding", "When turned off, all blinding hazards are disabled", false);
|
||||
disableFibrosis = CommonConfig.createConfigBool(config, CATEGORY_HAZ, "HAZ_06_disableFibrosis", "When turned off, all firbosis hazards are disabled", false);
|
||||
disableFibrosis = CommonConfig.createConfigBool(config, CATEGORY_HAZ, "HAZ_06_disableFibrosis", "When turned off, all fibrosis hazards are disabled", false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,6 +22,11 @@ public class EntityMeteor extends Entity {
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
if(!worldObj.isRemote && !WorldConfig.enableMeteorStrikes) {
|
||||
this.setDead();
|
||||
return;
|
||||
}
|
||||
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
|
||||
@ -10,68 +10,55 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
//@invtweaks.api.container.ChestContainer(rowSize = 5)
|
||||
public class ContainerSafe extends Container {
|
||||
|
||||
|
||||
private TileEntitySafe diFurnace;
|
||||
|
||||
|
||||
public ContainerSafe(InventoryPlayer invPlayer, TileEntitySafe tedf) {
|
||||
diFurnace = tedf;
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 5; j++)
|
||||
{
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 5; j++) {
|
||||
this.addSlotToContainer(new Slot(tedf, j + i * 5, 8 + j * 18 + 18 * 2, 18 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 2));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 2));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
|
||||
if(var4 != null && var4.getHasStack()) {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 <= diFurnace.getSizeInventory() - 1) {
|
||||
if (!this.mergeItemStack(var5, diFurnace.getSizeInventory(), this.inventorySlots.size(), true))
|
||||
{
|
||||
|
||||
if(par2 <= diFurnace.getSizeInventory() - 1) {
|
||||
if(!this.mergeItemStack(var5, diFurnace.getSizeInventory(), this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else if(!this.mergeItemStack(var5, 0, diFurnace.getSizeInventory(), false)) {
|
||||
return null;
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 0, diFurnace.getSizeInventory(), false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
|
||||
if(var5.stackSize == 0) {
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return var3;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
|
||||
@ -10,7 +10,6 @@ import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
||||
@ -155,7 +155,6 @@ public class ShredderRecipes extends SerializableRecipe {
|
||||
ShredderRecipes.setRecipe(Blocks.cobblestone, new ItemStack(Blocks.gravel, 1));
|
||||
ShredderRecipes.setRecipe(Blocks.stonebrick, new ItemStack(Blocks.gravel, 1));
|
||||
ShredderRecipes.setRecipe(Blocks.gravel, new ItemStack(Blocks.sand, 1));
|
||||
ShredderRecipes.setRecipe(Blocks.sand, new ItemStack(ModItems.dust, 2));
|
||||
ShredderRecipes.setRecipe(Blocks.brick_block, new ItemStack(Items.clay_ball, 4));
|
||||
ShredderRecipes.setRecipe(Blocks.brick_stairs, new ItemStack(Items.clay_ball, 3));
|
||||
ShredderRecipes.setRecipe(Items.flower_pot, new ItemStack(Items.clay_ball, 3));
|
||||
@ -195,6 +194,13 @@ public class ShredderRecipes extends SerializableRecipe {
|
||||
ShredderRecipes.setRecipe(Items.fermented_spider_eye, new ItemStack(ModItems.powder_poison, 3));
|
||||
ShredderRecipes.setRecipe(Items.poisonous_potato, new ItemStack(ModItems.powder_poison, 1));
|
||||
ShredderRecipes.setRecipe(ModBlocks.ore_tektite_osmiridium, new ItemStack(ModItems.powder_tektite, 1));
|
||||
|
||||
List<ItemStack> silicon = OreDictionary.getOres("itemSilicon");
|
||||
if(!silicon.isEmpty()) {
|
||||
ShredderRecipes.setRecipe(Blocks.sand, silicon.get(0).copy());
|
||||
} else {
|
||||
ShredderRecipes.setRecipe(Blocks.sand, new ItemStack(ModItems.dust, 2));
|
||||
}
|
||||
|
||||
for(int i = 0; i < 5; i++) ShredderRecipes.setRecipe(new ItemStack(Items.skull, 1, i), new ItemStack(ModItems.biomass));
|
||||
|
||||
|
||||
@ -153,11 +153,20 @@ public class ItemRBMKRod extends Item {
|
||||
|
||||
double coreHeat = this.getCoreHeat(stack);
|
||||
coreHeat += outFlux * heat;
|
||||
this.setCoreHeat(stack, coreHeat);
|
||||
|
||||
this.setCoreHeat(stack, rectify(coreHeat));
|
||||
|
||||
return outFlux;
|
||||
}
|
||||
|
||||
private double rectify(double num) {
|
||||
|
||||
if(num > 1_000_000D) num = 1_000_000D;
|
||||
if(num < 20D || Double.isNaN(num)) num = 20D;
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
/**
|
||||
* Heat up the core based on the outFlux, then move some heat to the hull
|
||||
* @param stack
|
||||
@ -174,8 +183,8 @@ public class ItemRBMKRod extends Item {
|
||||
coreHeat -= mid * this.diffusion * RBMKDials.getFuelDiffusionMod(world) * mod;
|
||||
hullHeat += mid * this.diffusion * RBMKDials.getFuelDiffusionMod(world) * mod;
|
||||
|
||||
this.setCoreHeat(stack, coreHeat);
|
||||
this.setHullHeat(stack, hullHeat);
|
||||
this.setCoreHeat(stack, rectify(coreHeat));
|
||||
this.setHullHeat(stack, rectify(hullHeat));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (4389)";
|
||||
public static final String VERSION = "1.0.27 BETA (4395)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -230,7 +230,7 @@ public class ResourceManager {
|
||||
//Bombs
|
||||
public static final IModelCustom bomb_gadget = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/TheGadget3.obj"));
|
||||
public static final IModelCustom bomb_boy = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/LilBoy1.obj"));
|
||||
public static final IModelCustom bomb_man = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/FatMan.obj"));
|
||||
public static final IModelCustom bomb_man = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/FatMan.obj")).asDisplayList();
|
||||
public static final IModelCustom bomb_mike = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/IvyMike.obj"));
|
||||
public static final IModelCustom bomb_tsar = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/TsarBomba.obj"));
|
||||
public static final IModelCustom bomb_prototype = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/Prototype.obj"));
|
||||
|
||||
@ -442,20 +442,6 @@ public class ItemRenderLibrary {
|
||||
ResourceManager.bomb_boy.renderAll();
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.nuke_man), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2, 0);
|
||||
GL11.glScaled(5.5, 5.5, 5.5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glRotated(180, 0, 1, 0);
|
||||
GL11.glTranslated(-0.75, 0, 0);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
bindTexture(ResourceManager.bomb_man_tex);
|
||||
ResourceManager.bomb_man.renderAll();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.nuke_mike), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -5, 0);
|
||||
|
||||
@ -2,38 +2,64 @@ package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
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 RenderNukeMan extends TileEntitySpecialRenderer {
|
||||
public class RenderNukeMan extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
switch(tileEntity.getBlockMetadata())
|
||||
{
|
||||
case 3:
|
||||
GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 5:
|
||||
GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 2:
|
||||
GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 4:
|
||||
GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
switch(tileEntity.getBlockMetadata()) {
|
||||
case 3: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 2: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
bindTexture(ResourceManager.bomb_man_tex);
|
||||
ResourceManager.bomb_man.renderAll();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.bomb_man_tex);
|
||||
ResourceManager.bomb_man.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.nuke_man);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2, 0);
|
||||
GL11.glScaled(5, 5, 5);
|
||||
}
|
||||
|
||||
public void renderCommon() {
|
||||
GL11.glRotated(180, 0, 1, 0);
|
||||
GL11.glTranslated(-0.75, 0, 0);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
bindTexture(ResourceManager.bomb_man_tex);
|
||||
ResourceManager.bomb_man.renderAll();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -46,10 +46,11 @@ public class TileEntityCore extends TileEntityMachineBase {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
int chunkX = xCoord << 4;
|
||||
int chunkZ = zCoord << 4;
|
||||
int chunkX = xCoord >> 4;
|
||||
int chunkZ = zCoord >> 4;
|
||||
|
||||
lastTickValid = worldObj.getChunkProvider().chunkExists(chunkX + 1, chunkZ + 1) &&
|
||||
lastTickValid = worldObj.getChunkProvider().chunkExists(chunkX, chunkZ) &&
|
||||
worldObj.getChunkProvider().chunkExists(chunkX + 1, chunkZ + 1) &&
|
||||
worldObj.getChunkProvider().chunkExists(chunkX + 1, chunkZ - 1) &&
|
||||
worldObj.getChunkProvider().chunkExists(chunkX - 1, chunkZ + 1) &&
|
||||
worldObj.getChunkProvider().chunkExists(chunkX - 1, chunkZ - 1);
|
||||
|
||||
@ -46,7 +46,7 @@ public class TileEntityRBMKHeater extends TileEntityRBMKSlottedBase implements I
|
||||
double heatCap = this.getConversionHeat(feed.getTankType());
|
||||
double heatProvided = this.heat - heatCap;
|
||||
|
||||
if(heatProvided > 0) {
|
||||
if(heatProvided > 0 && steam.getTankType() != Fluids.NONE) {
|
||||
|
||||
double capacity = feed.getTankType().heatCap;
|
||||
int converted = (int)Math.floor(heatProvided / capacity);
|
||||
|
||||
|
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 521 B |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
@ -3,7 +3,7 @@
|
||||
"modid": "hbm",
|
||||
"name": "Hbm's Nuclear Tech",
|
||||
"description": "A mod that adds weapons, nuclear themed stuff and machines",
|
||||
"version":"1.0.27_X4389",
|
||||
"version":"1.0.27_X4395",
|
||||
"mcversion": "1.7.10",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
|
||||