mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
i spilled my tomato sauce
This commit is contained in:
parent
78089b2265
commit
5372884c50
12
changelog
12
changelog
@ -1,3 +1,15 @@
|
|||||||
|
## Changed
|
||||||
|
* Trenchmaster armor now has the fast reload and more ammo traits again
|
||||||
|
* Fast reload now also plays the animation twice as fast
|
||||||
|
* More ammo does not apply to weapons that can only hold one round, like nuke and rocket launchers
|
||||||
|
* Ace of spades now works as advertised again
|
||||||
|
* Clay tablets now have "pools", tablets obtained from a black room no longer shows recipes for things not related to black rooms
|
||||||
|
* Pedestal crafting extras `GOOD_KARMA` and `BAD_KARMA` are now properly implemented
|
||||||
|
* If you don't know what this means, just ignore it
|
||||||
|
* Pneumatic tubes now have a special case when supplying autocrafters, they will only send single items since larger stacks are not accepted
|
||||||
|
* Simplified turbofan recipe
|
||||||
|
* Solar boilers will now show a tooltip when they are too cold
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
* Fixed fatal gamebreaking hard drive corrupting issue where taurun leggings were misspelled
|
* Fixed fatal gamebreaking hard drive corrupting issue where taurun leggings were misspelled
|
||||||
* Fixed minor display issue where compressed air ducts would visually connect to non-ejector pneumatic tubes
|
* Fixed minor display issue where compressed air ducts would visually connect to non-ejector pneumatic tubes
|
||||||
|
|||||||
@ -851,11 +851,7 @@ public class ModBlocks {
|
|||||||
public static Block machine_transformer_dnt;
|
public static Block machine_transformer_dnt;
|
||||||
public static Block machine_transformer_dnt_20;
|
public static Block machine_transformer_dnt_20;
|
||||||
|
|
||||||
public static Block bomb_multi_large;
|
|
||||||
public static final int guiID_bomb_multi_large = 18;
|
|
||||||
|
|
||||||
public static Block machine_solar_boiler;
|
public static Block machine_solar_boiler;
|
||||||
public static final int guiID_solar_boiler = 18;
|
|
||||||
public static Block solar_mirror;
|
public static Block solar_mirror;
|
||||||
|
|
||||||
public static Block struct_launcher;
|
public static Block struct_launcher;
|
||||||
|
|||||||
@ -53,7 +53,7 @@ public class BlockLanternBehemoth extends BlockDummyable implements IToolable, I
|
|||||||
|
|
||||||
if(didRepair) {
|
if(didRepair) {
|
||||||
HbmPlayerProps data = HbmPlayerProps.getData(player);
|
HbmPlayerProps data = HbmPlayerProps.getData(player);
|
||||||
data.reputation++;
|
if(data.reputation < 25) data.reputation++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return didRepair;
|
return didRepair;
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.hbm.blocks.generic;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.extprop.HbmPlayerProps;
|
||||||
import com.hbm.inventory.recipes.PedestalRecipes;
|
import com.hbm.inventory.recipes.PedestalRecipes;
|
||||||
import com.hbm.inventory.recipes.PedestalRecipes.PedestalRecipe;
|
import com.hbm.inventory.recipes.PedestalRecipes.PedestalRecipe;
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
@ -58,26 +59,10 @@ public class BlockPedestal extends BlockContainer {
|
|||||||
|
|
||||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||||
|
|
||||||
@Override
|
@Override public int getRenderType() { return renderID; }
|
||||||
public int getRenderType() {
|
@Override public boolean isOpaqueCube() { return false; }
|
||||||
return renderID;
|
@Override public boolean renderAsNormalBlock() { return false; }
|
||||||
}
|
@Override @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) { return true; }
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isOpaqueCube() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean renderAsNormalBlock() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
@ -133,9 +118,11 @@ public class BlockPedestal extends BlockContainer {
|
|||||||
TileEntityPedestal se = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.SOUTH.offsetX * 2 + ForgeDirection.EAST.offsetX * 2, y, z + ForgeDirection.SOUTH.offsetZ * 2 + ForgeDirection.EAST.offsetZ * 2));
|
TileEntityPedestal se = castOrNull(Compat.getTileStandard(world, x + ForgeDirection.SOUTH.offsetX * 2 + ForgeDirection.EAST.offsetX * 2, y, z + ForgeDirection.SOUTH.offsetZ * 2 + ForgeDirection.EAST.offsetZ * 2));
|
||||||
|
|
||||||
TileEntityPedestal[] tileArray = new TileEntityPedestal[] {nw, n, ne, w, center, e, sw, s, se};
|
TileEntityPedestal[] tileArray = new TileEntityPedestal[] {nw, n, ne, w, center, e, sw, s, se};
|
||||||
|
List<EntityPlayer> nearbyPlayers = world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(20, 20, 20));
|
||||||
|
|
||||||
outer: for(PedestalRecipe recipe : PedestalRecipes.recipes) {
|
outer: for(PedestalRecipe recipe : PedestalRecipes.recipes) {
|
||||||
|
|
||||||
|
/// EXTRA CONDITIONS ///
|
||||||
if(recipe.extra == recipe.extra.FULL_MOON) {
|
if(recipe.extra == recipe.extra.FULL_MOON) {
|
||||||
if(world.getCelestialAngle(0) < 0.35 || world.getCelestialAngle(0) > 0.65) continue;
|
if(world.getCelestialAngle(0) < 0.35 || world.getCelestialAngle(0) > 0.65) continue;
|
||||||
if(world.provider.getMoonPhase(world.getWorldInfo().getWorldTime()) != 0) continue;
|
if(world.provider.getMoonPhase(world.getWorldInfo().getWorldTime()) != 0) continue;
|
||||||
@ -150,6 +137,19 @@ public class BlockPedestal extends BlockContainer {
|
|||||||
if(world.getCelestialAngle(0) > 0.15 && world.getCelestialAngle(0) < 0.85) continue;
|
if(world.getCelestialAngle(0) > 0.15 && world.getCelestialAngle(0) < 0.85) continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(recipe.extra == recipe.extra.BAD_KARMA) {
|
||||||
|
boolean matches = false;
|
||||||
|
for(EntityPlayer player : nearbyPlayers) if(HbmPlayerProps.getData(player).reputation <= -10) { matches = true; break; }
|
||||||
|
if(!matches) continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(recipe.extra == recipe.extra.GOOD_KARMA) {
|
||||||
|
boolean matches = false;
|
||||||
|
for(EntityPlayer player : nearbyPlayers) if(HbmPlayerProps.getData(player).reputation >= 10) { matches = true; break; }
|
||||||
|
if(!matches) continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// CHECK ITEMS ///
|
||||||
for(int i = 0; i < 9; i++) {
|
for(int i = 0; i < 9; i++) {
|
||||||
ItemStack pedestal = tileArray[i] != null ? tileArray[i].item : null;
|
ItemStack pedestal = tileArray[i] != null ? tileArray[i].item : null;
|
||||||
if(pedestal == null && recipe.input[i] != null) continue outer;
|
if(pedestal == null && recipe.input[i] != null) continue outer;
|
||||||
@ -159,6 +159,7 @@ public class BlockPedestal extends BlockContainer {
|
|||||||
if(!recipe.input[i].matchesRecipe(pedestal, true) || recipe.input[i].stacksize != pedestal.stackSize) continue outer;
|
if(!recipe.input[i].matchesRecipe(pedestal, true) || recipe.input[i].stacksize != pedestal.stackSize) continue outer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// REMOVE ITEMS ///
|
||||||
for(int i = 0; i < 9; i++) {
|
for(int i = 0; i < 9; i++) {
|
||||||
if(i == 4) continue;
|
if(i == 4) continue;
|
||||||
ItemStack pedestal = tileArray[i] != null ? tileArray[i].item : null;
|
ItemStack pedestal = tileArray[i] != null ? tileArray[i].item : null;
|
||||||
@ -167,7 +168,8 @@ public class BlockPedestal extends BlockContainer {
|
|||||||
tileArray[i].markDirty();
|
tileArray[i].markDirty();
|
||||||
world.markBlockForUpdate(tileArray[i].xCoord, tileArray[i].yCoord, tileArray[i].zCoord);
|
world.markBlockForUpdate(tileArray[i].xCoord, tileArray[i].yCoord, tileArray[i].zCoord);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// PRODUCE RESULT ///
|
||||||
center.item = recipe.output.copy();
|
center.item = recipe.output.copy();
|
||||||
center.markDirty();
|
center.markDirty();
|
||||||
world.markBlockForUpdate(x, y, z);
|
world.markBlockForUpdate(x, y, z);
|
||||||
@ -191,10 +193,7 @@ public class BlockPedestal extends BlockContainer {
|
|||||||
|
|
||||||
public ItemStack item;
|
public ItemStack item;
|
||||||
|
|
||||||
@Override
|
@Override public boolean canUpdate() { return false; }
|
||||||
public boolean canUpdate() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Packet getDescriptionPacket() {
|
public Packet getDescriptionPacket() {
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import com.hbm.blocks.ILookOverlay;
|
|||||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
import com.hbm.tileentity.machine.TileEntitySolarBoiler;
|
import com.hbm.tileentity.machine.TileEntitySolarBoiler;
|
||||||
|
import com.hbm.util.BobMathUtil;
|
||||||
import com.hbm.util.I18nUtil;
|
import com.hbm.util.I18nUtil;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
@ -74,6 +75,10 @@ public class MachineSolarBoiler extends BlockDummyable implements ILookOverlay {
|
|||||||
for(int i = 0; i < tanks.length; i++)
|
for(int i = 0; i < tanks.length; i++)
|
||||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + tanks[i].getTankType().getLocalizedName() + ": " + tanks[i].getFill() + "/" + tanks[i].getMaxFill() + "mB");
|
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + tanks[i].getTankType().getLocalizedName() + ": " + tanks[i].getFill() + "/" + tanks[i].getMaxFill() + "mB");
|
||||||
|
|
||||||
|
if(boiler.heat < 50) {
|
||||||
|
text.add("&[" + (BobMathUtil.getBlink() ? 0xff0000 : 0xffff00) + "&]Too cold!");
|
||||||
|
}
|
||||||
|
|
||||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.hbm.inventory.gui;
|
package com.hbm.inventory.gui;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
@ -26,6 +27,7 @@ public class GUIScreenClayTablet extends GuiScreen {
|
|||||||
protected int ySize = 84;
|
protected int ySize = 84;
|
||||||
protected int guiLeft;
|
protected int guiLeft;
|
||||||
protected int guiTop;
|
protected int guiTop;
|
||||||
|
protected int tabletMeta = 0;
|
||||||
|
|
||||||
protected static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/guide_pedestal.png");
|
protected static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/guide_pedestal.png");
|
||||||
|
|
||||||
@ -49,29 +51,36 @@ public class GUIScreenClayTablet extends GuiScreen {
|
|||||||
|
|
||||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j) {
|
protected void drawGuiContainerBackgroundLayer(float f, int i, int j) {
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
|
||||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
|
||||||
|
|
||||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||||
|
if(player.getHeldItem() != null) tabletMeta = player.getHeldItem().getItemDamage();
|
||||||
if(player.getHeldItem() != null && player.getHeldItem().hasTagCompound() && player.getHeldItem().stackTagCompound.hasKey("tabletSeed") && !PedestalRecipes.recipes.isEmpty()) {
|
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||||
Random rand = new Random(player.getHeldItem().stackTagCompound.getLong("tabletSeed"));
|
|
||||||
PedestalRecipe recipe = PedestalRecipes.recipes.get(rand.nextInt(PedestalRecipes.recipes.size()));
|
|
||||||
|
|
||||||
if(recipe.extra == recipe.extra.FULL_MOON) drawTexturedModalRect(guiLeft + 120, guiTop + 62, 142, 32, 16, 16);
|
int tabletOffset = tabletMeta == 1 ? 84 : 0;
|
||||||
if(recipe.extra == recipe.extra.NEW_MOON) drawTexturedModalRect(guiLeft + 120, guiTop + 62, 142, 48, 16, 16);
|
int iconOffset = tabletMeta == 1 ? 16 : 0;
|
||||||
if(recipe.extra == recipe.extra.SUN) drawTexturedModalRect(guiLeft + 120, guiTop + 62, 142, 64, 16, 16);
|
float revealChance = tabletMeta == 1 ? 0.25F : 0.5F;
|
||||||
|
drawTexturedModalRect(guiLeft, guiTop, 0, tabletOffset, xSize, ySize);
|
||||||
|
|
||||||
|
ArrayList<PedestalRecipe> recipeSet = PedestalRecipes.recipeSets[Math.abs(tabletMeta) % PedestalRecipes.recipeSets.length];
|
||||||
|
|
||||||
|
if(player.getHeldItem() != null && player.getHeldItem().hasTagCompound() && player.getHeldItem().stackTagCompound.hasKey("tabletSeed") && !recipeSet.isEmpty()) {
|
||||||
|
Random rand = new Random(player.getHeldItem().stackTagCompound.getLong("tabletSeed"));
|
||||||
|
PedestalRecipe recipe = recipeSet.get(rand.nextInt(recipeSet.size()));
|
||||||
|
|
||||||
|
if(recipe.extra == recipe.extra.FULL_MOON) drawTexturedModalRect(guiLeft + 120, guiTop + 62, 142 + iconOffset, 32, 16, 16);
|
||||||
|
if(recipe.extra == recipe.extra.NEW_MOON) drawTexturedModalRect(guiLeft + 120, guiTop + 62, 142 + iconOffset, 48, 16, 16);
|
||||||
|
if(recipe.extra == recipe.extra.SUN) drawTexturedModalRect(guiLeft + 120, guiTop + 62, 142 + iconOffset, 64, 16, 16);
|
||||||
|
|
||||||
for(int l = 0; l < 3; l++) {
|
for(int l = 0; l < 3; l++) {
|
||||||
for(int r = 0; r < 3; r++) {
|
for(int r = 0; r < 3; r++) {
|
||||||
if(rand.nextBoolean()) {
|
if(rand.nextFloat() > revealChance) {
|
||||||
drawTexturedModalRect(guiLeft + 7 + r * 27, guiTop + 7 + l * 27, 142, 16, 16, 16);
|
drawTexturedModalRect(guiLeft + 7 + r * 27, guiTop + 7 + l * 27, 142 + iconOffset, 16, 16, 16);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
AStack ingredient = recipe.input[r + l * 3];
|
AStack ingredient = recipe.input[r + l * 3];
|
||||||
|
|
||||||
if(ingredient == null) {
|
if(ingredient == null) {
|
||||||
drawTexturedModalRect(guiLeft + 7 + r * 27, guiTop + 7 + l * 27, 142, 0, 16, 16);
|
drawTexturedModalRect(guiLeft + 7 + r * 27, guiTop + 7 + l * 27, 142 + iconOffset, 0, 16, 16);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,7 +133,7 @@ public class GUIScreenClayTablet extends GuiScreen {
|
|||||||
|
|
||||||
for(int l = 0; l < 3; l++) {
|
for(int l = 0; l < 3; l++) {
|
||||||
for(int r = 0; r < 3; r++) {
|
for(int r = 0; r < 3; r++) {
|
||||||
drawTexturedModalRect(guiLeft + 7 + r * 27, guiTop + 7 + l * 27, 142, 16, 16, 16);
|
drawTexturedModalRect(guiLeft + 7 + r * 27, guiTop + 7 + l * 27, 142 + iconOffset, 16, 16, 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -142,7 +142,7 @@ public class AssemblerRecipes extends SerializableRecipe {
|
|||||||
makeRecipe(new ComparableStack(ModBlocks.machine_bat9000, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 2), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16), },150);
|
makeRecipe(new ComparableStack(ModBlocks.machine_bat9000, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 2), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16), },150);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.machine_orbus, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(BIGMT.plate(), 12), new ComparableStack(ModItems.coil_advanced_alloy, 12), new ComparableStack(ModItems.battery_sc_polonium, 1) }, 200);
|
makeRecipe(new ComparableStack(ModBlocks.machine_orbus, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(BIGMT.plate(), 12), new ComparableStack(ModItems.coil_advanced_alloy, 12), new ComparableStack(ModItems.battery_sc_polonium, 1) }, 200);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.machine_mining_laser, 1), new AStack[] {new ComparableStack(ModItems.tank_steel, 3), !exp ? new OreDictStack(STEEL.plate528(), 16) : new OreDictStack(STEEL.heavyComp(), 3), new ComparableStack(ModItems.crystal_redstone, 3), new ComparableStack(Items.diamond, 3), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.motor, 3), !exp ? new OreDictStack(DURA.ingot(), 4) : new OreDictStack(DESH.heavyComp(), 1), new OreDictStack(DURA.bolt(), 8), new ComparableStack(ModBlocks.machine_battery, 3), },400);
|
makeRecipe(new ComparableStack(ModBlocks.machine_mining_laser, 1), new AStack[] {new ComparableStack(ModItems.tank_steel, 3), !exp ? new OreDictStack(STEEL.plate528(), 16) : new OreDictStack(STEEL.heavyComp(), 3), new ComparableStack(ModItems.crystal_redstone, 3), new ComparableStack(Items.diamond, 3), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.motor, 3), !exp ? new OreDictStack(DURA.ingot(), 4) : new OreDictStack(DESH.heavyComp(), 1), new OreDictStack(DURA.bolt(), 8), new ComparableStack(ModBlocks.machine_battery, 3), },400);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.machine_turbofan, 1), new AStack[] {!exp ? new OreDictStack(STEEL.shell(), 3) : new OreDictStack(STEEL.heavyComp(), 1), new OreDictStack(TI.shell(), 3), new ComparableStack(ModItems.turbine_tungsten, 1), new ComparableStack(ModItems.turbine_titanium, 7), new OreDictStack(DURA.pipe(), 4), new OreDictStack(MINGRADE.ingot(), 12), new OreDictStack(MINGRADE.wireFine(), 24), },500);
|
makeRecipe(new ComparableStack(ModBlocks.machine_turbofan, 1), new AStack[] {!exp ? new OreDictStack(TI.shell(), 6) : new OreDictStack(TI.heavyComp(), 1), new OreDictStack(DURA.pipe(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 8), new ComparableStack(ModItems.turbine_tungsten, 1), new ComparableStack(ModItems.turbine_titanium, 3) }, 300);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.machine_turbinegas, 1), new AStack[] {!exp ? new OreDictStack(STEEL.shell(), 10) : new OreDictStack(STEEL.heavyComp(), 2), new OreDictStack(GOLD.wireDense(), 12), new OreDictStack(DURA.pipe(), 4), new ComparableStack(ModBlocks.steel_scaffold, 8), new OreDictStack(STEEL.pipe(), 4), new ComparableStack(ModItems.turbine_tungsten, 3), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.ingot_rubber, 4), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.BASIC.ordinal())}, 600);
|
makeRecipe(new ComparableStack(ModBlocks.machine_turbinegas, 1), new AStack[] {!exp ? new OreDictStack(STEEL.shell(), 10) : new OreDictStack(STEEL.heavyComp(), 2), new OreDictStack(GOLD.wireDense(), 12), new OreDictStack(DURA.pipe(), 4), new ComparableStack(ModBlocks.steel_scaffold, 8), new OreDictStack(STEEL.pipe(), 4), new ComparableStack(ModItems.turbine_tungsten, 3), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.ingot_rubber, 4), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.BASIC.ordinal())}, 600);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.machine_teleporter, 1), new AStack[] {new OreDictStack(TI.ingot(), 8), new OreDictStack(ALLOY.plate528(), 12), new OreDictStack(GOLD.wireFine(), 32), new ComparableStack(ModItems.entanglement_kit, 1), new ComparableStack(ModBlocks.machine_battery, 1) },300);
|
makeRecipe(new ComparableStack(ModBlocks.machine_teleporter, 1), new AStack[] {new OreDictStack(TI.ingot(), 8), new OreDictStack(ALLOY.plate528(), 12), new OreDictStack(GOLD.wireFine(), 32), new ComparableStack(ModItems.entanglement_kit, 1), new ComparableStack(ModBlocks.machine_battery, 1) },300);
|
||||||
makeRecipe(new ComparableStack(ModBlocks.machine_schrabidium_transmutator, 1), new AStack[] {new OreDictStack(MAGTUNG.ingot(), 1), !exp ? new OreDictStack(TI.ingot(), 24) : new OreDictStack(TI.heavyComp(), 2), !exp ? new OreDictStack(ALLOY.plate(), 18) : new OreDictStack(ALLOY.heavyComp(), 1), new OreDictStack(STEEL.plateWelded(), 12), new ComparableStack(ModItems.plate_desh, 6), new OreDictStack(RUBBER.ingot(), 8), new ComparableStack(ModBlocks.machine_battery, 5), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.ADVANCED.ordinal()), },500);
|
makeRecipe(new ComparableStack(ModBlocks.machine_schrabidium_transmutator, 1), new AStack[] {new OreDictStack(MAGTUNG.ingot(), 1), !exp ? new OreDictStack(TI.ingot(), 24) : new OreDictStack(TI.heavyComp(), 2), !exp ? new OreDictStack(ALLOY.plate(), 18) : new OreDictStack(ALLOY.heavyComp(), 1), new OreDictStack(STEEL.plateWelded(), 12), new ComparableStack(ModItems.plate_desh, 6), new OreDictStack(RUBBER.ingot(), 8), new ComparableStack(ModBlocks.machine_battery, 5), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.ADVANCED.ordinal()), },500);
|
||||||
|
|||||||
@ -28,76 +28,86 @@ import net.minecraft.item.ItemStack;
|
|||||||
public class PedestalRecipes extends SerializableRecipe {
|
public class PedestalRecipes extends SerializableRecipe {
|
||||||
|
|
||||||
public static List<PedestalRecipe> recipes = new ArrayList();
|
public static List<PedestalRecipe> recipes = new ArrayList();
|
||||||
|
public static ArrayList<PedestalRecipe>[] recipeSets = new ArrayList[2];
|
||||||
|
|
||||||
|
static { for(int i = 0; i < recipeSets.length; i++) recipeSets[i] = new ArrayList(); }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerDefaults() {
|
public void registerDefaults() {
|
||||||
|
|
||||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_light_revolver_dani),
|
register(new PedestalRecipe(new ItemStack(ModItems.gun_light_revolver_dani),
|
||||||
null, new OreDictStack(PB.plate()), null,
|
null, new OreDictStack(PB.plate()), null,
|
||||||
new OreDictStack(GOLD.plate()), new ComparableStack(ModItems.gun_light_revolver), new OreDictStack(GOLD.plate()),
|
new OreDictStack(GOLD.plate()), new ComparableStack(ModItems.gun_light_revolver), new OreDictStack(GOLD.plate()),
|
||||||
null, new OreDictStack(PB.plate()), null));
|
null, new OreDictStack(PB.plate()), null));
|
||||||
|
|
||||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_maresleg_broken),
|
register(new PedestalRecipe(new ItemStack(ModItems.gun_maresleg_broken),
|
||||||
new ComparableStack(ModBlocks.barbed_wire), new OreDictStack(WEAPONSTEEL.plate()), new ComparableStack(ModBlocks.barbed_wire),
|
new ComparableStack(ModBlocks.barbed_wire), new OreDictStack(WEAPONSTEEL.plate()), new ComparableStack(ModBlocks.barbed_wire),
|
||||||
new OreDictStack(WEAPONSTEEL.plate()), new ComparableStack(ModItems.gun_maresleg), new OreDictStack(WEAPONSTEEL.plate()),
|
new OreDictStack(WEAPONSTEEL.plate()), new ComparableStack(ModItems.gun_maresleg), new OreDictStack(WEAPONSTEEL.plate()),
|
||||||
new ComparableStack(ModBlocks.barbed_wire), new OreDictStack(WEAPONSTEEL.plate()), new ComparableStack(ModBlocks.barbed_wire)));
|
new ComparableStack(ModBlocks.barbed_wire), new OreDictStack(WEAPONSTEEL.plate()), new ComparableStack(ModBlocks.barbed_wire)));
|
||||||
|
|
||||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_heavy_revolver_lilmac),
|
register(new PedestalRecipe(new ItemStack(ModItems.gun_heavy_revolver_lilmac),
|
||||||
null, new ComparableStack(ModItems.weapon_mod_special, 1, EnumModSpecial.SCOPE), null,
|
null, new ComparableStack(ModItems.weapon_mod_special, 1, EnumModSpecial.SCOPE), null,
|
||||||
new ComparableStack(ModItems.powder_magic), new ComparableStack(ModItems.gun_heavy_revolver), new OreDictStack(WEAPONSTEEL.plate()),
|
new ComparableStack(ModItems.powder_magic), new ComparableStack(ModItems.gun_heavy_revolver), new OreDictStack(WEAPONSTEEL.plate()),
|
||||||
null, new OreDictStack(BONE.grip()), new ComparableStack(Items.apple, 3)));
|
null, new OreDictStack(BONE.grip()), new ComparableStack(Items.apple, 3)));
|
||||||
|
|
||||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_heavy_revolver_protege),
|
register(new PedestalRecipe(new ItemStack(ModItems.gun_heavy_revolver_protege),
|
||||||
new ComparableStack(ModBlocks.chain, 16), new OreDictStack(CINNABAR.gem()), new ComparableStack(ModBlocks.chain, 16),
|
new ComparableStack(ModBlocks.chain, 16), new OreDictStack(CINNABAR.gem()), new ComparableStack(ModBlocks.chain, 16),
|
||||||
new ComparableStack(ModItems.scrap_nuclear), new ComparableStack(ModItems.gun_heavy_revolver), new ComparableStack(ModItems.scrap_nuclear),
|
new ComparableStack(ModItems.scrap_nuclear), new ComparableStack(ModItems.gun_heavy_revolver), new ComparableStack(ModItems.scrap_nuclear),
|
||||||
new ComparableStack(ModBlocks.chain, 16), new OreDictStack(CINNABAR.gem()), new ComparableStack(ModBlocks.chain, 16)));
|
new ComparableStack(ModBlocks.chain, 16), new OreDictStack(CINNABAR.gem()), new ComparableStack(ModBlocks.chain, 16)));
|
||||||
|
|
||||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_flamer_daybreaker),
|
register(new PedestalRecipe(new ItemStack(ModItems.gun_flamer_daybreaker),
|
||||||
new OreDictStack(GOLD.plateCast()), new ComparableStack(ModItems.canned_conserve, 1, EnumFoodType.JIZZ), new OreDictStack(GOLD.plateCast()),
|
new OreDictStack(GOLD.plateCast()), new ComparableStack(ModItems.canned_conserve, 1, EnumFoodType.JIZZ), new OreDictStack(GOLD.plateCast()),
|
||||||
new OreDictStack(P_WHITE.ingot()), new ComparableStack(ModItems.gun_flamer), new OreDictStack(P_WHITE.ingot()),
|
new OreDictStack(P_WHITE.ingot()), new ComparableStack(ModItems.gun_flamer), new OreDictStack(P_WHITE.ingot()),
|
||||||
new OreDictStack(GOLD.plateCast()), new ComparableStack(ModItems.stick_dynamite), new OreDictStack(GOLD.plateCast()))
|
new OreDictStack(GOLD.plateCast()), new ComparableStack(ModItems.stick_dynamite), new OreDictStack(GOLD.plateCast()))
|
||||||
.extra(PedestalExtraCondition.SUN));
|
.extra(PedestalExtraCondition.SUN));
|
||||||
|
|
||||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_autoshotgun_sexy),
|
register(new PedestalRecipe(new ItemStack(ModItems.gun_autoshotgun_sexy),
|
||||||
new ComparableStack(ModItems.bolt_spike, 16), new OreDictStack(STAR.ingot(), 4), new ComparableStack(ModItems.bolt_spike, 16),
|
new ComparableStack(ModItems.bolt_spike, 16), new OreDictStack(STAR.ingot(), 4), new ComparableStack(ModItems.bolt_spike, 16),
|
||||||
new ComparableStack(ModItems.card_qos), new ComparableStack(ModItems.gun_autoshotgun), new ComparableStack(ModItems.card_aos),
|
new ComparableStack(ModItems.card_qos), new ComparableStack(ModItems.gun_autoshotgun), new ComparableStack(ModItems.card_aos),
|
||||||
new ComparableStack(ModItems.bolt_spike, 16), new OreDictStack(STAR.ingot(), 4), new ComparableStack(ModItems.bolt_spike, 16)));
|
new ComparableStack(ModItems.bolt_spike, 16), new OreDictStack(STAR.ingot(), 4), new ComparableStack(ModItems.bolt_spike, 16)));
|
||||||
|
|
||||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_minigun_lacunae),
|
register(new PedestalRecipe(new ItemStack(ModItems.gun_minigun_lacunae),
|
||||||
null, new ComparableStack(ModItems.powder_magic, 4), null,
|
null, new ComparableStack(ModItems.powder_magic, 4), null,
|
||||||
new ComparableStack(ModItems.item_secret, 4, EnumSecretType.SELENIUM_STEEL), new ComparableStack(ModItems.gun_minigun), new ComparableStack(ModItems.item_secret, 4, EnumSecretType.SELENIUM_STEEL),
|
new ComparableStack(ModItems.item_secret, 4, EnumSecretType.SELENIUM_STEEL), new ComparableStack(ModItems.gun_minigun), new ComparableStack(ModItems.item_secret, 4, EnumSecretType.SELENIUM_STEEL),
|
||||||
null, new ComparableStack(ModItems.powder_magic, 4), null)
|
null, new ComparableStack(ModItems.powder_magic, 4), null)
|
||||||
.extra(PedestalExtraCondition.FULL_MOON));
|
.extra(PedestalExtraCondition.FULL_MOON));
|
||||||
|
|
||||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_folly),
|
register(new PedestalRecipe(new ItemStack(ModItems.gun_folly),
|
||||||
new ComparableStack(ModItems.item_secret, 4, EnumSecretType.SELENIUM_STEEL), new ComparableStack(ModItems.item_secret, 2, EnumSecretType.CONTROLLER), new ComparableStack(ModItems.item_secret, 4, EnumSecretType.SELENIUM_STEEL),
|
new ComparableStack(ModItems.item_secret, 4, EnumSecretType.FOLLY), new ComparableStack(ModItems.item_secret, 2, EnumSecretType.CONTROLLER), new ComparableStack(ModItems.item_secret, 4, EnumSecretType.FOLLY),
|
||||||
new OreDictStack(BSCCO.ingot(), 16), new OreDictStack(STAR.block(), 64), new OreDictStack(BSCCO.ingot(), 16),
|
new OreDictStack(BSCCO.ingot(), 16), new OreDictStack(STAR.block(), 64), new OreDictStack(BSCCO.ingot(), 16),
|
||||||
new ComparableStack(ModItems.item_secret, 4, EnumSecretType.SELENIUM_STEEL), new ComparableStack(ModItems.item_secret, 2, EnumSecretType.CONTROLLER), new ComparableStack(ModItems.item_secret, 4, EnumSecretType.SELENIUM_STEEL))
|
new ComparableStack(ModItems.item_secret, 4, EnumSecretType.FOLLY), new ComparableStack(ModItems.item_secret, 2, EnumSecretType.CONTROLLER), new ComparableStack(ModItems.item_secret, 4, EnumSecretType.FOLLY))
|
||||||
.extra(PedestalExtraCondition.FULL_MOON));
|
.extra(PedestalExtraCondition.FULL_MOON).set(1));
|
||||||
|
|
||||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_aberrator),
|
register(new PedestalRecipe(new ItemStack(ModItems.gun_aberrator),
|
||||||
null, new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), null,
|
null, new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), null,
|
||||||
new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new OreDictStack(BIGMT.mechanism(), 4), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR),
|
new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new OreDictStack(BIGMT.mechanism(), 4), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR),
|
||||||
null, new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), null));
|
null, new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), null).set(1));
|
||||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.gun_aberrator_eott),
|
register(new PedestalRecipe(new ItemStack(ModItems.gun_aberrator_eott),
|
||||||
new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR),
|
new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR),
|
||||||
new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new OreDictStack(BIGMT.mechanism(), 16), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR),
|
new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new OreDictStack(BIGMT.mechanism(), 16), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR),
|
||||||
new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR)));
|
new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR))
|
||||||
|
.extra(PedestalExtraCondition.GOOD_KARMA).set(1));
|
||||||
|
|
||||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.ammo_secret, 1, EnumAmmoSecret.FOLLY_SM.ordinal()),
|
register(new PedestalRecipe(new ItemStack(ModItems.ammo_secret, 1, EnumAmmoSecret.FOLLY_SM.ordinal()),
|
||||||
new OreDictStack(STAR.ingot(), 1), new ComparableStack(ModItems.powder_magic), new OreDictStack(STAR.ingot(), 1),
|
new OreDictStack(STAR.ingot(), 1), new ComparableStack(ModItems.powder_magic), new OreDictStack(STAR.ingot(), 1),
|
||||||
new ComparableStack(ModItems.powder_magic), new ComparableStack(ModBlocks.moon_turf), new ComparableStack(ModItems.powder_magic),
|
new ComparableStack(ModItems.powder_magic), new ComparableStack(ModBlocks.moon_turf), new ComparableStack(ModItems.powder_magic),
|
||||||
new OreDictStack(STAR.ingot(), 1), new ComparableStack(ModItems.powder_magic), new OreDictStack(STAR.ingot(), 1))
|
new OreDictStack(STAR.ingot(), 1), new ComparableStack(ModItems.powder_magic), new OreDictStack(STAR.ingot(), 1))
|
||||||
.extra(PedestalExtraCondition.FULL_MOON));
|
.extra(PedestalExtraCondition.FULL_MOON).set(1));
|
||||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.ammo_secret, 1, EnumAmmoSecret.FOLLY_NUKE.ordinal()),
|
register(new PedestalRecipe(new ItemStack(ModItems.ammo_secret, 1, EnumAmmoSecret.FOLLY_NUKE.ordinal()),
|
||||||
new OreDictStack(STAR.ingot(), 1), new ComparableStack(ModItems.powder_magic), new OreDictStack(STAR.ingot(), 1),
|
new OreDictStack(STAR.ingot(), 1), new ComparableStack(ModItems.powder_magic), new OreDictStack(STAR.ingot(), 1),
|
||||||
new ComparableStack(ModItems.powder_magic), new ComparableStack(ModItems.ammo_standard, 4, EnumAmmo.NUKE_HIGH), new ComparableStack(ModItems.powder_magic),
|
new ComparableStack(ModItems.powder_magic), new ComparableStack(ModItems.ammo_standard, 4, EnumAmmo.NUKE_HIGH), new ComparableStack(ModItems.powder_magic),
|
||||||
new OreDictStack(STAR.ingot(), 1), new ComparableStack(ModItems.powder_magic), new OreDictStack(STAR.ingot(), 1))
|
new OreDictStack(STAR.ingot(), 1), new ComparableStack(ModItems.powder_magic), new OreDictStack(STAR.ingot(), 1))
|
||||||
.extra(PedestalExtraCondition.FULL_MOON));
|
.extra(PedestalExtraCondition.FULL_MOON).set(1));
|
||||||
recipes.add(new PedestalRecipe(new ItemStack(ModItems.ammo_secret, 5, EnumAmmoSecret.P35_800.ordinal()),
|
register(new PedestalRecipe(new ItemStack(ModItems.ammo_secret, 5, EnumAmmoSecret.P35_800.ordinal()),
|
||||||
null, null, null,
|
null, null, null,
|
||||||
null, new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), null,
|
null, new ComparableStack(ModItems.item_secret, 1, EnumSecretType.ABERRATOR), null,
|
||||||
null, null, null));
|
null, null, null).set(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void register(PedestalRecipe recipe) {
|
||||||
|
recipes.add(recipe);
|
||||||
|
int set = Math.abs(recipe.recipeSet) % recipeSets.length;
|
||||||
|
recipeSets[set].add(recipe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -113,6 +123,7 @@ public class PedestalRecipes extends SerializableRecipe {
|
|||||||
@Override
|
@Override
|
||||||
public void deleteRecipes() {
|
public void deleteRecipes() {
|
||||||
recipes.clear();
|
recipes.clear();
|
||||||
|
for(int i = 0; i < recipeSets.length; i++) recipeSets[i].clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -136,6 +147,10 @@ public class PedestalRecipes extends SerializableRecipe {
|
|||||||
if(obj.has("extra")) {
|
if(obj.has("extra")) {
|
||||||
rec.extra = PedestalExtraCondition.valueOf(obj.get("extra").getAsString());
|
rec.extra = PedestalExtraCondition.valueOf(obj.get("extra").getAsString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(obj.has("set")) {
|
||||||
|
rec.recipeSet = obj.get("set").getAsInt();
|
||||||
|
}
|
||||||
|
|
||||||
this.recipes.add(rec);
|
this.recipes.add(rec);
|
||||||
}
|
}
|
||||||
@ -158,6 +173,7 @@ public class PedestalRecipes extends SerializableRecipe {
|
|||||||
writer.endArray();
|
writer.endArray();
|
||||||
|
|
||||||
writer.name("extra").value(rec.extra.name());
|
writer.name("extra").value(rec.extra.name());
|
||||||
|
if(rec.recipeSet != 0) writer.name("set").value(rec.recipeSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static enum PedestalExtraCondition {
|
public static enum PedestalExtraCondition {
|
||||||
@ -167,6 +183,7 @@ public class PedestalRecipes extends SerializableRecipe {
|
|||||||
public static class PedestalRecipe {
|
public static class PedestalRecipe {
|
||||||
public ItemStack output;
|
public ItemStack output;
|
||||||
public AStack[] input;
|
public AStack[] input;
|
||||||
|
public int recipeSet = 0;
|
||||||
public PedestalExtraCondition extra = PedestalExtraCondition.NONE;
|
public PedestalExtraCondition extra = PedestalExtraCondition.NONE;
|
||||||
|
|
||||||
public PedestalRecipe(ItemStack output, AStack... input) {
|
public PedestalRecipe(ItemStack output, AStack... input) {
|
||||||
@ -178,5 +195,10 @@ public class PedestalRecipes extends SerializableRecipe {
|
|||||||
this.extra = extra;
|
this.extra = extra;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PedestalRecipe set(int set) {
|
||||||
|
this.recipeSet = set;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6571,7 +6571,6 @@ public class ModItems {
|
|||||||
GameRegistry.registerItem(schrabidium_hammer, schrabidium_hammer.getUnlocalizedName());
|
GameRegistry.registerItem(schrabidium_hammer, schrabidium_hammer.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(shimmer_sledge, shimmer_sledge.getUnlocalizedName());
|
GameRegistry.registerItem(shimmer_sledge, shimmer_sledge.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(shimmer_axe, shimmer_axe.getUnlocalizedName());
|
GameRegistry.registerItem(shimmer_axe, shimmer_axe.getUnlocalizedName());
|
||||||
//GameRegistry.registerItem(pch, pch.getUnlocalizedName()); //sike, nevermind
|
|
||||||
GameRegistry.registerItem(wood_gavel, wood_gavel.getUnlocalizedName());
|
GameRegistry.registerItem(wood_gavel, wood_gavel.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(lead_gavel, lead_gavel.getUnlocalizedName());
|
GameRegistry.registerItem(lead_gavel, lead_gavel.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(diamond_gavel, diamond_gavel.getUnlocalizedName());
|
GameRegistry.registerItem(diamond_gavel, diamond_gavel.getUnlocalizedName());
|
||||||
|
|||||||
@ -74,7 +74,7 @@ public class TileEntityLanternBehemoth extends TileEntityLoadedBase implements I
|
|||||||
List<EntityPlayer> players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(xCoord - 50, yCoord - 50, zCoord - 50, xCoord + 51, yCoord + 51, zCoord + 51));
|
List<EntityPlayer> players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(xCoord - 50, yCoord - 50, zCoord - 50, xCoord + 51, yCoord + 51, zCoord + 51));
|
||||||
for(EntityPlayer player : players) {
|
for(EntityPlayer player : players) {
|
||||||
HbmPlayerProps props = HbmPlayerProps.getData(player);
|
HbmPlayerProps props = HbmPlayerProps.getData(player);
|
||||||
if(props.reputation > -10) props.reputation--;
|
if(props.reputation > -25) props.reputation--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,7 @@ public class TileEntitySolarBoiler extends TileEntityLoadedBase implements IFlui
|
|||||||
|
|
||||||
private FluidTank water;
|
private FluidTank water;
|
||||||
private FluidTank steam;
|
private FluidTank steam;
|
||||||
|
public int displayHeat;
|
||||||
public int heat;
|
public int heat;
|
||||||
|
|
||||||
public HashSet<ChunkCoordinates> primary = new HashSet();
|
public HashSet<ChunkCoordinates> primary = new HashSet();
|
||||||
@ -42,9 +43,10 @@ public class TileEntitySolarBoiler extends TileEntityLoadedBase implements IFlui
|
|||||||
int process = heat / 50;
|
int process = heat / 50;
|
||||||
process = Math.min(process, water.getFill());
|
process = Math.min(process, water.getFill());
|
||||||
process = Math.min(process, (steam.getMaxFill() - steam.getFill()) / 100);
|
process = Math.min(process, (steam.getMaxFill() - steam.getFill()) / 100);
|
||||||
|
|
||||||
|
this.displayHeat = this.heat;
|
||||||
|
|
||||||
if(process < 0)
|
if(process < 0) process = 0;
|
||||||
process = 0;
|
|
||||||
|
|
||||||
water.setFill(water.getFill() - process);
|
water.setFill(water.getFill() - process);
|
||||||
steam.setFill(steam.getFill() + process * 100);
|
steam.setFill(steam.getFill() + process * 100);
|
||||||
@ -122,18 +124,17 @@ public class TileEntitySolarBoiler extends TileEntityLoadedBase implements IFlui
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(ByteBuf buf) {
|
public void serialize(ByteBuf buf) {
|
||||||
|
buf.writeInt(displayHeat);
|
||||||
water.serialize(buf);
|
water.serialize(buf);
|
||||||
steam.serialize(buf);
|
steam.serialize(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deserialize(ByteBuf buf) {
|
public void deserialize(ByteBuf buf) {
|
||||||
|
this.displayHeat = buf.readInt();
|
||||||
water.deserialize(buf);
|
water.deserialize(buf);
|
||||||
steam.deserialize(buf);
|
steam.deserialize(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override public FluidTank getTankToPaste() { return null; }
|
||||||
public FluidTank getTankToPaste() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import java.util.List;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.tileentity.machine.TileEntityMachineAutocrafter;
|
||||||
import com.hbm.tileentity.network.TileEntityPneumoTube;
|
import com.hbm.tileentity.network.TileEntityPneumoTube;
|
||||||
import com.hbm.uninos.NodeNet;
|
import com.hbm.uninos.NodeNet;
|
||||||
import com.hbm.util.BobMathUtil;
|
import com.hbm.util.BobMathUtil;
|
||||||
@ -100,6 +101,7 @@ public class PneumaticNetwork extends NodeNet {
|
|||||||
int destSide = chosenReceiverEntry.getValue().getKey().getOpposite().ordinal();
|
int destSide = chosenReceiverEntry.getValue().getKey().getOpposite().ordinal();
|
||||||
int[] destSlotAccess = getSlotAccess(dest, destSide);
|
int[] destSlotAccess = getSlotAccess(dest, destSide);
|
||||||
int itemsLeftToSend = ITEMS_PER_TRANSFER; // not actually individual items, but rather the total "mass", based on max stack size
|
int itemsLeftToSend = ITEMS_PER_TRANSFER; // not actually individual items, but rather the total "mass", based on max stack size
|
||||||
|
int itemHardCap = dest instanceof TileEntityMachineAutocrafter ? 1 : ITEMS_PER_TRANSFER;
|
||||||
boolean didSomething = false;
|
boolean didSomething = false;
|
||||||
|
|
||||||
for(int sourceIndex : sourceSlotAccess) {
|
for(int sourceIndex : sourceSlotAccess) {
|
||||||
@ -115,12 +117,15 @@ public class PneumaticNetwork extends NodeNet {
|
|||||||
for(int destIndex : destSlotAccess) {
|
for(int destIndex : destSlotAccess) {
|
||||||
ItemStack destStack = dest.getStackInSlot(destIndex);
|
ItemStack destStack = dest.getStackInSlot(destIndex);
|
||||||
if(destStack == null) continue;
|
if(destStack == null) continue;
|
||||||
if(!dest.isItemValidForSlot(destIndex, sourceStack)) continue;
|
|
||||||
if(sidedDest != null && !sidedDest.canInsertItem(destIndex, sourceStack, destSide)) continue;
|
|
||||||
if(!ItemStackUtil.areStacksCompatible(sourceStack, destStack)) continue;
|
if(!ItemStackUtil.areStacksCompatible(sourceStack, destStack)) continue;
|
||||||
int toMove = BobMathUtil.min(sourceStack.stackSize, destStack.getMaxStackSize() - destStack.stackSize, dest.getInventoryStackLimit() - destStack.stackSize, itemsLeftToSend / proportionalValue);
|
int toMove = BobMathUtil.min(sourceStack.stackSize, destStack.getMaxStackSize() - destStack.stackSize, dest.getInventoryStackLimit() - destStack.stackSize, itemsLeftToSend / proportionalValue, itemHardCap);
|
||||||
if(toMove <= 0) continue;
|
if(toMove <= 0) continue;
|
||||||
|
|
||||||
|
ItemStack checkStack = destStack.copy();
|
||||||
|
checkStack.stackSize += toMove;
|
||||||
|
if(!dest.isItemValidForSlot(destIndex, checkStack)) continue;
|
||||||
|
if(sidedDest != null && !sidedDest.canInsertItem(destIndex, checkStack, destSide)) continue;
|
||||||
|
|
||||||
sourceStack.stackSize -= toMove;
|
sourceStack.stackSize -= toMove;
|
||||||
if(sourceStack.stackSize <= 0) source.setInventorySlotContents(sourceIndex, null);
|
if(sourceStack.stackSize <= 0) source.setInventorySlotContents(sourceIndex, null);
|
||||||
destStack.stackSize += toMove;
|
destStack.stackSize += toMove;
|
||||||
@ -132,10 +137,13 @@ public class PneumaticNetwork extends NodeNet {
|
|||||||
// if there's stuff left to send, occupy empty slots
|
// if there's stuff left to send, occupy empty slots
|
||||||
if(itemsLeftToSend > 0 && sourceStack.stackSize > 0) for(int destIndex : destSlotAccess) {
|
if(itemsLeftToSend > 0 && sourceStack.stackSize > 0) for(int destIndex : destSlotAccess) {
|
||||||
if(dest.getStackInSlot(destIndex) != null) continue;
|
if(dest.getStackInSlot(destIndex) != null) continue;
|
||||||
if(!dest.isItemValidForSlot(destIndex, sourceStack)) continue;
|
int toMove = BobMathUtil.min(sourceStack.stackSize, dest.getInventoryStackLimit(), itemsLeftToSend / proportionalValue, itemHardCap);
|
||||||
if(sidedDest != null && !sidedDest.canInsertItem(destIndex, sourceStack, destSide)) continue;
|
|
||||||
int toMove = BobMathUtil.min(sourceStack.stackSize, dest.getInventoryStackLimit(), itemsLeftToSend / proportionalValue);
|
|
||||||
if(toMove <= 0) continue;
|
if(toMove <= 0) continue;
|
||||||
|
|
||||||
|
ItemStack checkStack = sourceStack.copy();
|
||||||
|
checkStack.stackSize = toMove;
|
||||||
|
if(!dest.isItemValidForSlot(destIndex, checkStack)) continue;
|
||||||
|
if(sidedDest != null && !sidedDest.canInsertItem(destIndex, checkStack, destSide)) continue;
|
||||||
|
|
||||||
ItemStack newStack = sourceStack.copy();
|
ItemStack newStack = sourceStack.copy();
|
||||||
newStack.stackSize = toMove;
|
newStack.stackSize = toMove;
|
||||||
@ -144,7 +152,7 @@ public class PneumaticNetwork extends NodeNet {
|
|||||||
dest.setInventorySlotContents(destIndex, newStack);
|
dest.setInventorySlotContents(destIndex, newStack);
|
||||||
itemsLeftToSend -= toMove * proportionalValue;
|
itemsLeftToSend -= toMove * proportionalValue;
|
||||||
didSomething = true;
|
didSomething = true;
|
||||||
break;
|
if(itemsLeftToSend <= 0) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(itemsLeftToSend <= 0) break;
|
if(itemsLeftToSend <= 0) break;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 5.9 KiB |
Loading…
x
Reference in New Issue
Block a user