NEI stuff, textures

This commit is contained in:
Bob 2024-09-30 22:12:21 +02:00
parent ad3c4e20ca
commit 6cddb3e238
27 changed files with 92 additions and 24 deletions

View File

@ -6,7 +6,7 @@ import com.hbm.inventory.recipes.ArcFurnaceRecipes;
public class ArcFurnaceFluidHandler extends NEIUniversalHandler {
public ArcFurnaceFluidHandler() {
super("Arc Furnace (Fluid)", ModBlocks.machine_arc_furnace, ArcFurnaceRecipes.getFluidRecipes());
super(ModBlocks.machine_arc_furnace.getLocalizedName(), ModBlocks.machine_arc_furnace, ArcFurnaceRecipes.getFluidRecipes());
}
@Override

View File

@ -6,7 +6,7 @@ import com.hbm.inventory.recipes.ArcFurnaceRecipes;
public class ArcFurnaceSolidHandler extends NEIUniversalHandler {
public ArcFurnaceSolidHandler() {
super("Arc Furnace (Solid)", ModBlocks.machine_arc_furnace, ArcFurnaceRecipes.getSolidRecipes());
super(ModBlocks.machine_arc_furnace.getLocalizedName(), ModBlocks.machine_arc_furnace, ArcFurnaceRecipes.getSolidRecipes());
}
@Override

View File

@ -15,7 +15,7 @@ import net.minecraft.item.ItemStack;
public class ArcWelderHandler extends NEIUniversalHandler {
public ArcWelderHandler() {
super("Arc Welder", ModBlocks.machine_arc_welder, ArcWelderRecipes.getRecipes());
super(ModBlocks.machine_arc_welder.getLocalizedName(), ModBlocks.machine_arc_welder, ArcWelderRecipes.getRecipes());
}
@Override

View File

@ -17,7 +17,7 @@ import net.minecraft.item.ItemStack;
public class AshpitHandler extends NEIUniversalHandler {
public AshpitHandler() {
super("Ashpit", ModBlocks.machine_ashpit, getRecipes());
super(ModBlocks.machine_ashpit.getLocalizedName(), ModBlocks.machine_ashpit, getRecipes());
}
@Override

View File

@ -13,7 +13,7 @@ import com.hbm.items.machine.ItemFluidIcon;
public class BoilingHandler extends NEIUniversalHandler {
public BoilingHandler() {
super("Boiler", ModBlocks.machine_boiler, generateRecipes());
super(ModBlocks.machine_boiler.getLocalizedName(), ModBlocks.machine_boiler, generateRecipes());
}
@Override

View File

@ -9,7 +9,7 @@ import com.hbm.inventory.recipes.CokerRecipes;
public class CokingHandler extends NEIUniversalHandler {
public CokingHandler() {
super("Coking", ModBlocks.machine_coker, CokerRecipes.getRecipes());
super(ModBlocks.machine_coker.getLocalizedName(), ModBlocks.machine_coker, CokerRecipes.getRecipes());
}
@Override

View File

@ -9,7 +9,7 @@ import com.hbm.inventory.recipes.CombinationRecipes;
public class CombinationHandler extends NEIUniversalHandler {
public CombinationHandler() {
super("Combination Furnace", ModBlocks.furnace_combination, CombinationRecipes.getRecipes());
super(ModBlocks.furnace_combination.getLocalizedName(), ModBlocks.furnace_combination, CombinationRecipes.getRecipes());
}
@Override

View File

@ -9,7 +9,7 @@ import com.hbm.inventory.recipes.ElectrolyserFluidRecipes;
public class ElectrolyserFluidHandler extends NEIUniversalHandler {
public ElectrolyserFluidHandler() {
super("Electrolysis", ModBlocks.machine_electrolyser, ElectrolyserFluidRecipes.getRecipes());
super(ModBlocks.machine_electrolyser.getLocalizedName(), ModBlocks.machine_electrolyser, ElectrolyserFluidRecipes.getRecipes());
}
@Override

View File

@ -9,7 +9,7 @@ import com.hbm.inventory.recipes.ElectrolyserMetalRecipes;
public class ElectrolyserMetalHandler extends NEIUniversalHandler {
public ElectrolyserMetalHandler() {
super("Electrolysis", ModBlocks.machine_electrolyser, ElectrolyserMetalRecipes.getRecipes());
super(ModBlocks.machine_electrolyser.getLocalizedName(), ModBlocks.machine_electrolyser, ElectrolyserMetalRecipes.getRecipes());
}
@Override

View File

@ -9,7 +9,7 @@ import com.hbm.inventory.recipes.ExposureChamberRecipes;
public class ExposureChamberHandler extends NEIUniversalHandler {
public ExposureChamberHandler() {
super("Exposure Chamber", ModBlocks.machine_exposure_chamber, ExposureChamberRecipes.getRecipes());
super(ModBlocks.machine_exposure_chamber.getLocalizedName(), ModBlocks.machine_exposure_chamber, ExposureChamberRecipes.getRecipes());
}
@Override

View File

@ -6,7 +6,7 @@ import com.hbm.inventory.recipes.FractionRecipes;
public class FractioningHandler extends NEIUniversalHandler {
public FractioningHandler() {
super("Fractioning", ModBlocks.machine_fraction_tower, FractionRecipes.getFractionRecipesForNEI());
super(ModBlocks.machine_fraction_tower.getLocalizedName(), ModBlocks.machine_fraction_tower, FractionRecipes.getFractionRecipesForNEI());
}
@Override

View File

@ -6,7 +6,7 @@ import com.hbm.inventory.recipes.LiquefactionRecipes;
public class LiquefactionHandler extends NEIUniversalHandler {
public LiquefactionHandler() {
super("Liquefaction", ModBlocks.machine_liquefactor, LiquefactionRecipes.getRecipes());
super(ModBlocks.machine_liquefactor.getLocalizedName(), ModBlocks.machine_liquefactor, LiquefactionRecipes.getRecipes());
}
@Override

View File

@ -9,7 +9,7 @@ import com.hbm.inventory.recipes.MixerRecipes;
public class MixerHandler extends NEIUniversalHandler {
public MixerHandler() {
super("Mixer", ModBlocks.machine_mixer, MixerRecipes.getRecipes());
super(ModBlocks.machine_mixer.getLocalizedName(), ModBlocks.machine_mixer, MixerRecipes.getRecipes());
}
@Override

View File

@ -9,7 +9,7 @@ import com.hbm.inventory.recipes.OutgasserRecipes;
public class OutgasserHandler extends NEIUniversalHandler {
public OutgasserHandler() {
super("Irradiation", ModBlocks.rbmk_outgasser, OutgasserRecipes.getRecipes());
super(ModBlocks.rbmk_outgasser.getLocalizedName(), ModBlocks.rbmk_outgasser, OutgasserRecipes.getRecipes());
}
@Override

View File

@ -9,7 +9,7 @@ import com.hbm.inventory.recipes.PyroOvenRecipes;
public class PyroHandler extends NEIUniversalHandler {
public PyroHandler() {
super("Pyrolysis", ModBlocks.machine_pyrooven, PyroOvenRecipes.getRecipes());
super(ModBlocks.machine_pyrooven.getLocalizedName(), ModBlocks.machine_pyrooven, PyroOvenRecipes.getRecipes());
}
@Override

View File

@ -0,0 +1,62 @@
package com.hbm.handler.nei;
import java.awt.Rectangle;
import java.util.Locale;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.gui.GUIMachineRotaryFurnace;
import com.hbm.inventory.recipes.RotaryFurnaceRecipes;
import com.hbm.inventory.recipes.RotaryFurnaceRecipes.RotaryFurnaceRecipe;
import com.hbm.items.machine.ItemScraps;
import com.hbm.util.I18nUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.item.ItemStack;
public class RotaryFurnaceHandler extends NEIUniversalHandler {
public RotaryFurnaceHandler() {
super(ModBlocks.machine_rotary_furnace.getLocalizedName(), ModBlocks.machine_rotary_furnace, RotaryFurnaceRecipes.getRecipes());
}
@Override
public String getKey() {
return "ntmRotaryFurnace";
}
@Override
public void loadTransferRects() {
super.loadTransferRects();
transferRectsGui.add(new RecipeTransferRect(new Rectangle(58, 19, 32, 10), "ntmRotaryFurnace"));
guiGui.add(GUIMachineRotaryFurnace.class);
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
}
@Override
public void drawExtras(int recipe) {
RecipeSet rec = (RecipeSet) this.arecipes.get(recipe);
Object[] original = (Object[]) rec.originalInputInstance;
ItemStack output = rec.output[0].item;
outer: for(RotaryFurnaceRecipe arc : RotaryFurnaceRecipes.recipes) {
if(ItemStack.areItemStacksEqual(ItemScraps.create(arc.output, true), output) && arc.ingredients.length == original.length - (arc.fluid == null ? 0 : 1)) {
for(int i = 0; i < rec.input.length - (arc.fluid == null ? 0 : 1); i++) {
if(arc.ingredients[i] != original[i]) continue outer;
}
FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer;
String duration = String.format(Locale.US, "%,d", arc.duration) + " ticks";
String consumption = I18nUtil.resolveKey(Fluids.STEAM.getUnlocalizedName()) + ": " + String.format(Locale.US, "%,d", arc.steam) + " mB/t";
int side = 160;
fontRenderer.drawString(duration, side - fontRenderer.getStringWidth(duration), 43, 0x404040);
fontRenderer.drawString(consumption, side - fontRenderer.getStringWidth(consumption), 55, 0x404040);
return;
}
}
}
}

View File

@ -6,7 +6,7 @@ import com.hbm.tileentity.machine.TileEntitySawmill;
public class SawmillHandler extends NEIUniversalHandler {
public SawmillHandler() {
super("Sawmill", ModBlocks.machine_sawmill, TileEntitySawmill.getRecipes());
super(ModBlocks.machine_sawmill.getLocalizedName(), ModBlocks.machine_sawmill, TileEntitySawmill.getRecipes());
}
@Override

View File

@ -15,7 +15,7 @@ import net.minecraft.item.ItemStack;
public class SolderingStationHandler extends NEIUniversalHandler {
public SolderingStationHandler() {
super("Soldering Station", ModBlocks.machine_soldering_station, SolderingRecipes.getRecipes());
super(ModBlocks.machine_soldering_station.getLocalizedName(), ModBlocks.machine_soldering_station, SolderingRecipes.getRecipes());
}
@Override

View File

@ -6,7 +6,7 @@ import com.hbm.inventory.recipes.SolidificationRecipes;
public class SolidificationHandler extends NEIUniversalHandler {
public SolidificationHandler() {
super("Solidification", ModBlocks.machine_solidifier, SolidificationRecipes.getRecipes());
super(ModBlocks.machine_solidifier.getLocalizedName(), ModBlocks.machine_solidifier, SolidificationRecipes.getRecipes());
}
@Override

View File

@ -6,7 +6,7 @@ import com.hbm.tileentity.machine.TileEntityReactorZirnox;
public class ZirnoxRecipeHandler extends NEIUniversalHandler {
public ZirnoxRecipeHandler() {
super("ZIRNOX", ModBlocks.reactor_zirnox, TileEntityReactorZirnox.fuelMap);
super(ModBlocks.reactor_zirnox.getLocalizedName(), ModBlocks.reactor_zirnox, TileEntityReactorZirnox.fuelMap);
}
@Override

View File

@ -189,6 +189,8 @@ public class ModItems {
public static Item nugget_tetraneutronium;
public static Item powder_tetraneutronium;
public static Item ingot_starmetal;
public static Item ingot_gunmetal;
public static Item ingot_weaponsteel;
public static Item ingot_saturnite;
public static Item plate_saturnite;
public static Item ingot_ferrouranium;
@ -2617,6 +2619,8 @@ public class ModItems {
nugget_dineutronium = new ItemCustomLore().setUnlocalizedName("nugget_dineutronium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_dineutronium");
powder_dineutronium = new ItemCustomLore().setUnlocalizedName("powder_dineutronium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_dineutronium");
ingot_starmetal = new ItemStarmetal().setUnlocalizedName("ingot_starmetal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_starmetal");
ingot_gunmetal = new Item().setUnlocalizedName("ingot_gunmetal").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_gunmetal");
ingot_weaponsteel = new Item().setUnlocalizedName("ingot_weaponsteel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_gunsteel");
ingot_saturnite = new ItemCustomLore().setRarity(EnumRarity.rare).setUnlocalizedName("ingot_saturnite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_saturnite");
plate_saturnite = new ItemCustomLore().setRarity(EnumRarity.rare).setUnlocalizedName("plate_saturnite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_saturnite");
ingot_ferrouranium = new ItemCustomLore().setUnlocalizedName("ingot_ferrouranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_ferrouranium");
@ -5570,6 +5574,8 @@ public class ModItems {
GameRegistry.registerItem(ingot_desh, ingot_desh.getUnlocalizedName());
GameRegistry.registerItem(ingot_ferrouranium, ingot_ferrouranium.getUnlocalizedName());
GameRegistry.registerItem(ingot_starmetal, ingot_starmetal.getUnlocalizedName());
GameRegistry.registerItem(ingot_gunmetal, ingot_gunmetal.getUnlocalizedName());
GameRegistry.registerItem(ingot_weaponsteel, ingot_weaponsteel.getUnlocalizedName());
GameRegistry.registerItem(ingot_saturnite, ingot_saturnite.getUnlocalizedName());
GameRegistry.registerItem(ingot_euphemium, ingot_euphemium.getUnlocalizedName());
GameRegistry.registerItem(ingot_dineutronium, ingot_dineutronium.getUnlocalizedName());

View File

@ -66,6 +66,7 @@ public class NEIRegistry {
handlers.add(new ExposureChamberHandler());
handlers.add(new ArcFurnaceSolidHandler());
handlers.add(new ArcFurnaceFluidHandler());
handlers.add(new RotaryFurnaceHandler());
//this shit comes last
handlers.add(new FluidRecipeHandler());

View File

@ -314,16 +314,15 @@ public class TileEntityMachineRotaryFurnace extends TileEntityMachinePolluting i
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
BlockPos core = new BlockPos(xCoord, yCoord, zCoord);
core.offset(dir, -1);
//Red
if(pos.equals(core.clone().offset(rot, -2))) return new int[] {0};
if(side == dir.getOpposite().ordinal() && pos.equals(core.clone().offset(dir, -1).offset(rot, -2))) return new int[] {0};
//Yellow
if(pos.equals(core.clone().offset(rot, -1))) return new int[] {1};
if(side == dir.getOpposite().ordinal() && pos.equals(core.clone().offset(dir, -1).offset(rot, -1))) return new int[] {1};
//Green
if(pos.equals(core)) return new int[] {2};
if(side == dir.getOpposite().ordinal() && pos.equals(core.clone().offset(dir, -1))) return new int[] {2};
//Fuel
if(pos.equals(new BlockPos(xCoord, yCoord, zCoord).offset(dir).offset(rot, -1))) return new int[] {4};
if(side == dir.ordinal() && pos.equals(core.clone().offset(dir, 1).offset(rot, -1))) return new int[] {4};
return new int[] { };
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 369 B

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 375 B

After

Width:  |  Height:  |  Size: 310 B