mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-03-11 12:15:35 +00:00
my bals
This commit is contained in:
parent
32c0491ca4
commit
054aa07318
@ -1,7 +1,16 @@
|
||||
## Changed
|
||||
* Updated russian and chinese localiazation
|
||||
* VNT type explosions now track affected block positions when the explosion events fire, this should ensure compatibility with mods that rely on that
|
||||
* For example, this should make ForgeCreeperHeal work with most of NTM's explosions
|
||||
* Obliterated standard fluid IDs
|
||||
* The multi ID is now a lot cheaper
|
||||
* For convenience in the creative tab, fluid IDs are now listed with all fluids pre-defined, just like how the old IDs were available
|
||||
* The multi ID now changes metadata based on the selected fluid type, allowing it to be usable for crafting pre-defined pipes
|
||||
* The multi ID fluid selector now displays fluid traits in addition to the name when hovering over an icon
|
||||
* Added more values to the data table returned by RBMK consoles via OC integration
|
||||
|
||||
## Fixed
|
||||
* Fixed the T-51b set not having radiation resistance
|
||||
* Potentially fixed a crash on thermos-derived servers involving the flow control pumps
|
||||
* Fixed crash caused when another tile entity replaces an RBMK component due to an unchecked cast
|
||||
* Fixed constant cascading chunk gen caused by meteorites and flower patches
|
||||
43
src/main/java/com/hbm/handler/Identity.java
Normal file
43
src/main/java/com/hbm/handler/Identity.java
Normal file
@ -0,0 +1,43 @@
|
||||
package com.hbm.handler;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.PrintWriter;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Random;
|
||||
|
||||
import com.google.common.io.Files;
|
||||
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class Identity {
|
||||
|
||||
public static int value = -1;
|
||||
public static final int FALLBACK = 666;
|
||||
public static final int MIN = 0;
|
||||
public static final int MAX = 65_535;
|
||||
public static final String FILE_NAME = "identity";
|
||||
|
||||
public static void init(File dir) {
|
||||
|
||||
File idFile = new File(dir, FILE_NAME);
|
||||
|
||||
if(idFile.exists() && idFile.isFile()) {
|
||||
try {
|
||||
String line = Files.readFirstLine(idFile, StandardCharsets.US_ASCII);
|
||||
value = MathHelper.clamp_int(Integer.parseInt(line), MIN, MAX);
|
||||
} catch(Throwable e) { }
|
||||
}
|
||||
|
||||
if(value == -1) {
|
||||
try {
|
||||
PrintWriter printer = new PrintWriter(idFile, StandardCharsets.US_ASCII.name());
|
||||
int newValue = new Random().nextInt(MAX + 1);
|
||||
printer.write(value + "");
|
||||
printer.close();
|
||||
value = newValue;
|
||||
} catch(Throwable e) { }
|
||||
}
|
||||
|
||||
if(value == -1) value = FALLBACK;
|
||||
}
|
||||
}
|
||||
@ -253,8 +253,9 @@ public class RBMKNeutronHandler {
|
||||
if(node != null) {
|
||||
originTE = (TileEntityRBMKBase) node.tile;
|
||||
} else {
|
||||
originTE = (TileEntityRBMKBase) blockPosToTE(worldObj, pos);
|
||||
if(originTE == null) return; // Doesn't exist anymore!
|
||||
TileEntity tile = blockPosToTE(worldObj, pos);
|
||||
if(!(tile instanceof TileEntityRBMKBase)) return; // Doesn't exist anymore!
|
||||
originTE = (TileEntityRBMKBase) tile;
|
||||
|
||||
streamWorld.addNode(new RBMKNeutronNode(originTE, originTE.getRBMKType(), originTE.hasLid()));
|
||||
}
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.machine.ItemFluidIdentifier;
|
||||
import com.hbm.inventory.fluid.trait.FT_Combustible;
|
||||
import com.hbm.inventory.fluid.trait.FT_Combustible.FuelGrade;
|
||||
import com.hbm.items.machine.IItemFluidIdentifier;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineTurbineGas;
|
||||
|
||||
import api.hbm.energymk2.IBatteryItem;
|
||||
@ -46,23 +47,17 @@ public class ContainerMachineTurbineGas extends Container {
|
||||
var3 = var5.copy();
|
||||
|
||||
if(par2 <= 1) { //checks if the item is in the battery or fluidID slot
|
||||
if(!this.mergeItemStack(var5, 2, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if(!this.mergeItemStack(var5, 2, this.inventorySlots.size(), true)) return null;
|
||||
} else if(var5.getItem() instanceof IBatteryItem) { //only yeets batteries in the battery slot
|
||||
if(!this.mergeItemStack(var5, 0, 1, true)) return null;
|
||||
} else if(var5.getItem() instanceof IItemFluidIdentifier) {
|
||||
|
||||
if(!this.mergeItemStack(var5, 0, 1, true))
|
||||
IItemFluidIdentifier id = (IItemFluidIdentifier) var5.getItem();
|
||||
FluidType type = id.getType(turbinegas.getWorldObj(), turbinegas.xCoord, turbinegas.yCoord, turbinegas.zCoord, var5);
|
||||
if(!(type.hasTrait(FT_Combustible.class) && type.getTrait(FT_Combustible.class).getGrade() == FuelGrade.GAS)) // redundant restriction that does nothing at best and at worst breaks shit but i'm not questioning pvn on this one
|
||||
return null;
|
||||
|
||||
} else if(var5.getItem() instanceof ItemFluidIdentifier) {
|
||||
|
||||
FluidType type = ItemFluidIdentifier.getType(var5);
|
||||
if (type != Fluids.GAS && type != Fluids.PETROLEUM && type != Fluids.LPG ) //doesn't let you yeet random identifiers in the identifier slot
|
||||
return null;
|
||||
|
||||
if(!this.mergeItemStack(var5, 1, 2, true))
|
||||
return null;
|
||||
if(!this.mergeItemStack(var5, 1, 2, true)) return null;
|
||||
|
||||
} else {
|
||||
return null;
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
@ -110,8 +111,12 @@ public class GUIScreenFluid extends GuiScreen {
|
||||
if(this.searchArray[k] == null)
|
||||
return;
|
||||
|
||||
if(guiLeft + 7 + k * 18 <= i && guiLeft + 7 + k * 18 + 18 > i && guiTop + 29 < j && guiTop + 29 + 18 >= j)
|
||||
func_146283_a(Arrays.asList(new String[] { this.searchArray[k].getLocalizedName() }), i, j);
|
||||
if(guiLeft + 7 + k * 18 <= i && guiLeft + 7 + k * 18 + 18 > i && guiTop + 29 < j && guiTop + 29 + 18 >= j) {
|
||||
List<String> tooltip = new ArrayList();
|
||||
tooltip.add(this.searchArray[k].getLocalizedName());
|
||||
this.searchArray[k].addInfo(tooltip);
|
||||
func_146283_a(tooltip, i, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -10,8 +10,6 @@ import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.recipes.AssemblerRecipes;
|
||||
import com.hbm.inventory.recipes.CrucibleRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -69,14 +67,6 @@ public class GUIScreenTemplateFolder extends GuiScreen {
|
||||
for(int i = 1; i < ItemCassette.TrackType.values().length; i++) {
|
||||
allStacks.add(new ItemStack(ModItems.siren_track, 1, i));
|
||||
}
|
||||
|
||||
// Fluid IDs
|
||||
FluidType[] fluids = Fluids.getInNiceOrder();
|
||||
for(int i = 1; i < fluids.length; i++) {
|
||||
if(!fluids[i].hasNoID()) {
|
||||
allStacks.add(new ItemStack(ModItems.fluid_identifier, 1, fluids[i].getID()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!this.isJournal) {
|
||||
@ -118,14 +108,6 @@ public class GUIScreenTemplateFolder extends GuiScreen {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(stack.getItem() == ModItems.fluid_identifier) {
|
||||
FluidType fluid = Fluids.fromID(stack.getItemDamage());
|
||||
|
||||
if(fluid.getLocalizedName().contains(sub)) {
|
||||
stacks.add(stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
updateButtons();
|
||||
|
||||
@ -1193,7 +1193,6 @@ public class ModItems {
|
||||
@Deprecated public static Item chemistry_template;
|
||||
@Deprecated public static Item chemistry_icon;
|
||||
public static Item crucible_template;
|
||||
public static Item fluid_identifier;
|
||||
public static Item fluid_identifier_multi;
|
||||
public static Item fluid_icon;
|
||||
public static Item siren_track;
|
||||
@ -4103,7 +4102,6 @@ public class ModItems {
|
||||
chemistry_template = new ItemChemistryTemplate().setUnlocalizedName("chemistry_template").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":chemistry_template");
|
||||
chemistry_icon = new ItemChemistryIcon().setUnlocalizedName("chemistry_icon").setMaxStackSize(1).setCreativeTab(null);
|
||||
crucible_template = new ItemCrucibleTemplate().setUnlocalizedName("crucible_template").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":crucible_template");
|
||||
fluid_identifier = new ItemFluidIdentifier().setUnlocalizedName("fluid_identifier").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":fluid_identifier");
|
||||
fluid_identifier_multi = new ItemFluidIDMulti().setUnlocalizedName("fluid_identifier_multi").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":fluid_identifier_multi");
|
||||
fluid_icon = new ItemFluidIcon().setUnlocalizedName("fluid_icon").setCreativeTab(null).setTextureName(RefStrings.MODID + ":fluid_icon");
|
||||
fluid_tank_empty = new Item().setUnlocalizedName("fluid_tank_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fluid_tank");
|
||||
@ -5841,7 +5839,6 @@ public class ModItems {
|
||||
|
||||
//Machine Templates
|
||||
GameRegistry.registerItem(siren_track, siren_track.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fluid_identifier, fluid_identifier.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fluid_identifier_multi, fluid_identifier_multi.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fluid_icon, fluid_icon.getUnlocalizedName());
|
||||
GameRegistry.registerItem(fluid_duct, fluid_duct.getUnlocalizedName());
|
||||
|
||||
@ -16,6 +16,7 @@ import com.hbm.util.i18n.I18nUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.inventory.Container;
|
||||
@ -29,6 +30,19 @@ public class ItemFluidIDMulti extends Item implements IItemFluidIdentifier, IIte
|
||||
|
||||
IIcon overlayIcon;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
FluidType[] order = Fluids.getInNiceOrder();
|
||||
for(int i = 1; i < order.length; ++i) {
|
||||
if(!order[i].hasNoID()) {
|
||||
ItemStack id = new ItemStack(item, 1, order[i].getID());
|
||||
setType(id, Fluids.fromID(i), true);
|
||||
list.add(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
@ -37,6 +51,7 @@ public class ItemFluidIDMulti extends Item implements IItemFluidIdentifier, IIte
|
||||
FluidType secondary = getType(stack, false);
|
||||
setType(stack, secondary, true);
|
||||
setType(stack, primary, false);
|
||||
updateMeta(stack);
|
||||
world.playSoundAtEntity(player, "random.orb", 0.25F, 1.25F);
|
||||
PacketDispatcher.wrapper.sendTo(new PlayerInformPacket(ChatBuilder.startTranslation(secondary.getConditionalName()).flush(), /*MainRegistry.proxy.ID_DETONATOR*/ 7, 3000), (EntityPlayerMP) player);
|
||||
}
|
||||
@ -56,6 +71,12 @@ public class ItemFluidIDMulti extends Item implements IItemFluidIdentifier, IIte
|
||||
if(data.hasKey("secondary")) {
|
||||
setType(stack, Fluids.fromID(data.getInteger("secondary")), false);
|
||||
}
|
||||
|
||||
updateMeta(stack);
|
||||
}
|
||||
|
||||
public static void updateMeta(ItemStack stack) {
|
||||
if(stack.hasTagCompound()) stack.setItemDamage(stack.stackTagCompound.getInteger("fluid1"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,121 +0,0 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.util.i18n.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
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;
|
||||
|
||||
public class ItemFluidIdentifier extends Item implements IItemFluidIdentifier {
|
||||
|
||||
IIcon overlayIcon;
|
||||
|
||||
public ItemFluidIdentifier() {
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
public ItemStack getContainerItem(ItemStack stack) {
|
||||
return stack.copy();
|
||||
}
|
||||
|
||||
public boolean hasContainerItem() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
FluidType[] order = Fluids.getInNiceOrder();
|
||||
for(int i = 1; i < order.length; ++i) {
|
||||
if(!order[i].hasNoID()) {
|
||||
list.add(new ItemStack(item, 1, order[i].getID()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
if(!(stack.getItem() instanceof ItemFluidIdentifier))
|
||||
return;
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("info.templatefolder", I18nUtil.resolveKey(ModItems.template_folder.getUnlocalizedName() + ".name")));
|
||||
list.add("");
|
||||
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".info"));
|
||||
list.add(" " + Fluids.fromID(stack.getItemDamage()).getLocalizedName());
|
||||
list.add("");
|
||||
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".usage0"));
|
||||
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".usage1"));
|
||||
list.add(I18nUtil.resolveKey(getUnlocalizedName() + ".usage2"));
|
||||
}
|
||||
|
||||
public static FluidType getType(ItemStack stack) {
|
||||
if(stack != null && stack.getItem() instanceof ItemFluidIdentifier)
|
||||
return Fluids.fromID(stack.getItemDamage());
|
||||
else
|
||||
return Fluids.NONE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidType getType(World world, int x, int y, int z, ItemStack stack) {
|
||||
return Fluids.fromID(stack.getItemDamage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesSneakBypassUse(World world, int x, int y, int z, EntityPlayer player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister p_94581_1_) {
|
||||
super.registerIcons(p_94581_1_);
|
||||
|
||||
this.overlayIcon = p_94581_1_.registerIcon("hbm:fluid_identifier_overlay");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamageForRenderPass(int p_77618_1_, int p_77618_2_) {
|
||||
return p_77618_2_ == 1 ? this.overlayIcon : super.getIconFromDamageForRenderPass(p_77618_1_, p_77618_2_);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int p_82790_2_) {
|
||||
if(p_82790_2_ == 0) {
|
||||
return 16777215;
|
||||
} else {
|
||||
int j = Fluids.fromID(stack.getItemDamage()).getColor();
|
||||
|
||||
if(j < 0) {
|
||||
j = 16777215;
|
||||
}
|
||||
|
||||
return j;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -31,6 +31,7 @@ import com.hbm.items.food.ItemConserve.EnumFoodType;
|
||||
import com.hbm.items.machine.ItemArcElectrode.EnumElectrodeType;
|
||||
import com.hbm.items.machine.ItemBattery;
|
||||
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
|
||||
import com.hbm.items.machine.ItemFluidIDMulti;
|
||||
import com.hbm.items.special.ItemCircuitStarComponent.CircuitComponentType;
|
||||
import com.hbm.items.special.ItemHolotapeImage.EnumHoloImage;
|
||||
import com.hbm.items.special.ItemPlasticScrap.ScrapType;
|
||||
@ -688,17 +689,23 @@ public class CraftingManager {
|
||||
addShapelessAuto(new ItemStack(Items.slime_ball, 16), new Object[] { new ItemStack(Items.dye, 1, 15), new ItemStack(Items.dye, 1, 15), new ItemStack(Items.dye, 1, 15), new ItemStack(Items.dye, 1, 15), Fluids.SULFURIC_ACID.getDict(1000) });
|
||||
|
||||
for(int i = 1; i < Fluids.getAll().length; ++i) {
|
||||
addShapelessAuto(new ItemStack(ModItems.fluid_duct, 1, i), new Object[] { new ItemStack(ModBlocks.fluid_duct_neo, 1), new ItemStack(ModItems.fluid_identifier, 1, i) });
|
||||
ItemStack id = new ItemStack(ModItems.fluid_identifier_multi, 1, i);
|
||||
ItemFluidIDMulti.setType(id, Fluids.fromID(i), true);
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.fluid_duct, 8, i), new Object[] { new ItemStack(ModBlocks.fluid_duct_neo, 1), new ItemStack(ModBlocks.fluid_duct_neo, 1),
|
||||
addShapelessAuto(new ItemStack(ModItems.fluid_duct, 1, i), new Object[] { new ItemStack(ModBlocks.fluid_duct_neo, 1), id });
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.fluid_duct, 8, i),
|
||||
new Object[] { new ItemStack(ModBlocks.fluid_duct_neo, 1), new ItemStack(ModBlocks.fluid_duct_neo, 1), new ItemStack(ModBlocks.fluid_duct_neo, 1),
|
||||
new ItemStack(ModBlocks.fluid_duct_neo, 1), new ItemStack(ModBlocks.fluid_duct_neo, 1), new ItemStack(ModBlocks.fluid_duct_neo, 1),
|
||||
new ItemStack(ModBlocks.fluid_duct_neo, 1), new ItemStack(ModBlocks.fluid_duct_neo, 1), new ItemStack(ModBlocks.fluid_duct_neo, 1), new ItemStack(ModItems.fluid_identifier, 1, i) });
|
||||
new ItemStack(ModBlocks.fluid_duct_neo, 1), new ItemStack(ModBlocks.fluid_duct_neo, 1), id });
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.fluid_duct, 1, i), new Object[] { new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.fluid_identifier, 1, i) });
|
||||
addShapelessAuto(new ItemStack(ModItems.fluid_duct, 1, i),
|
||||
new Object[] { new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE), id });
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.fluid_duct, 8, i), new Object[] { new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE),
|
||||
addShapelessAuto(new ItemStack(ModItems.fluid_duct, 8, i),
|
||||
new Object[] { new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE),
|
||||
new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE),
|
||||
new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.fluid_identifier, 1, i) });
|
||||
new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE), id });
|
||||
}
|
||||
|
||||
addShapelessAuto(new ItemStack(ModBlocks.fluid_duct_neo, 1), new Object[] { new ItemStack(ModItems.fluid_duct, 1, OreDictionary.WILDCARD_VALUE) });
|
||||
@ -940,7 +947,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.charger, 16), new Object[] { "G", "S", "C", 'G', Blocks.glowstone, 'S', STEEL.block(), 'C', ModItems.coil_copper_torus });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.refueler), new Object[] { "SS", "HC", "SS", 'S', TI.plate(), 'H', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_HYDRAULIC), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.press_preheater), new Object[] { "CCC", "SLS", "TST", 'C', CU.plate(), 'S', Blocks.stone, 'L', Fluids.LAVA.getDict(1000), 'T', W.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.fluid_identifier_multi), new Object[] { "D", "C", "P", 'D', "dye", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ANALOG), 'P', IRON.plate() });
|
||||
addRecipeAuto(new ItemStack(ModItems.fluid_identifier_multi, 1, OreDictionary.WILDCARD_VALUE), new Object[] { "D", "C", "P", 'D', "dye", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE), 'P', IRON.plate() }); // wildcard meta is necessary to make NEI handler work with all metas, corrects itself after the first use anyway
|
||||
|
||||
addShapelessAuto(ItemBattery.getEmptyBattery(ModItems.anchor_remote), new Object[] { DIAMOND.gem(), ModItems.ducttape, DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.teleanchor), new Object[] { "ODO", "EAE", "ODO", 'O', Blocks.obsidian, 'D', DIAMOND.gem(), 'E', ModItems.powder_magic, 'A', ModItems.gem_alexandrite });
|
||||
|
||||
@ -246,6 +246,7 @@ public class MainRegistry {
|
||||
configHbmDir = new File(configDir.getAbsolutePath() + File.separatorChar + "hbmConfig");
|
||||
|
||||
if(!configHbmDir.exists()) configHbmDir.mkdir();
|
||||
Identity.init(configDir);
|
||||
|
||||
logger.info("Let us celebrate the fact that the logger finally works again!");
|
||||
|
||||
@ -1430,6 +1431,7 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:item.mp_thruster_15_kerosene_tec");
|
||||
ignoreMappings.add("hbm:item.t45_kit");
|
||||
ignoreMappings.add("hbm:item.fusion_core_infinite");
|
||||
ignoreMappings.add("hbm:item.fluid_identifier");
|
||||
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
|
||||
@ -7,7 +7,6 @@ import com.hbm.items.machine.ItemAssemblyTemplate;
|
||||
import com.hbm.items.machine.ItemCassette;
|
||||
import com.hbm.items.machine.ItemChemistryTemplate;
|
||||
import com.hbm.items.machine.ItemCrucibleTemplate;
|
||||
import com.hbm.items.machine.ItemFluidIdentifier;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
@ -74,10 +73,6 @@ public class ItemFolderPacket implements IMessage {
|
||||
return null;
|
||||
}
|
||||
|
||||
if(stack.getItem() instanceof ItemFluidIdentifier) {
|
||||
tryMakeItem(p, stack, "plateIron", "dye");
|
||||
return null;
|
||||
}
|
||||
if(stack.getItem() instanceof ItemAssemblyTemplate) {
|
||||
tryMakeItem(p, stack, Items.paper, "dye");
|
||||
return null;
|
||||
|
||||
@ -115,28 +115,24 @@ public class ArmorUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* The more horrifying part
|
||||
*/
|
||||
public static boolean checkForHazmat(EntityLivingBase player) {
|
||||
//TODO: figure out a way of handling this more gracefully (hazmat trait for FSBs?)
|
||||
//and stop using this shit
|
||||
@Deprecated public static boolean checkForHazmat(EntityLivingBase player) {
|
||||
|
||||
if(checkArmor(player, ModItems.hazmat_helmet, ModItems.hazmat_plate, ModItems.hazmat_legs, ModItems.hazmat_boots) ||
|
||||
checkArmor(player, ModItems.hazmat_helmet_red, ModItems.hazmat_plate_red, ModItems.hazmat_legs_red, ModItems.hazmat_boots_red) ||
|
||||
checkArmor(player, ModItems.hazmat_helmet_grey, ModItems.hazmat_plate_grey, ModItems.hazmat_legs_grey, ModItems.hazmat_boots_grey) ||
|
||||
checkArmor(player, ModItems.t45_helmet, ModItems.t45_plate, ModItems.t45_legs, ModItems.t45_boots) ||
|
||||
checkArmor(player, ModItems.schrabidium_helmet, ModItems.schrabidium_plate, ModItems.schrabidium_legs, ModItems.schrabidium_boots) ||
|
||||
checkForHaz2(player)) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if(player.isPotionActive(HbmPotion.mutation))
|
||||
return true;
|
||||
|
||||
if(player.isPotionActive(HbmPotion.mutation)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkForHaz2(EntityLivingBase player) {
|
||||
@Deprecated public static boolean checkForHaz2(EntityLivingBase player) {
|
||||
|
||||
if(checkArmor(player, ModItems.hazmat_paa_helmet, ModItems.hazmat_paa_plate, ModItems.hazmat_paa_legs, ModItems.hazmat_paa_boots) ||
|
||||
checkArmor(player, ModItems.liquidator_helmet, ModItems.liquidator_plate, ModItems.liquidator_legs, ModItems.liquidator_boots) ||
|
||||
@ -152,43 +148,28 @@ public class ArmorUtil {
|
||||
}
|
||||
|
||||
public static boolean checkForAsbestos(EntityLivingBase player) {
|
||||
|
||||
if(checkArmor(player, ModItems.asbestos_helmet, ModItems.asbestos_plate, ModItems.asbestos_legs, ModItems.asbestos_boots))
|
||||
return true;
|
||||
|
||||
if(checkArmor(player, ModItems.asbestos_helmet, ModItems.asbestos_plate, ModItems.asbestos_legs, ModItems.asbestos_boots)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkForDigamma(EntityPlayer player) {
|
||||
|
||||
if(checkArmor(player, ModItems.fau_helmet, ModItems.fau_plate, ModItems.fau_legs, ModItems.fau_boots))
|
||||
return true;
|
||||
|
||||
if(checkArmor(player, ModItems.dns_helmet, ModItems.dns_plate, ModItems.dns_legs, ModItems.dns_boots))
|
||||
return true;
|
||||
|
||||
if(player.isPotionActive(HbmPotion.stability.id))
|
||||
return true;
|
||||
if(checkArmor(player, ModItems.fau_helmet, ModItems.fau_plate, ModItems.fau_legs, ModItems.fau_boots)) return true;
|
||||
if(checkArmor(player, ModItems.dns_helmet, ModItems.dns_plate, ModItems.dns_legs, ModItems.dns_boots)) return true;
|
||||
if(player.isPotionActive(HbmPotion.stability.id)) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkForDigamma2(EntityPlayer player) {
|
||||
|
||||
if(!checkArmor(player, ModItems.robes_helmet, ModItems.robes_plate, ModItems.robes_legs, ModItems.robes_boots))
|
||||
return false;
|
||||
|
||||
if(player.isPotionActive(HbmPotion.stability.id))
|
||||
return true;
|
||||
if(!checkArmor(player, ModItems.robes_helmet, ModItems.robes_plate, ModItems.robes_legs, ModItems.robes_boots)) return false;
|
||||
if(!player.isPotionActive(HbmPotion.stability.id)) return false;
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
|
||||
ItemStack armor = player.getCurrentArmor(i);
|
||||
|
||||
if(armor != null && ArmorModHandler.hasMods(armor)) {
|
||||
|
||||
ItemStack mods[] = ArmorModHandler.pryMods(armor);
|
||||
|
||||
if(!(mods[ArmorModHandler.cladding] != null && mods[ArmorModHandler.cladding].getItem() == ModItems.cladding_iron))
|
||||
return false;
|
||||
}
|
||||
@ -228,6 +209,7 @@ public class ArmorUtil {
|
||||
"bronze",
|
||||
"electrum",
|
||||
"t45",
|
||||
"t51",
|
||||
"bj",
|
||||
"starmetal",
|
||||
"hazmat", //also count because rubber is insulating
|
||||
@ -242,14 +224,8 @@ public class ArmorUtil {
|
||||
|
||||
String name = item.getUnlocalizedName();
|
||||
|
||||
for(String metal : metals) {
|
||||
|
||||
if(name.toLowerCase(Locale.US).contains(metal))
|
||||
return true;
|
||||
}
|
||||
|
||||
if(HazmatRegistry.getCladding(item) > 0)
|
||||
return true;
|
||||
for(String metal : metals) if(name.toLowerCase(Locale.US).contains(metal)) return true;
|
||||
if(HazmatRegistry.getCladding(item) > 0) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3482,7 +3482,7 @@ item.taurun_plate.name=Taurun-Jacke
|
||||
item.telepad.name=Teleplatte
|
||||
item.tem_flakes.name=Tem Flakes
|
||||
item.template_folder.name=Produktionsvorlagen-Zeichenmappe
|
||||
item.template_folder.desc=Vorlagen: Papier + Farbe$Flüssigkeits-ID: Eisenplatte + Farbe$Stempel: Flacher Stempel$Sirenen-Track: Isolator + Stahlplatte
|
||||
item.template_folder.desc=Vorlagen: Papier + Farbe$Stempel: Flacher Stempel$Sirenen-Track: Isolator + Stahlplatte
|
||||
item.test_nuke_igniter.name=Zünder
|
||||
item.test_nuke_propellant.name=Treibladung
|
||||
item.test_nuke_tier1_bullet.name=U235 Geschoss (Stufe 1)
|
||||
|
||||
@ -4602,7 +4602,7 @@ item.taurun_plate.name=Taurun Chestplate
|
||||
item.telepad.name=Telepad
|
||||
item.tem_flakes.name=Tem Flakes
|
||||
item.template_folder.name=Machine Template Folder
|
||||
item.template_folder.desc=Machine Templates: Paper + Dye$Fluid IDs: Iron Plate + Dye$Press Stamps: Flat Stamp$Siren Tracks: Insulator + Steel Plate
|
||||
item.template_folder.desc=Machine Templates: Paper + Dye$Press Stamps: Flat Stamp$Siren Tracks: Insulator + Steel Plate
|
||||
item.test_nuke_igniter.name=Igniter
|
||||
item.test_nuke_propellant.name=Propellant
|
||||
item.test_nuke_tier1_bullet.name=U235 Projectile (Tier 1)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 238 B |
BIN
src/main/resources/assets/hbm/textures/items/key_sheet.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/key_sheet.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
Loading…
x
Reference in New Issue
Block a user