blast furnace recipe configs, fixes, scrollable anvil item list

This commit is contained in:
Bob 2023-02-26 21:37:07 +01:00
parent af1a5d37ce
commit 0eb25c418d
18 changed files with 9748 additions and 125 deletions

View File

@ -1,6 +1,6 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=4515
mod_build_number=4522
credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms),\
\ Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models, porting),\
@ -11,4 +11,4 @@ credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion al
\ Sten89 (models), Pixelguru26 (textures), TheBlueHat (textures), Alcater (GUI textures, porting), impbk2002 (project settings),\
\ OvermindDL1 (project settings), TehTemmie (reacher radiation function), Toshayo (satellite loot system, project settings), Silly541 (config for safe ME drives),\
\ Voxelstice (OpenComputers integration, turbine spinup), martemen (project settings), Pvndols (thorium fuel recipe, gas turbine), JamesH2 (blood, nitric acid),\
\ sdddddf80 (mixer recipe config)
\ sdddddf80 (mixer recipe config), SuperCraftAlex (tooltips)

View File

@ -666,7 +666,6 @@ public class ModBlocks {
//public static final int guiID_test_difurnace = 1; historical
public static Block machine_centrifuge;
public static Block machine_gascent;
public static Block machine_fel;

View File

@ -1,7 +1,6 @@
package com.hbm.blocks.machine;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ModBlocks;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.TileEntityMachineCentrifuge;

View File

@ -1,32 +1,16 @@
package com.hbm.blocks.machine;
import java.util.Random;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ModBlocks;
import com.hbm.handler.MultiblockHandler;
import com.hbm.handler.MultiblockHandlerXR;
import com.hbm.interfaces.IMultiblock;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.machine.TileEntityMachineGasCent;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@ -34,6 +18,8 @@ public class MachineGasCent extends BlockDummyable implements IMultiblock {
public MachineGasCent(Material mat) {
super(mat);
this.bounding.add(AxisAlignedBB.getBoundingBox(-0.5D, 0D, -0.5D, 0.5D, 1D, 0.5D));
this.bounding.add(AxisAlignedBB.getBoundingBox(-0.4375D, 1D, -0.4375D, 0.4375D, 4D, 0.4375D));
}
@Override

View File

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.RecipesCommon.AStack;
@ -24,6 +25,7 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.MathHelper;
@ -113,6 +115,47 @@ public class GUIAnvil extends GuiContainer {
this.size = Math.max(0, (int)Math.ceil((this.recipes.size() - 10) / 2D));
}
/*@Override
protected void mouseMovedOrUp(int x, int y, int mode) {
super.mouseMovedOrUp(x, y, mode);
if(mode == -1) return; // we don't care about mouseMove
for(Object obj : this.inventorySlots.inventorySlots) {
Slot slot = (Slot) obj;
// if the mouse is over a slot, cancel
if(this.func_146978_c(slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, x, y)) {
return;
}
}
if(mode == 0 && this.index > 0) this.index--;
if(mode == 1 && this.index < this.size) this.index++;
}*/
@Override
public void drawScreen(int x, int y, float interp) {
super.drawScreen(x, y, interp);
for(Object obj : this.inventorySlots.inventorySlots) {
Slot slot = (Slot) obj;
// if the mouse is over a slot, cancel
if(this.func_146978_c(slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, x, y) && slot.getHasStack()) {
return;
}
}
if(guiLeft <= x && guiLeft + xSize > x && guiTop < y && guiTop + ySize >= y) {
if(!Mouse.isButtonDown(0) && !Mouse.isButtonDown(1) && Mouse.next()) {
int scroll = Mouse.getEventDWheel();
if(scroll > 0 && this.index > 0) this.index--;
if(scroll < 0 && this.index < this.size) this.index++;
}
}
}
@Override
protected void mouseClicked(int x, int y, int k) {
super.mouseClicked(x, y, k);

View File

@ -81,7 +81,7 @@ public class GUIDiFurnace extends GuiContainer {
int j1 = diFurnace.getDiFurnaceProgressScaled(24);
drawTexturedModalRect(guiLeft + 101, guiTop + 35, 176, 14, j1 + 1, 17);
if(diFurnace.hasPower() && diFurnace.canProcess()) {
if(diFurnace.hasPower() && (diFurnace.canProcess() || j1 > 0)) {
drawTexturedModalRect(guiLeft + 63, guiTop + 37, 176, 0, 14, 14);
}
}

View File

@ -1,5 +1,6 @@
package com.hbm.inventory.recipes;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -11,6 +12,10 @@ import static com.hbm.inventory.OreDictManager.*;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.stream.JsonWriter;
import com.hbm.blocks.ModBlocks;
import com.hbm.config.GeneralConfig;
import com.hbm.handler.imc.IMCBlastFurnace;
@ -18,6 +23,7 @@ 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.recipes.loader.SerializableRecipe;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry;
import com.hbm.util.Tuple.Triplet;
@ -31,16 +37,13 @@ import net.minecraft.item.ItemStack;
*
* @author UFFR
*/
public class BlastFurnaceRecipes {
public class BlastFurnaceRecipes extends SerializableRecipe {
private static final ArrayList<Triplet<Object, Object, ItemStack>> blastFurnaceRecipes = new ArrayList<Triplet<Object, Object, ItemStack>>();
private static final ArrayList<ItemStack> hiddenRecipes = new ArrayList<ItemStack>();
private static final ArrayList<Triplet<Object, Object, ItemStack>> blastFurnaceRecipes = new ArrayList();
private static final ArrayList<ComparableStack> hiddenRecipes = new ArrayList();
private static void addRecipe(Object in1, Object in2, ItemStack out) {
blastFurnaceRecipes.add(new Triplet<Object, Object, ItemStack>(in1, in2, out));
}
static {
@Override
public void registerDefaults() {
/* STEEL */
addRecipe(IRON, COAL, new ItemStack(ModItems.ingot_steel, 1));
addRecipe(IRON, ANY_COKE, new ItemStack(ModItems.ingot_steel, 1));
@ -48,21 +51,18 @@ public class BlastFurnaceRecipes {
addRecipe(IRON.ore(), ANY_COKE, new ItemStack(ModItems.ingot_steel, 3));
addRecipe(IRON.ore(), new ComparableStack(ModItems.powder_flux), new ItemStack(ModItems.ingot_steel, 3));
addRecipe(CU, REDSTONE, new ItemStack(ModItems.ingot_red_copper, 2));
addRecipe(STEEL, MINGRADE, new ItemStack(ModItems.ingot_advanced_alloy, 2));
addRecipe(W, COAL, new ItemStack(ModItems.neutron_reflector, 2));
addRecipe(W, ANY_COKE, new ItemStack(ModItems.neutron_reflector, 2));
addRecipe(new ComparableStack(ModItems.canister_full, 1, Fluids.GASOLINE.getID()), "slimeball", new ItemStack(ModItems.canister_napalm));
//addRecipe(STEEL, CO, new ItemStack(ModItems.ingot_dura_steel, 2));
//addRecipe(STEEL, W, new ItemStack(ModItems.ingot_dura_steel, 2));
//addRecipe(STEEL, U238, new ItemStack(ModItems.ingot_ferrouranium));
addRecipe(W, SA326.nugget(), new ItemStack(ModItems.ingot_magnetized_tungsten));
addRecipe(STEEL, TC99.nugget(), new ItemStack(ModItems.ingot_tcalloy));
addRecipe(GOLD.plate(), ModItems.plate_mixed, new ItemStack(ModItems.plate_paa, 2));
addRecipe(BIGMT, ModItems.powder_meteorite, new ItemStack(ModItems.ingot_starmetal, 2));
addRecipe(CO, ModBlocks.block_meteor, new ItemStack(ModItems.ingot_meteorite));
addRecipe(ModItems.meteorite_sword_hardened, CO, new ItemStack(ModItems.meteorite_sword_alloyed));
addRecipe(ModBlocks.block_meteor, CO, new ItemStack(ModItems.ingot_meteorite));
addRecipe(CU, REDSTONE, new ItemStack(ModItems.ingot_red_copper, 2));
addRecipe(STEEL, MINGRADE, new ItemStack(ModItems.ingot_advanced_alloy, 2));
addRecipe(W, COAL, new ItemStack(ModItems.neutron_reflector, 2));
addRecipe(W, ANY_COKE, new ItemStack(ModItems.neutron_reflector, 2));
addRecipe(new ComparableStack(ModItems.canister_full, 1, Fluids.GASOLINE.getID()), "slimeball", new ItemStack(ModItems.canister_napalm));
addRecipe(W, SA326.nugget(), new ItemStack(ModItems.ingot_magnetized_tungsten));
addRecipe(STEEL, TC99.nugget(), new ItemStack(ModItems.ingot_tcalloy));
addRecipe(GOLD.plate(), ModItems.plate_mixed, new ItemStack(ModItems.plate_paa, 2));
addRecipe(BIGMT, ModItems.powder_meteorite, new ItemStack(ModItems.ingot_starmetal, 2));
addRecipe(CO, ModBlocks.block_meteor, new ItemStack(ModItems.ingot_meteorite));
addRecipe(ModItems.meteorite_sword_hardened, CO, new ItemStack(ModItems.meteorite_sword_alloyed));
addRecipe(ModBlocks.block_meteor, CO, new ItemStack(ModItems.ingot_meteorite));
if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMSimpleChemsitry) {
addRecipe(ModItems.canister_empty, COAL, new ItemStack(ModItems.canister_full, 1, Fluids.OIL.getID()));
@ -74,19 +74,30 @@ public class BlastFurnaceRecipes {
IMCBlastFurnace.buffer.clear();
}
hiddenRecipes.add(new ItemStack(ModItems.meteorite_sword_alloyed));
hiddenRecipes.add(new ComparableStack(ModItems.meteorite_sword_alloyed));
}
private static void addRecipe(Object in1, Object in2, ItemStack out) {
if(in1 instanceof Item) in1 = new ComparableStack((Item) in1);
if(in1 instanceof Block) in1 = new ComparableStack((Block) in1);
if(in2 instanceof Item) in2 = new ComparableStack((Item) in2);
if(in2 instanceof Block) in2 = new ComparableStack((Block) in2);
blastFurnaceRecipes.add(new Triplet<Object, Object, ItemStack>(in1, in2, out));
}
@CheckForNull
public static ItemStack getOutput(ItemStack in1, ItemStack in2) {
for(Triplet<Object, Object, ItemStack> recipe : blastFurnaceRecipes) {
final AStack[] recipeItem1 = getRecipeStacks(recipe.getX());
final AStack[] recipeItem2 = getRecipeStacks(recipe.getY());
AStack[] recipeItem1 = getRecipeStacks(recipe.getX());
AStack[] recipeItem2 = getRecipeStacks(recipe.getY());
if((doStacksMatch(recipeItem1, in1) && doStacksMatch(recipeItem2, in2)) || (doStacksMatch(recipeItem2, in1) && doStacksMatch(recipeItem1, in2)))
if((doStacksMatch(recipeItem1, in1) && doStacksMatch(recipeItem2, in2)) || (doStacksMatch(recipeItem2, in1) && doStacksMatch(recipeItem1, in2))) {
return recipe.getZ().copy();
else
} else {
continue;
}
}
return null;
}
@ -102,35 +113,38 @@ public class BlastFurnaceRecipes {
}
private static AStack[] getRecipeStacks(Object in) {
final AStack[] recipeItem1;
AStack[] recipeItem1 = new AStack[0];
if(in instanceof DictFrame) {
DictFrame recipeItem = (DictFrame) in;
recipeItem1 = new AStack[] { new OreDictStack(recipeItem.ingot()), new OreDictStack(recipeItem.dust()), new OreDictStack(recipeItem.plate()), new OreDictStack(recipeItem.gem()) };
} else if(in instanceof AStack)
} else if(in instanceof AStack) {
recipeItem1 = new AStack[] { (AStack) in };
else if(in instanceof String)
} else if(in instanceof String) {
recipeItem1 = new AStack[] { new OreDictStack((String) in) };
else if(in instanceof Block)
recipeItem1 = new AStack[] { new ComparableStack((Block) in) };
else if(in instanceof List<?>) {
}/* else if(in instanceof List<?>) {
List<?> oreList = (List<?>) in;
recipeItem1 = new AStack[oreList.size()];
for(int i = 0; i < oreList.size(); i++)
recipeItem1[i] = new OreDictStack((String) oreList.get(i));
} else
recipeItem1 = new AStack[] { new ComparableStack((Item) in) };
}*/
return recipeItem1;
}
public static Map<List<ItemStack>[], ItemStack> getRecipesForNEI() {
final HashMap<List<ItemStack>[], ItemStack> recipes = new HashMap<>();
HashMap<List<ItemStack>[], ItemStack> recipes = new HashMap<>();
for(Triplet<Object, Object, ItemStack> recipe : blastFurnaceRecipes) {
if(!hiddenRecipes.contains(recipe.getZ())) {
final ItemStack nothing = new ItemStack(ModItems.nothing).setStackDisplayName("If you're reading this, an error has occured! Check the console.");
final List<ItemStack> in1 = new ArrayList<ItemStack>();
final List<ItemStack> in2 = new ArrayList<ItemStack>();
if(!hiddenRecipes.contains(new ComparableStack(recipe.getZ()))) {
ItemStack nothing = new ItemStack(ModItems.nothing).setStackDisplayName("If you're reading this, an error has occured! Check the console.");
List<ItemStack> in1 = new ArrayList();
List<ItemStack> in2 = new ArrayList();
in1.add(nothing);
in2.add(nothing);
@ -159,7 +173,7 @@ public class BlastFurnaceRecipes {
MainRegistry.logger.error("Blast furnace cannot compile recipes for NEI: apparent nonexistent item #2 in recipe for item: " + recipe.getZ().getDisplayName());
}
final List<ItemStack>[] inputs = new List[2];
List<ItemStack>[] inputs = new List[2];
inputs[0] = in1;
inputs[1] = in2;
recipes.put(inputs, recipe.getZ());
@ -169,10 +183,93 @@ public class BlastFurnaceRecipes {
}
public static List<Triplet<AStack[], AStack[], ItemStack>> getRecipes() {
final List<Triplet<AStack[], AStack[], ItemStack>> subRecipes = new ArrayList<>();
for(Triplet<Object, Object, ItemStack> recipe : blastFurnaceRecipes)
List<Triplet<AStack[], AStack[], ItemStack>> subRecipes = new ArrayList<>();
for(Triplet<Object, Object, ItemStack> recipe : blastFurnaceRecipes) {
subRecipes.add(new Triplet<AStack[], AStack[], ItemStack>(getRecipeStacks(recipe.getX()), getRecipeStacks(recipe.getY()), recipe.getZ()));
}
return ImmutableList.copyOf(subRecipes);
}
@Override
public String getFileName() {
return "hbmBlastFurnace.json";
}
@Override
public String getComment() {
return "Inputs can use the unique 'dictframe' type which is an ore dictionary material suffix. The recipes will accept most ore dictionary entries equivalent to one ingot (gems, dust, plates, etc).";
}
@Override
public Object getRecipeObject() {
return blastFurnaceRecipes;
}
@Override
public void readRecipe(JsonElement recipe) {
JsonObject rec = (JsonObject) recipe;
ItemStack output = this.readItemStack(rec.get("output").getAsJsonArray());
Object input1 = null;
Object input2 = null;
JsonArray array1 = rec.get("input1").getAsJsonArray();
if(array1.get(0).getAsString().equals("item")) input1 = this.readAStack(array1);
if(array1.get(0).getAsString().equals("dict")) input1 = ((OreDictStack) this.readAStack(array1)).name;
if(array1.get(0).getAsString().equals("dictframe")) input1 = readDictFrame(array1);
JsonArray array2 = rec.get("input2").getAsJsonArray();
if(array2.get(0).getAsString().equals("item")) input2 = this.readAStack(array2);
if(array2.get(0).getAsString().equals("dict")) input2 = ((OreDictStack) this.readAStack(array2)).name;
if(array2.get(0).getAsString().equals("dictframe")) input2 = readDictFrame(array2);
if(input1 != null && input2 != null) {
addRecipe(input1, input2, output);
if(rec.has("hidden") && rec.get("hidden").getAsBoolean()) {
this.hiddenRecipes.add(new ComparableStack(output));
}
}
}
@Override
public void writeRecipe(Object recipe, JsonWriter writer) throws IOException {
Triplet<Object, Object, ItemStack> rec = (Triplet<Object, Object, ItemStack>) recipe;
writer.name("output");
this.writeItemStack(rec.getZ(), writer);
writer.name("input1");
if(rec.getX() instanceof ComparableStack) this.writeAStack((ComparableStack) rec.getX(), writer);
if(rec.getX() instanceof String) this.writeAStack(new OreDictStack((String) rec.getX()), writer);
if(rec.getX() instanceof DictFrame) this.writeDictFrame((DictFrame) rec.getX(), writer);
writer.name("input2");
if(rec.getY() instanceof ComparableStack) this.writeAStack((ComparableStack) rec.getY(), writer);
if(rec.getY() instanceof String) this.writeAStack(new OreDictStack((String) rec.getY()), writer);
if(rec.getY() instanceof DictFrame) this.writeDictFrame((DictFrame) rec.getY(), writer);
if(this.hiddenRecipes.contains(new ComparableStack(rec.getZ()))) {
writer.name("hidden").value(true);
}
}
public static void writeDictFrame(DictFrame frame, JsonWriter writer) throws IOException {
writer.beginArray();
writer.setIndent("");
writer.value("dictframe");
writer.value(frame.mats[0]);
writer.endArray();
writer.setIndent(" ");
}
public static DictFrame readDictFrame(JsonArray array) {
return new DictFrame(array.get(1).getAsString());
}
@Override
public void deleteRecipes() {
blastFurnaceRecipes.clear();
hiddenRecipes.clear();
}
}

View File

@ -39,6 +39,7 @@ public abstract class SerializableRecipe {
*/
public static void registerAllHandlers() {
recipeHandlers.add(new BlastFurnaceRecipes());
recipeHandlers.add(new ShredderRecipes());
recipeHandlers.add(new ChemplantRecipes());
recipeHandlers.add(new CrucibleRecipes());

View File

@ -1,11 +1,14 @@
package com.hbm.items;
import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
@ -38,4 +41,9 @@ public class ItemRemap extends Item {
public int getColorFromItemStack(ItemStack stack, int pass) {
return 0xFF8080;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
list.add(EnumChatFormatting.RED + "Compatibility item, hold in inventory to convert!");
}
}

View File

@ -21,6 +21,7 @@ public class ItemCrayon extends ItemFood {
public ItemCrayon() {
super(3, false);
this.setHasSubtypes(true);
this.setAlwaysEdible();
}

View File

@ -13,6 +13,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IIcon;
public class ItemZirnoxRod extends ItemEnumMulti {
@ -50,21 +51,24 @@ public class ItemZirnoxRod extends ItemEnumMulti {
return stack.stackTagCompound.getInteger("life");
}
public boolean showDurabilityBar(ItemStack stack) {
return getDurabilityForDisplay(stack) > 0D;
}
public double getDurabilityForDisplay(ItemStack stack) {
EnumZirnoxType num = EnumUtil.grabEnumSafely(theEnum, stack.getItemDamage());
return (double)getLifeTime(stack) / (double)num.maxLife;
}
@Override
public boolean showDurabilityBar(ItemStack stack) {
return getDurabilityForDisplay(stack) > 0D;
}
public double getDurabilityForDisplay(ItemStack stack) {
EnumZirnoxType num = EnumUtil.grabEnumSafely(theEnum, stack.getItemDamage());
return (double) getLifeTime(stack) / (double) num.maxLife;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
EnumZirnoxType num = EnumUtil.grabEnumSafely(theEnum, stack.getItemDamage());
String[] loc = I18nUtil.resolveKeyArray("desc.item.zirnox" + (num.breeding ? "BreedingRod" : "Rod"), BobMathUtil.getShortNumber(num.maxLife));
EnumZirnoxType num = EnumUtil.grabEnumSafely(theEnum, stack.getItemDamage());
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.rbmk.depletion", ((int)((((double)getLifeTime(stack)) / (double)num.maxLife) * 100000)) / 1000D + "%"));
String[] loc = I18nUtil.resolveKeyArray("desc.item.zirnox" + (num.breeding ? "BreedingRod" : "Rod"), BobMathUtil.getShortNumber(num.maxLife));
if(num.breeding)
loc = I18nUtil.resolveKeyArray("desc.item.zirnoxBreedingRod", BobMathUtil.getShortNumber(num.maxLife));
else
@ -75,7 +79,7 @@ public class ItemZirnoxRod extends ItemEnumMulti {
}
}
@Override
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister reg) {
Enum[] enums = theEnum.getEnumConstants();
@ -86,13 +90,13 @@ public class ItemZirnoxRod extends ItemEnumMulti {
this.icons[i] = reg.registerIcon(this.getIconString() + "_" + num.name().toLowerCase());
}
}
@Override
@Override
public String getUnlocalizedName(ItemStack stack) {
Enum num = EnumUtil.grabEnumSafely(theEnum, stack.getItemDamage());
return super.getUnlocalizedName() + "_" + num.name().toLowerCase();
}
public static enum EnumZirnoxType {
NATURAL_URANIUM_FUEL(250_000, 30),
URANIUM_FUEL(200_000, 50),

View File

@ -13,7 +13,7 @@ public class ItemHotDusted extends ItemHot {
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
list.add("Forged " + stack.getItemDamage() + " time(s)");
}

View File

@ -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 (4515)";
public static final String VERSION = "1.0.27 BETA (4522)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -963,11 +963,11 @@ public class ModEventHandler {
if(event.phase == TickEvent.Phase.START) {
int x = MathHelper.floor_double(player.posX);
int y = MathHelper.floor_double(player.posY - player.yOffset - 0.5);
int y = MathHelper.floor_double(player.posY - player.yOffset - 0.01);
int z = MathHelper.floor_double(player.posZ);
Block b = player.worldObj.getBlock(x, y, z);
if(b instanceof IStepTickReceiver) {
if(b instanceof IStepTickReceiver && !player.capabilities.isFlying) {
IStepTickReceiver step = (IStepTickReceiver) b;
step.onPlayerStep(player.worldObj, x, y, z, player);
}

View File

@ -295,40 +295,40 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory,
@Override
public void updateEntity() {
boolean flag1 = false;
if(hasPower() && isProcessing()) {
this.dualPower = this.dualPower - 1;
if(this.dualPower < 0) {
this.dualPower = 0;
}
}
if(this.hasItemPower(this.slots[2]) && this.dualPower <= (TileEntityDiFurnace.maxPower - TileEntityDiFurnace.getItemPower(this.slots[2]))) {
this.dualPower += getItemPower(this.slots[2]);
if(this.slots[2] != null) {
flag1 = true;
this.slots[2].stackSize--;
if(this.slots[2].stackSize == 0) {
this.slots[2] = this.slots[2].getItem().getContainerItem(this.slots[2]);
}
}
}
if(hasPower() && canProcess()) {
dualCookTime++;
if(this.dualCookTime == TileEntityDiFurnace.processingSpeed) {
this.dualCookTime = 0;
this.processItem();
flag1 = true;
}
} else {
dualCookTime = 0;
}
if(!worldObj.isRemote) {
boolean flag1 = false;
if(hasPower() && isProcessing()) {
this.dualPower = this.dualPower - 1;
if(this.dualPower < 0) {
this.dualPower = 0;
}
}
if(this.hasItemPower(this.slots[2]) && this.dualPower <= (TileEntityDiFurnace.maxPower - TileEntityDiFurnace.getItemPower(this.slots[2]))) {
this.dualPower += getItemPower(this.slots[2]);
if(this.slots[2] != null) {
flag1 = true;
this.slots[2].stackSize--;
if(this.slots[2].stackSize == 0) {
this.slots[2] = this.slots[2].getItem().getContainerItem(this.slots[2]);
}
}
}
if(hasPower() && canProcess()) {
dualCookTime++;
if(this.dualCookTime == TileEntityDiFurnace.processingSpeed) {
this.dualCookTime = 0;
this.processItem();
flag1 = true;
}
} else {
dualCookTime = 0;
}
boolean trigger = true;
if(hasPower() && canProcess() && this.dualCookTime == 0) {
@ -345,16 +345,16 @@ public class TileEntityDiFurnace extends TileEntity implements ISidedInventory,
flag1 = true;
MachineDiFurnace.updateBlockState(this.dualCookTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
}
NBTTagCompound data = new NBTTagCompound();
data.setShort("time", (short) this.dualCookTime);
data.setShort("fuel", (short) this.dualPower);
data.setByteArray("modes", new byte[] {(byte) sideFuel, (byte) sideUpper, (byte) sideLower});
data.setByteArray("modes", new byte[] { (byte) sideFuel, (byte) sideUpper, (byte) sideLower });
INBTPacketReceiver.networkPack(this, data, 15);
}
if(flag1) {
this.markDirty();
if(flag1) {
this.markDirty();
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB