mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
and now for something completely different
This commit is contained in:
parent
7b8c87478a
commit
6b23588aa7
@ -4,6 +4,7 @@ import static com.hbm.inventory.OreDictManager.*;
|
||||
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemChemicalDye.EnumChemDye;
|
||||
import com.hbm.main.CraftingManager;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
@ -69,6 +70,17 @@ public class PowderRecipes {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_flux, 4), new Object[] { F.dust(), KEY_SAND });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_flux, 8), new Object[] { PB.dust(), S.dust(), KEY_SAND });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_flux, 16), new Object[] { BORAX.dust(), KEY_SAND });
|
||||
|
||||
//Unleash the colores
|
||||
CraftingManager.addShapelessAuto(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.GRAY, 2), new Object[] { DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.BLACK), DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.WHITE) });
|
||||
CraftingManager.addShapelessAuto(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.SILVER, 2), new Object[] { DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.GRAY), DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.WHITE) });
|
||||
CraftingManager.addShapelessAuto(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.ORANGE, 2), new Object[] { DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.RED), DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.YELLOW) });
|
||||
CraftingManager.addShapelessAuto(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.LIME, 2), new Object[] { DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.GREEN), DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.WHITE) });
|
||||
CraftingManager.addShapelessAuto(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.CYAN, 2), new Object[] { DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.BLUE), DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.GREEN) });
|
||||
CraftingManager.addShapelessAuto(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.PURPLE, 2), new Object[] { DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.RED), DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.BLUE) });
|
||||
CraftingManager.addShapelessAuto(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.BROWN, 2), new Object[] { DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.ORANGE), DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.BLACK) });
|
||||
CraftingManager.addShapelessAuto(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.MAGENTA, 2), new Object[] { DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.RED), DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.PURPLE) });
|
||||
CraftingManager.addShapelessAuto(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.LIGHTBLUE, 2), new Object[] { DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.BLUE), DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.WHITE) });
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -480,6 +480,13 @@ public class OreDictManager {
|
||||
OreDictionary.registerOre("slabWoodPink", pink_slab);
|
||||
OreDictionary.registerOre("stairWood", pink_stairs);
|
||||
OreDictionary.registerOre("stairWoodPink", pink_stairs);
|
||||
|
||||
String[] dyes = { "Black", "Red", "Green", "Brown", "Blue", "Purple", "Cyan", "LightGray", "Gray", "Pink", "Lime", "Yellow", "LightBlue", "Magenta", "Orange", "White" };
|
||||
for(int i = 0; i < 16; i++) {
|
||||
String dyeName = "dye" + dyes[i];
|
||||
OreDictionary.registerOre(dyeName, new ItemStack(ModItems.chemical_dye, 1, i));
|
||||
OreDictionary.registerOre("dye", new ItemStack(ModItems.chemical_dye, 1, i));
|
||||
}
|
||||
|
||||
OreDictionary.registerOre("dyeRed", cinnebar);
|
||||
OreDictionary.registerOre("dye", cinnebar);
|
||||
|
||||
@ -13,6 +13,7 @@ import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemChemicalDye.EnumChemDye;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.items.special.ItemBedrockOre.EnumBedrockOre;
|
||||
import com.hbm.items.special.ItemPlasticScrap.ScrapType;
|
||||
@ -110,6 +111,14 @@ public class CrystallizerRecipes {
|
||||
registerRecipe(new ComparableStack(ModItems.ore_nitrocrystalline, 1, i), new CrystallizerRecipe(new ItemStack(ModItems.ore_deepcleaned, 1, i), oreTime), organic);
|
||||
}
|
||||
|
||||
FluidStack woodOil = new FluidStack(Fluids.WOODOIL, 100);
|
||||
registerRecipe(COAL.dust(), new CrystallizerRecipe(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.BLACK, 4), 20), woodOil);
|
||||
registerRecipe(TI.dust(), new CrystallizerRecipe(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.WHITE, 4), 20), woodOil);
|
||||
registerRecipe(IRON.dust(), new CrystallizerRecipe(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.RED, 4), 20), woodOil);
|
||||
registerRecipe(W.dust(), new CrystallizerRecipe(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.YELLOW, 4), 20), woodOil);
|
||||
registerRecipe(CU.dust(), new CrystallizerRecipe(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.GREEN, 4), 20), woodOil);
|
||||
registerRecipe(CO.dust(), new CrystallizerRecipe(DictFrame.fromOne(ModItems.chemical_dye, EnumChemDye.BLUE, 4), 20), woodOil);
|
||||
|
||||
List<ItemStack> quartz = OreDictionary.getOres("crystalCertusQuartz");
|
||||
|
||||
if(quartz != null && !quartz.isEmpty()) {
|
||||
|
||||
@ -332,6 +332,7 @@ public class ModItems {
|
||||
public static Item thruster_nuclear;
|
||||
public static Item safety_fuse;
|
||||
public static Item part_generic;
|
||||
public static Item chemical_dye;
|
||||
|
||||
public static Item undefined;
|
||||
|
||||
@ -2764,6 +2765,7 @@ public class ModItems {
|
||||
thruster_nuclear = new Item().setUnlocalizedName("thruster_nuclear").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":thruster_nuclear");
|
||||
safety_fuse = new Item().setUnlocalizedName("safety_fuse").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":safety_fuse");
|
||||
part_generic = new ItemGenericPart().setUnlocalizedName("part_generic").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":part_generic");
|
||||
chemical_dye = new ItemChemicalDye().setUnlocalizedName("chemical_dye").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":chemical_dye");
|
||||
|
||||
undefined = new ItemCustomLore().setUnlocalizedName("undefined").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":undefined");
|
||||
|
||||
@ -6355,6 +6357,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(chlorine_pinwheel, chlorine_pinwheel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ring_starmetal, ring_starmetal.getUnlocalizedName());
|
||||
GameRegistry.registerItem(deuterium_filter, deuterium_filter.getUnlocalizedName());
|
||||
GameRegistry.registerItem(chemical_dye, chemical_dye.getUnlocalizedName());
|
||||
GameRegistry.registerItem(part_generic, part_generic.getUnlocalizedName());
|
||||
GameRegistry.registerItem(parts_legendary, parts_legendary.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gear_large, gear_large.getUnlocalizedName());
|
||||
|
||||
79
src/main/java/com/hbm/items/machine/ItemChemicalDye.java
Normal file
79
src/main/java/com/hbm/items/machine/ItemChemicalDye.java
Normal file
@ -0,0 +1,79 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import com.hbm.items.ItemEnumMulti;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.util.EnumUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class ItemChemicalDye extends ItemEnumMulti {
|
||||
|
||||
protected IIcon overlayIcon;
|
||||
|
||||
public ItemChemicalDye() {
|
||||
super(EnumChemDye.class, true, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister reg) {
|
||||
super.registerIcons(reg);
|
||||
|
||||
this.overlayIcon = reg.registerIcon(RefStrings.MODID + ":chemical_dye_overlay");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamageForRenderPass(int meta, int pass) {
|
||||
return pass == 1 ? this.overlayIcon : super.getIconFromDamageForRenderPass(meta, pass);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int pass) {
|
||||
|
||||
if(pass == 1) {
|
||||
EnumChemDye dye = EnumUtil.grabEnumSafely(EnumChemDye.class, stack.getItemDamage());
|
||||
return dye.color;
|
||||
}
|
||||
|
||||
return 0xffffff;
|
||||
}
|
||||
|
||||
public static enum EnumChemDye {
|
||||
BLACK(1973019, "Black"),
|
||||
RED(11743532, "Red"),
|
||||
GREEN(3887386, "Green"),
|
||||
BROWN(5320730, "Brown"),
|
||||
BLUE(2437522, "Blue"),
|
||||
PURPLE(8073150, "Purple"),
|
||||
CYAN(2651799, "Cyan"),
|
||||
SILVER(11250603, "LightGray"),
|
||||
GRAY(4408131, "Gray"),
|
||||
PINK(14188952, "Pink"),
|
||||
LIME(4312372, "Lime"),
|
||||
YELLOW(14602026, "Yellow"),
|
||||
LIGHTBLUE(6719955, "LightBlue"),
|
||||
MAGENTA(12801229, "Magenta"),
|
||||
ORANGE(15435844, "Orange"),
|
||||
WHITE(15790320, "White");
|
||||
|
||||
public int color;
|
||||
public String dictName;
|
||||
|
||||
private EnumChemDye(int color, String name) {
|
||||
this.color = color;
|
||||
this.dictName = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -101,7 +101,7 @@ public class TileEntityMachineCatalyticCracker extends TileEntityLoadedBase impl
|
||||
int right = quart.getValue().fill;
|
||||
|
||||
for(int i = 0; i < 2; i++) {
|
||||
if(tanks[0].getFill() >= 100 && tanks[1].getFill() >= 100 && hasSpace(left, right)) {
|
||||
if(tanks[0].getFill() >= 100 && tanks[1].getFill() >= 200 && hasSpace(left, right)) {
|
||||
tanks[0].setFill(tanks[0].getFill() - 100);
|
||||
tanks[1].setFill(tanks[1].getFill() - 200);
|
||||
tanks[2].setFill(tanks[2].getFill() + left);
|
||||
@ -113,7 +113,7 @@ public class TileEntityMachineCatalyticCracker extends TileEntityLoadedBase impl
|
||||
}
|
||||
|
||||
private boolean hasSpace(int left, int right) {
|
||||
return tanks[2].getFill() + left <= tanks[2].getMaxFill() && tanks[3].getFill() + right <= tanks[3].getMaxFill() && tanks[4].getFill() + 200 <= tanks[4].getMaxFill();
|
||||
return tanks[2].getFill() + left <= tanks[2].getMaxFill() && tanks[3].getFill() + right <= tanks[3].getMaxFill() && tanks[4].getFill() + 2 <= tanks[4].getMaxFill();
|
||||
}
|
||||
|
||||
private void setupTanks() {
|
||||
|
||||
BIN
src/main/resources/assets/hbm/textures/items/chemical_dye.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/chemical_dye.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 226 B |
Binary file not shown.
|
After Width: | Height: | Size: 163 B |
BIN
src/main/resources/assets/hbm/textures/items/ingot_pet.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/ingot_pet.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 250 B |
|
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 236 B |
Loading…
x
Reference in New Issue
Block a user