mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-03-24 02:44:34 +00:00
mhhhh, donuts
This commit is contained in:
parent
f50f93ec6c
commit
94d37e3910
@ -2,6 +2,8 @@
|
||||
* Doubled bismuth and tantalum yields from high-performance solvent bedrock ore processing
|
||||
* Hoppers and buckets can now be made out of steel
|
||||
* RoR gauges now show the lowest and highest configured value on the actual gauge
|
||||
* The steel sword now looks like a medival broad sword with the appropriate scale
|
||||
* All remaining items have been removed from the template folder, siren tracks and plate stamps are now made in th
|
||||
|
||||
## Fixed
|
||||
* Fixed size 15 dual kerosene thruster not rendering at all
|
||||
|
||||
@ -8,15 +8,7 @@ import com.hbm.blocks.generic.*;
|
||||
import com.hbm.blocks.generic.BlockHazard.ExtDisplayEffect;
|
||||
import com.hbm.blocks.machine.*;
|
||||
import com.hbm.blocks.machine.albion.*;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionBoiler;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionBreeder;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionCollector;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionCoupler;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionKlystron;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionKlystronCreative;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionMHDT;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionPlasmaForge;
|
||||
import com.hbm.blocks.machine.fusion.MachineFusionTorus;
|
||||
import com.hbm.blocks.machine.fusion.*;
|
||||
import com.hbm.blocks.machine.pile.*;
|
||||
import com.hbm.blocks.machine.rbmk.*;
|
||||
import com.hbm.blocks.network.*;
|
||||
|
||||
@ -1,11 +1,14 @@
|
||||
package com.hbm.blocks.machine.fusion;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.fusion.TileEntityFusionPlasmaForge;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineFusionPlasmaForge extends BlockDummyable {
|
||||
|
||||
@ -16,16 +19,20 @@ public class MachineFusionPlasmaForge extends BlockDummyable {
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityFusionPlasmaForge();
|
||||
if(meta >= 6) return new TileEntityProxyCombo().inventory().power().fluid();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] { 4, 0, 5, 5, 5, 5 };
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] { 4, 0, 5, 5, 5, 5 }; }
|
||||
@Override public int getOffset() { return 5; }
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 5;
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1154,7 +1154,6 @@ public class AssemblyMachineRecipes extends GenericRecipes<GenericRecipe> {
|
||||
new ComparableStack(ModItems.motor_bismuth, 3)));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static HashMap getRecipes() {
|
||||
|
||||
@ -0,0 +1,80 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import static com.hbm.inventory.OreDictManager.BSCCO;
|
||||
import static com.hbm.inventory.OreDictManager.SBD;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipe;
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemEnums.EnumExpensiveType;
|
||||
import com.hbm.items.ItemGenericPart.EnumPartType;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class PlasmaForgeRecipes extends GenericRecipes<GenericRecipe> {
|
||||
|
||||
public static final PlasmaForgeRecipes INSTANCE = new PlasmaForgeRecipes();
|
||||
|
||||
@Override public int inputItemLimit() { return 12; }
|
||||
@Override public int inputFluidLimit() { return 1; }
|
||||
@Override public int outputItemLimit() { return 1; }
|
||||
@Override public int outputFluidLimit() { return 0; }
|
||||
|
||||
@Override public String getFileName() { return "hbmPlasmaForge.json"; }
|
||||
@Override public GenericRecipe instantiateRecipe(String name) { return new GenericRecipe(name); }
|
||||
|
||||
@Override
|
||||
public void registerDefaults() {
|
||||
|
||||
this.register(new GenericRecipe("plsm.gerald").setup(6_000, 100).outputItems(new ItemStack(ModItems.sat_gerald, 1))
|
||||
.inputItems(new OreDictStack(SBD.plateCast(), 64),
|
||||
new OreDictStack(SBD.plateCast(), 64),
|
||||
new OreDictStack(BSCCO.wireDense(), 64),
|
||||
new OreDictStack(BSCCO.wireDense(), 64),
|
||||
new ComparableStack(ModBlocks.det_nuke, 64),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.circuit, 64, EnumCircuitType.CONTROLLER_QUANTUM),
|
||||
new ComparableStack(ModItems.coin_ufo, 1))
|
||||
.inputItemsEx(new OreDictStack(SBD.plateCast(), 64),
|
||||
new OreDictStack(BSCCO.wireDense(), 64),
|
||||
new ComparableStack(ModBlocks.det_nuke, 64),
|
||||
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
|
||||
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
|
||||
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.BRONZE_TUBES),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.part_generic, 64, EnumPartType.HDE),
|
||||
new ComparableStack(ModItems.circuit, 64, EnumCircuitType.CONTROLLER_QUANTUM),
|
||||
new ComparableStack(ModItems.item_expensive, 64, EnumExpensiveType.COMPUTER),
|
||||
new ComparableStack(ModItems.coin_ufo, 1)).setPools(GenericRecipes.POOL_PREFIX_DISCOVER + "gerald"));
|
||||
}
|
||||
|
||||
public static HashMap getRecipes() {
|
||||
HashMap<Object, Object> recipes = new HashMap<Object, Object>();
|
||||
|
||||
for(GenericRecipe recipe : INSTANCE.recipeOrderedList) {
|
||||
List input = new ArrayList();
|
||||
if(recipe.inputItem != null) for(AStack stack : recipe.inputItem) input.add(stack);
|
||||
if(recipe.inputFluid != null) for(FluidStack stack : recipe.inputFluid) input.add(ItemFluidIcon.make(stack));
|
||||
List output = new ArrayList();
|
||||
if(recipe.outputItem != null) for(IOutput stack : recipe.outputItem) output.add(stack.getAllPossibilities());
|
||||
recipes.put(input.toArray(), output.toArray());
|
||||
}
|
||||
|
||||
return recipes;
|
||||
}
|
||||
}
|
||||
@ -488,6 +488,7 @@ public class ClientProxy extends ServerProxy {
|
||||
double[] tir = new double[] {0, 0, 0};
|
||||
double[] sir = new double[] {1, 1, 1};
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.steel_sword, new ItemRenderTransformer(rtp, ttp_high, stp, rfp, tfp, sfp, rir, tir, sir));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.titanium_sword, new ItemRenderTransformer(rtp, ttp_high, stp, rfp, tfp, sfp, rir, tir, sir));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.alloy_sword, new ItemRenderTransformer(rtp, ttp_high, stp, rfp, tfp, sfp, rir, tir, sir));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.desh_sword, new ItemRenderTransformer(rtp, ttp_low, stp, rfp, tfp, sfp, rir, tir, sir));
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
package com.hbm.module.machine;
|
||||
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.recipes.PlasmaForgeRecipes;
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipe;
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipes;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import api.hbm.energymk2.IEnergyHandlerMK2;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ModuleMachinePlasma extends ModuleMachineBase {
|
||||
|
||||
public ModuleMachinePlasma(int index, IEnergyHandlerMK2 battery, ItemStack[] slots) {
|
||||
super(index, battery, slots);
|
||||
this.inputSlots = new int[12];
|
||||
this.outputSlots = new int[1];
|
||||
this.inputTanks = new FluidTank[1];
|
||||
this.outputTanks = new FluidTank[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public GenericRecipes getRecipeSet() {
|
||||
return PlasmaForgeRecipes.INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupTanks(GenericRecipe recipe) {
|
||||
super.setupTanks(recipe);
|
||||
if(recipe == null) return;
|
||||
for(int i = 0; i < inputTanks.length; i++) if(recipe.inputFluid != null && recipe.inputFluid.length > i) inputTanks[i].changeTankSize(BobMathUtil.max(inputTanks[i].getFill(), recipe.inputFluid[i].fill * 2, 16_000));
|
||||
}
|
||||
|
||||
public ModuleMachinePlasma itemInput(int from) { for(int i = 0; i < inputSlots.length; i++) inputSlots[i] = from + i; return this; }
|
||||
public ModuleMachinePlasma itemOutput(int a) { outputSlots[0] = a; return this; }
|
||||
public ModuleMachinePlasma fluidInput(FluidTank a) { inputTanks[0] = a; return this; }
|
||||
}
|
||||
@ -1,7 +1,131 @@
|
||||
package com.hbm.tileentity.machine.fusion;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.recipes.PlasmaForgeRecipes;
|
||||
import com.hbm.inventory.recipes.loader.GenericRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.module.machine.ModuleMachinePlasma;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
public class TileEntityFusionPlasmaForge extends TileEntity {
|
||||
import api.hbm.energymk2.IEnergyReceiverMK2;
|
||||
import api.hbm.fluidmk2.IFluidStandardReceiverMK2;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implements IEnergyReceiverMK2, IFluidStandardReceiverMK2, IControlReceiver, IGUIProvider {
|
||||
|
||||
public FluidTank inputTank;
|
||||
|
||||
public long power;
|
||||
public long maxPower = 10_000_000;
|
||||
|
||||
public ModuleMachinePlasma plasmaModule;
|
||||
|
||||
public TileEntityFusionPlasmaForge() {
|
||||
super(16);
|
||||
this.inputTank = new FluidTank(Fluids.NONE, 16_000);
|
||||
|
||||
this.plasmaModule = new ModuleMachinePlasma(0, this, slots)
|
||||
.itemInput(3).itemOutput(15).fluidInput(inputTank);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.machinePlasmaForge";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(maxPower <= 0) this.maxPower = 1_000_000;
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
GenericRecipe recipe = PlasmaForgeRecipes.INSTANCE.recipeNameMap.get(plasmaModule.recipe);
|
||||
if(recipe != null) this.maxPower = recipe.power * 100;
|
||||
|
||||
this.maxPower = BobMathUtil.max(this.power, this.maxPower, 100_000);
|
||||
this.power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
||||
|
||||
for(DirPos pos : getConPos()) {
|
||||
this.trySubscribe(worldObj, pos);
|
||||
if(inputTank.getTankType() != Fluids.NONE) this.trySubscribe(inputTank.getTankType(), worldObj, pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public DirPos[] getConPos() {
|
||||
return new DirPos[] {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
||||
if(slot == 0) return true; // battery
|
||||
if(slot == 1 && stack.getItem() == ModItems.blueprints) return true;
|
||||
// TODO booster material
|
||||
if(this.plasmaModule.isItemValid(slot, stack)) return true; // recipe input crap
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
return i == 15 || this.plasmaModule.isSlotClogged(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return new int[] {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
|
||||
}
|
||||
|
||||
@Override public long getPower() { return power; }
|
||||
@Override public void setPower(long power) { this.power = power; }
|
||||
@Override public long getMaxPower() { return maxPower; }
|
||||
|
||||
@Override public FluidTank[] getReceivingTanks() { return new FluidTank[] {inputTank}; }
|
||||
@Override public FluidTank[] getAllTanks() { return new FluidTank[] {inputTank}; }
|
||||
|
||||
@Override public boolean hasPermission(EntityPlayer player) { return this.isUseableByPlayer(player); }
|
||||
|
||||
@Override
|
||||
public void receiveControl(NBTTagCompound data) {
|
||||
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
if(bb == null) bb = AxisAlignedBB.getBoundingBox(xCoord - 5, yCoord, zCoord - 5, xCoord + 5, yCoord + 6, zCoord + 6);
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
Loading…
x
Reference in New Issue
Block a user