NEI stuff, textures
@ -6,7 +6,7 @@ import com.hbm.inventory.recipes.ArcFurnaceRecipes;
|
|||||||
public class ArcFurnaceFluidHandler extends NEIUniversalHandler {
|
public class ArcFurnaceFluidHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public ArcFurnaceFluidHandler() {
|
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
|
@Override
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import com.hbm.inventory.recipes.ArcFurnaceRecipes;
|
|||||||
public class ArcFurnaceSolidHandler extends NEIUniversalHandler {
|
public class ArcFurnaceSolidHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public ArcFurnaceSolidHandler() {
|
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
|
@Override
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
public class ArcWelderHandler extends NEIUniversalHandler {
|
public class ArcWelderHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public ArcWelderHandler() {
|
public ArcWelderHandler() {
|
||||||
super("Arc Welder", ModBlocks.machine_arc_welder, ArcWelderRecipes.getRecipes());
|
super(ModBlocks.machine_arc_welder.getLocalizedName(), ModBlocks.machine_arc_welder, ArcWelderRecipes.getRecipes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -17,7 +17,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
public class AshpitHandler extends NEIUniversalHandler {
|
public class AshpitHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public AshpitHandler() {
|
public AshpitHandler() {
|
||||||
super("Ashpit", ModBlocks.machine_ashpit, getRecipes());
|
super(ModBlocks.machine_ashpit.getLocalizedName(), ModBlocks.machine_ashpit, getRecipes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import com.hbm.items.machine.ItemFluidIcon;
|
|||||||
public class BoilingHandler extends NEIUniversalHandler {
|
public class BoilingHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public BoilingHandler() {
|
public BoilingHandler() {
|
||||||
super("Boiler", ModBlocks.machine_boiler, generateRecipes());
|
super(ModBlocks.machine_boiler.getLocalizedName(), ModBlocks.machine_boiler, generateRecipes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import com.hbm.inventory.recipes.CokerRecipes;
|
|||||||
public class CokingHandler extends NEIUniversalHandler {
|
public class CokingHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public CokingHandler() {
|
public CokingHandler() {
|
||||||
super("Coking", ModBlocks.machine_coker, CokerRecipes.getRecipes());
|
super(ModBlocks.machine_coker.getLocalizedName(), ModBlocks.machine_coker, CokerRecipes.getRecipes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import com.hbm.inventory.recipes.CombinationRecipes;
|
|||||||
public class CombinationHandler extends NEIUniversalHandler {
|
public class CombinationHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public CombinationHandler() {
|
public CombinationHandler() {
|
||||||
super("Combination Furnace", ModBlocks.furnace_combination, CombinationRecipes.getRecipes());
|
super(ModBlocks.furnace_combination.getLocalizedName(), ModBlocks.furnace_combination, CombinationRecipes.getRecipes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import com.hbm.inventory.recipes.ElectrolyserFluidRecipes;
|
|||||||
public class ElectrolyserFluidHandler extends NEIUniversalHandler {
|
public class ElectrolyserFluidHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public ElectrolyserFluidHandler() {
|
public ElectrolyserFluidHandler() {
|
||||||
super("Electrolysis", ModBlocks.machine_electrolyser, ElectrolyserFluidRecipes.getRecipes());
|
super(ModBlocks.machine_electrolyser.getLocalizedName(), ModBlocks.machine_electrolyser, ElectrolyserFluidRecipes.getRecipes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import com.hbm.inventory.recipes.ElectrolyserMetalRecipes;
|
|||||||
public class ElectrolyserMetalHandler extends NEIUniversalHandler {
|
public class ElectrolyserMetalHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public ElectrolyserMetalHandler() {
|
public ElectrolyserMetalHandler() {
|
||||||
super("Electrolysis", ModBlocks.machine_electrolyser, ElectrolyserMetalRecipes.getRecipes());
|
super(ModBlocks.machine_electrolyser.getLocalizedName(), ModBlocks.machine_electrolyser, ElectrolyserMetalRecipes.getRecipes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import com.hbm.inventory.recipes.ExposureChamberRecipes;
|
|||||||
public class ExposureChamberHandler extends NEIUniversalHandler {
|
public class ExposureChamberHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public ExposureChamberHandler() {
|
public ExposureChamberHandler() {
|
||||||
super("Exposure Chamber", ModBlocks.machine_exposure_chamber, ExposureChamberRecipes.getRecipes());
|
super(ModBlocks.machine_exposure_chamber.getLocalizedName(), ModBlocks.machine_exposure_chamber, ExposureChamberRecipes.getRecipes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import com.hbm.inventory.recipes.FractionRecipes;
|
|||||||
public class FractioningHandler extends NEIUniversalHandler {
|
public class FractioningHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public FractioningHandler() {
|
public FractioningHandler() {
|
||||||
super("Fractioning", ModBlocks.machine_fraction_tower, FractionRecipes.getFractionRecipesForNEI());
|
super(ModBlocks.machine_fraction_tower.getLocalizedName(), ModBlocks.machine_fraction_tower, FractionRecipes.getFractionRecipesForNEI());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import com.hbm.inventory.recipes.LiquefactionRecipes;
|
|||||||
public class LiquefactionHandler extends NEIUniversalHandler {
|
public class LiquefactionHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public LiquefactionHandler() {
|
public LiquefactionHandler() {
|
||||||
super("Liquefaction", ModBlocks.machine_liquefactor, LiquefactionRecipes.getRecipes());
|
super(ModBlocks.machine_liquefactor.getLocalizedName(), ModBlocks.machine_liquefactor, LiquefactionRecipes.getRecipes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import com.hbm.inventory.recipes.MixerRecipes;
|
|||||||
public class MixerHandler extends NEIUniversalHandler {
|
public class MixerHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public MixerHandler() {
|
public MixerHandler() {
|
||||||
super("Mixer", ModBlocks.machine_mixer, MixerRecipes.getRecipes());
|
super(ModBlocks.machine_mixer.getLocalizedName(), ModBlocks.machine_mixer, MixerRecipes.getRecipes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import com.hbm.inventory.recipes.OutgasserRecipes;
|
|||||||
public class OutgasserHandler extends NEIUniversalHandler {
|
public class OutgasserHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public OutgasserHandler() {
|
public OutgasserHandler() {
|
||||||
super("Irradiation", ModBlocks.rbmk_outgasser, OutgasserRecipes.getRecipes());
|
super(ModBlocks.rbmk_outgasser.getLocalizedName(), ModBlocks.rbmk_outgasser, OutgasserRecipes.getRecipes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import com.hbm.inventory.recipes.PyroOvenRecipes;
|
|||||||
public class PyroHandler extends NEIUniversalHandler {
|
public class PyroHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public PyroHandler() {
|
public PyroHandler() {
|
||||||
super("Pyrolysis", ModBlocks.machine_pyrooven, PyroOvenRecipes.getRecipes());
|
super(ModBlocks.machine_pyrooven.getLocalizedName(), ModBlocks.machine_pyrooven, PyroOvenRecipes.getRecipes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
62
src/main/java/com/hbm/handler/nei/RotaryFurnaceHandler.java
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -6,7 +6,7 @@ import com.hbm.tileentity.machine.TileEntitySawmill;
|
|||||||
public class SawmillHandler extends NEIUniversalHandler {
|
public class SawmillHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public SawmillHandler() {
|
public SawmillHandler() {
|
||||||
super("Sawmill", ModBlocks.machine_sawmill, TileEntitySawmill.getRecipes());
|
super(ModBlocks.machine_sawmill.getLocalizedName(), ModBlocks.machine_sawmill, TileEntitySawmill.getRecipes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
public class SolderingStationHandler extends NEIUniversalHandler {
|
public class SolderingStationHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public SolderingStationHandler() {
|
public SolderingStationHandler() {
|
||||||
super("Soldering Station", ModBlocks.machine_soldering_station, SolderingRecipes.getRecipes());
|
super(ModBlocks.machine_soldering_station.getLocalizedName(), ModBlocks.machine_soldering_station, SolderingRecipes.getRecipes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import com.hbm.inventory.recipes.SolidificationRecipes;
|
|||||||
public class SolidificationHandler extends NEIUniversalHandler {
|
public class SolidificationHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public SolidificationHandler() {
|
public SolidificationHandler() {
|
||||||
super("Solidification", ModBlocks.machine_solidifier, SolidificationRecipes.getRecipes());
|
super(ModBlocks.machine_solidifier.getLocalizedName(), ModBlocks.machine_solidifier, SolidificationRecipes.getRecipes());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import com.hbm.tileentity.machine.TileEntityReactorZirnox;
|
|||||||
public class ZirnoxRecipeHandler extends NEIUniversalHandler {
|
public class ZirnoxRecipeHandler extends NEIUniversalHandler {
|
||||||
|
|
||||||
public ZirnoxRecipeHandler() {
|
public ZirnoxRecipeHandler() {
|
||||||
super("ZIRNOX", ModBlocks.reactor_zirnox, TileEntityReactorZirnox.fuelMap);
|
super(ModBlocks.reactor_zirnox.getLocalizedName(), ModBlocks.reactor_zirnox, TileEntityReactorZirnox.fuelMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -189,6 +189,8 @@ public class ModItems {
|
|||||||
public static Item nugget_tetraneutronium;
|
public static Item nugget_tetraneutronium;
|
||||||
public static Item powder_tetraneutronium;
|
public static Item powder_tetraneutronium;
|
||||||
public static Item ingot_starmetal;
|
public static Item ingot_starmetal;
|
||||||
|
public static Item ingot_gunmetal;
|
||||||
|
public static Item ingot_weaponsteel;
|
||||||
public static Item ingot_saturnite;
|
public static Item ingot_saturnite;
|
||||||
public static Item plate_saturnite;
|
public static Item plate_saturnite;
|
||||||
public static Item ingot_ferrouranium;
|
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");
|
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");
|
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_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");
|
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");
|
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");
|
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_desh, ingot_desh.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(ingot_ferrouranium, ingot_ferrouranium.getUnlocalizedName());
|
GameRegistry.registerItem(ingot_ferrouranium, ingot_ferrouranium.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(ingot_starmetal, ingot_starmetal.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_saturnite, ingot_saturnite.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(ingot_euphemium, ingot_euphemium.getUnlocalizedName());
|
GameRegistry.registerItem(ingot_euphemium, ingot_euphemium.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(ingot_dineutronium, ingot_dineutronium.getUnlocalizedName());
|
GameRegistry.registerItem(ingot_dineutronium, ingot_dineutronium.getUnlocalizedName());
|
||||||
|
|||||||
@ -66,6 +66,7 @@ public class NEIRegistry {
|
|||||||
handlers.add(new ExposureChamberHandler());
|
handlers.add(new ExposureChamberHandler());
|
||||||
handlers.add(new ArcFurnaceSolidHandler());
|
handlers.add(new ArcFurnaceSolidHandler());
|
||||||
handlers.add(new ArcFurnaceFluidHandler());
|
handlers.add(new ArcFurnaceFluidHandler());
|
||||||
|
handlers.add(new RotaryFurnaceHandler());
|
||||||
|
|
||||||
//this shit comes last
|
//this shit comes last
|
||||||
handlers.add(new FluidRecipeHandler());
|
handlers.add(new FluidRecipeHandler());
|
||||||
|
|||||||
@ -314,16 +314,15 @@ public class TileEntityMachineRotaryFurnace extends TileEntityMachinePolluting i
|
|||||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
|
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
|
||||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
BlockPos core = new BlockPos(xCoord, yCoord, zCoord);
|
BlockPos core = new BlockPos(xCoord, yCoord, zCoord);
|
||||||
core.offset(dir, -1);
|
|
||||||
|
|
||||||
//Red
|
//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
|
//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
|
//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
|
//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[] { };
|
return new int[] { };
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 369 B After Width: | Height: | Size: 366 B |
|
Before Width: | Height: | Size: 390 B After Width: | Height: | Size: 317 B |
|
Before Width: | Height: | Size: 375 B After Width: | Height: | Size: 310 B |