🅱️all 🅱️usting

This commit is contained in:
Bob 2025-01-25 20:25:01 +01:00
parent 02d749bdb1
commit fb1e20c11f
27 changed files with 433 additions and 35 deletions

View File

@ -1,16 +1,28 @@
## Added
* Perfluoromethyl
* Can be used as a coolant for PWRs, ICFs, and RBMK fluid heaters
* Can be cooled into cold perflyoromethyl using two compressors to be used as coolant for particle accelerators
* Also required for soldering all control units
* Standard coolant will be removed soon in favor of perfloromethyl, however for now it continues to function just the same
## Changed
* The bedrock ore processor now has an NEI handler
* Boilers and crucibles will only consume as much heat from the source as they can actually accept instead of a fixed rate, preventing them from wasting excess heat
* Rockets can now be made with rocket fuel in addition to cordite (only requires one)
* The rocket recipes using cordite now use 3 pieces of smokeless powder instead of 2
* Iron ore fragments now take 4x longer to process into steal using the rotary furnace, but require only a quarter of the steam per tick
* Iron ore fragments now take 2x longer to process into steal using the rotary furnace, but require only a quarter of the steam per tick
* Little known secret: it is, indeed, possible to increase processing throughput by playing more than one machine. Either people don't know this, or they fear the immense cost of the rotary furnace, that being a few stone bricks, iron ingots and copper plates. Truly a king's ransom.
* Optimized rendering for conveyor belt items, each frame no longer creates a new item stack and item entity instance which need to be removed by the GC right after
* Changed fuel stats for HEAus, it's now a linear fuel with a multiplier of 35 with a heat/flux of 1.5°C
* Digamma RBMK fuel now lasts substantially longer
* RBMK dials now have gamerules for disabling rod depletion and xenon poison
* Changed the way bullet spread is calculated. For most guns, the effective spread will be the same, however this paves the way for better spread control via weapon mods, and also changes a few existing weapons
* All sawed-off shotguns (dual shotguns, Broken, Sacred Dragon) now have more spread with shot (+35%), while slugs remain the same
* Changed the way bullet spread is calculated. Instead of the gun's innate inaccuracy being reduced by 75% when using sights, guns now have separate stats for innate inaccuracy (only relevant for things like SMG) as well as a hipfire penalty (roughly the same for all guns)
* This also includes a multiplier for ammo spread, which mainly concerns sawed-off shotguns (dual lever action shotguns, Broken and Sacred Dragon) and amplifies the inaccuracy for things like buckshot while slugs perform the same
* Malachite now spawns in large deposits similar to hematite or bauxite, malachite veins are slightly smaller than bauxite veins
* Limestone veins are now 50% larger
* The compressor now has a NEI handler for any non-generic recipe
* Removed compression recipes for steam, because why would you ever use those?
* Fluid tanks that use pressurized fluids now say "pressurized, use compressor!" to avoid confusion over what "1PU" means
## Fixed
* Fixed incorrect tooltip in the automatic control rod's GUI

View File

@ -89,5 +89,5 @@ public interface IFluidConnector extends ILoadedTile {
}
}
public static final boolean particleDebug = true;
public static final boolean particleDebug = false;
}

View File

@ -39,5 +39,13 @@ public class BlockPADetector extends BlockDummyable {
@Override
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
super.fillSpace(world, x, y, z, dir, o);
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
this.makeExtra(world, x - rot.offsetX * 4, y, z - rot.offsetZ * 4);
this.makeExtra(world, x - rot.offsetX * 4, y + 1, z - rot.offsetZ * 4);
this.makeExtra(world, x - rot.offsetX * 4, y - 1, z - rot.offsetZ * 4);
this.makeExtra(world, x - rot.offsetX * 4 + dir.offsetX, y, z - rot.offsetZ * 4 + dir.offsetZ);
this.makeExtra(world, x - rot.offsetX * 4 - dir.offsetX, y, z - rot.offsetZ * 4 - dir.offsetZ);
}
}

View File

@ -62,7 +62,6 @@ public class WorldConfig {
public static int copperClusterSpawn = 4;
public static int alexandriteSpawn = 100;
public static int malachiteSpawn = 1;
public static int limestoneSpawn = 1;
public static int netherUraniumuSpawn = 8;
@ -180,7 +179,6 @@ public class WorldConfig {
aluminiumClusterSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.C02_aluminiumClusterSpawn", "Amount of aluminium cluster veins per chunk", 3);
copperClusterSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.C03_copperClusterSpawn", "Amount of copper cluster veins per chunk", 4);
malachiteSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.L01_malachiteSpawn", "Amount of malachite block veins per chunk", 1);
limestoneSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.L02_limestoneSpawn", "Amount of limestone block veins per chunk", 1);
netherUraniumuSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.N00_uraniumSpawnrate", "Amount of nether uranium per chunk", 8);

View File

@ -107,6 +107,7 @@ public class EntityMovingItem extends EntityMovingConveyorObject implements ICon
@Override
public void enterBlock(IEnterableBlock enterable, BlockPos pos, ForgeDirection dir) {
if(this.isDead) return;
if(enterable.canItemEnter(worldObj, pos.getX(), pos.getY(), pos.getZ(), dir, this)) {
enterable.onItemEnter(worldObj, pos.getX(), pos.getY(), pos.getZ(), dir, this);

View File

@ -0,0 +1,16 @@
package com.hbm.handler.nei;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.recipes.CompressorRecipes;
public class CompressorHandler extends NEIUniversalHandler {
public CompressorHandler() {
super(ModBlocks.machine_compressor.getLocalizedName(), ModBlocks.machine_compressor, CompressorRecipes.getRecipes());
}
@Override
public String getKey() {
return "ntmCompressor";
}
}

View File

@ -20,7 +20,7 @@ public class ContainerPADipole extends Container {
//Battery
this.addSlotToContainer(new Slot(tile, 0, 8, 72));
//Coil
this.addSlotToContainer(new Slot(tile, 1, 89, 36));
this.addSlotToContainer(new Slot(tile, 1, 89, 26));
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 9; j++) {

View File

@ -12,6 +12,7 @@ import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.gui.GuiInfoContainer;
import com.hbm.items.ModItems;
import com.hbm.items.machine.IItemFluidIdentifier;
import com.hbm.util.BobMathUtil;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -253,6 +254,7 @@ public class FluidTank {
if(this.pressure != 0) {
list.add(EnumChatFormatting.RED + "Pressure: " + this.pressure + " PU");
list.add((BobMathUtil.getBlink() ? EnumChatFormatting.RED : EnumChatFormatting.DARK_RED) + "Pressurized, use compressor!");
}
type.addInfo(list);

View File

@ -1,15 +1,25 @@
package com.hbm.inventory.gui;
import org.apache.commons.lang3.math.NumberUtils;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.container.ContainerPADipole;
import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toserver.NBTControlPacket;
import com.hbm.tileentity.machine.albion.TileEntityPADipole;
import com.hbm.util.Vec3NT;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
@ -17,6 +27,8 @@ public class GUIPADipole extends GuiInfoContainer {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/particleaccelerator/gui_dipole.png");
private TileEntityPADipole dipole;
protected GuiTextField threshold;
public GUIPADipole(InventoryPlayer player, TileEntityPADipole dipole) {
super(new ContainerPADipole(player, dipole));
@ -25,6 +37,20 @@ public class GUIPADipole extends GuiInfoContainer {
this.xSize = 176;
this.ySize = 204;
}
@Override
public void initGui() {
super.initGui();
Keyboard.enableRepeatEvents(true);
this.threshold = new GuiTextField(this.fontRendererObj, guiLeft + 47, guiTop + 77, 66, 8);
this.threshold.setTextColor(0x00ff00);
this.threshold.setDisabledTextColour(0x00ff00);
this.threshold.setEnableBackgroundDrawing(false);
this.threshold.setMaxStringLength(9);
this.threshold.setText("" + dipole.threshold);
}
@Override
public void drawScreen(int mouseX, int mouseY, float f) {
@ -33,6 +59,37 @@ public class GUIPADipole extends GuiInfoContainer {
dipole.tanks[0].renderTankInfo(this, mouseX, mouseY, guiLeft + 134, guiTop + 36, 16, 52);
dipole.tanks[1].renderTankInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 36, 16, 52);
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 8, guiTop + 18, 16, 52, dipole.power, dipole.getMaxPower());
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 62, guiTop + 29, 12, 12, mouseX, mouseY, EnumChatFormatting.BLUE + "Player orientation", EnumChatFormatting.RED + "Output orientation:", dipole.ditToForgeDir(dipole.dirLower).name());
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 62, guiTop + 43, 12, 12, mouseX, mouseY, EnumChatFormatting.BLUE + "Player orientation", EnumChatFormatting.RED + "Output orientation:", dipole.ditToForgeDir(dipole.dirUpper).name());
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 62, guiTop + 57, 12, 12, mouseX, mouseY, EnumChatFormatting.BLUE + "Player orientation", EnumChatFormatting.RED + "Output orientation:", dipole.ditToForgeDir(dipole.dirRedstone).name());
}
@Override
protected void mouseClicked(int x, int y, int i) {
super.mouseClicked(x, y, i);
this.threshold.mouseClicked(x, y, i);
if(guiLeft + 62 <= x && guiLeft + 62 + 12 > x && guiTop + 29 < y && guiTop + 29 + 12 >= y) {
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
NBTTagCompound data = new NBTTagCompound();
data.setBoolean("lower", true);
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, dipole.xCoord, dipole.yCoord, dipole.zCoord));
}
if(guiLeft + 62 <= x && guiLeft + 62 + 12 > x && guiTop + 43 < y && guiTop + 43 + 12 >= y) {
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
NBTTagCompound data = new NBTTagCompound();
data.setBoolean("upper", true);
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, dipole.xCoord, dipole.yCoord, dipole.zCoord));
}
if(guiLeft + 62 <= x && guiLeft + 62 + 12 > x && guiTop + 57 < y && guiTop + 57 + 12 >= y) {
mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
NBTTagCompound data = new NBTTagCompound();
data.setBoolean("redstone", true);
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, dipole.xCoord, dipole.yCoord, dipole.zCoord));
}
}
@Override
@ -58,10 +115,64 @@ public class GUIPADipole extends GuiInfoContainer {
drawTexturedModalRect(guiLeft + 8, guiTop + 70 - j, 184, 52 - j, 16, j);
int heat = (int) Math.ceil(dipole.temperature);
if(heat <= 123) drawTexturedModalRect(guiLeft + 93, guiTop + 64, 176, 8, 8, 8);
if(dipole.slots[1] != null && dipole.slots[1].getItem() == ModItems.pa_coil) drawTexturedModalRect(guiLeft + 103, guiTop + 64, 176, 8, 8, 8);
if(heat <= 123) drawTexturedModalRect(guiLeft + 93, guiTop + 54, 176, 8, 8, 8);
if(dipole.slots[1] != null && dipole.slots[1].getItem() == ModItems.pa_coil) drawTexturedModalRect(guiLeft + 103, guiTop + 54, 176, 8, 8, 8);
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glLineWidth(3F);
Vec3NT vec = new Vec3NT(0, 0, 0);
vec.rotateAroundZDeg(MainRegistry.proxy.me().rotationYaw);
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawing(1);
addLine(tessellator, 68, 35, 0x8080ff, vec, 180);
addLine(tessellator, 68, 35, 0xff0000, vec, MainRegistry.proxy.me().rotationYaw - dipole.dirLower * 90);
addLine(tessellator, 68, 49, 0x8080ff, vec, 180);
addLine(tessellator, 68, 49, 0xff0000, vec, MainRegistry.proxy.me().rotationYaw - dipole.dirUpper * 90);
addLine(tessellator, 68, 63, 0x8080ff, vec, 180);
addLine(tessellator, 68, 63, 0xff0000, vec, MainRegistry.proxy.me().rotationYaw - dipole.dirRedstone * 90);
tessellator.draw();
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glPopMatrix();
this.threshold.drawTextBox();
dipole.tanks[0].renderTank(guiLeft + 134, guiTop + 88, this.zLevel, 16, 52);
dipole.tanks[1].renderTank(guiLeft + 152, guiTop + 88, this.zLevel, 16, 52);
}
public void addLine(Tessellator tess, int x, int y, int color, Vec3NT vec, float yaw) {
vec.setComponents(0, 6, 0);
vec.rotateAroundZDeg(yaw);
tess.setColorOpaque_I(color);
tess.addVertex(guiLeft + x, guiTop + y, this.zLevel);
tess.addVertex(guiLeft + x + vec.xCoord, guiTop + y + vec.yCoord, this.zLevel);
}
@Override
protected void keyTyped(char c, int i) {
if(this.threshold.textboxKeyTyped(c, i)) {
String text = this.threshold.getText();
if(text.startsWith("0")) this.threshold.setText(text.substring(1));
if(this.threshold.getText().isEmpty()) this.threshold.setText("0");
if(NumberUtils.isDigits(this.threshold.getText())) {
int num = NumberUtils.toInt(this.threshold.getText());
NBTTagCompound data = new NBTTagCompound();
data.setInteger("threshold", num);
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, dipole.xCoord, dipole.yCoord, dipole.zCoord));
}
return;
}
super.keyTyped(c, i);
}
@Override
public void onGuiClosed() {
super.onGuiClosed();
Keyboard.enableRepeatEvents(false);
}
}

View File

@ -11,18 +11,17 @@ import com.hbm.inventory.FluidStack;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.recipes.loader.SerializableRecipe;
import com.hbm.items.machine.ItemFluidIcon;
import com.hbm.util.Tuple.Pair;
import net.minecraft.item.ItemStack;
public class CompressorRecipes extends SerializableRecipe {
public static HashMap<Pair<FluidType, Integer>, CompressorRecipe> recipes = new HashMap();
@Override
public void registerDefaults() {
recipes.put(new Pair(Fluids.STEAM, 0), new CompressorRecipe(1_000, new FluidStack(Fluids.HOTSTEAM, 100)));
recipes.put(new Pair(Fluids.HOTSTEAM, 0), new CompressorRecipe(1_000, new FluidStack(Fluids.SUPERHOTSTEAM, 100)));
recipes.put(new Pair(Fluids.SUPERHOTSTEAM, 0), new CompressorRecipe(1_000, new FluidStack(Fluids.ULTRAHOTSTEAM, 100)));
recipes.put(new Pair(Fluids.PETROLEUM, 0), new CompressorRecipe(2_000, new FluidStack(Fluids.PETROLEUM, 2_000, 1), 20));
recipes.put(new Pair(Fluids.PETROLEUM, 1), new CompressorRecipe(2_000, new FluidStack(Fluids.LPG, 1_000, 0), 20));
@ -30,6 +29,20 @@ public class CompressorRecipes extends SerializableRecipe {
recipes.put(new Pair(Fluids.PERFLUOROMETHYL, 1), new CompressorRecipe(1_000, new FluidStack(Fluids.PERFLUOROMETHYL_COLD, 1_000, 0), 100));
}
public static HashMap getRecipes() {
HashMap<Object, Object> recipes = new HashMap<Object, Object>();
for(Entry<Pair<FluidType, Integer>, CompressorRecipe> entry : CompressorRecipes.recipes.entrySet()) {
ItemStack input = ItemFluidIcon.make(entry.getKey().getKey(), entry.getValue().inputAmount, entry.getKey().getValue());
ItemStack output = ItemFluidIcon.make(entry.getValue().output);
if(input.getItemDamage() == output.getItemDamage()) continue;
recipes.put(input, output);
}
return recipes;
}
public static class CompressorRecipe {

View File

@ -91,6 +91,8 @@ public class MixerRecipes extends SerializableRecipe {
register(Fluids.CHLOROCALCITE_MIX, new MixerRecipe(1000, 50).setStack1(new FluidStack(Fluids.CHLOROCALCITE_SOLUTION, 500)).setStack2(new FluidStack(Fluids.SULFURIC_ACID, 500)).setSolid(new ComparableStack(ModItems.powder_flux)));
register(Fluids.PHEROMONE_M, new MixerRecipe(2000, 10).setStack1(new FluidStack(Fluids.PHEROMONE, 1500)).setStack2(new FluidStack(Fluids.BLOOD, 500)).setSolid(new ComparableStack(ModItems.pill_herbal)));
register(Fluids.PERFLUOROMETHYL, new MixerRecipe(1000, 20).setStack1(new FluidStack(Fluids.PETROLEUM, 1000)).setStack2(new FluidStack(Fluids.UNSATURATEDS, 500)).setSolid(new OreDictStack(F.dust())));
}
public static void register(FluidType type, MixerRecipe... rec) {

View File

@ -0,0 +1,174 @@
package com.hbm.inventory.recipes;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.stream.JsonWriter;
import com.hbm.inventory.RecipesCommon.AStack;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.inventory.recipes.loader.SerializableRecipe;
import com.hbm.items.ModItems;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
public class ParticleAcceleratorRecipes extends SerializableRecipe {
private static final List<ParticleAcceleratorRecipe> recipes = new ArrayList();
@Override
public void registerDefaults() {
recipes.add(new ParticleAcceleratorRecipe(
new ComparableStack(ModItems.particle_hydrogen),
new ComparableStack(ModItems.particle_copper),
900,
new ItemStack(ModItems.particle_aproton),
new ItemStack(ModItems.particle_aelectron)
));
recipes.add(new ParticleAcceleratorRecipe(
new ComparableStack(ModItems.particle_amat),
new ComparableStack(ModItems.particle_amat),
900,
new ItemStack(ModItems.particle_aschrab),
new ItemStack(ModItems.particle_empty)
));
recipes.add(new ParticleAcceleratorRecipe(
new ComparableStack(ModItems.particle_aschrab),
new ComparableStack(ModItems.particle_aschrab),
100000,
new ItemStack(ModItems.particle_dark),
new ItemStack(ModItems.particle_empty)
));
recipes.add(new ParticleAcceleratorRecipe(
new ComparableStack(ModItems.particle_hydrogen),
new ComparableStack(ModItems.particle_amat),
2000,
new ItemStack(ModItems.particle_muon),
new ItemStack(ModItems.particle_empty)
));
recipes.add(new ParticleAcceleratorRecipe(
new ComparableStack(ModItems.particle_hydrogen),
new ComparableStack(ModItems.particle_lead),
5000,
new ItemStack(ModItems.particle_higgs),
new ItemStack(ModItems.particle_empty)
));
recipes.add(new ParticleAcceleratorRecipe(
new ComparableStack(ModItems.particle_muon),
new ComparableStack(ModItems.particle_higgs),
2000,
new ItemStack(ModItems.particle_tachyon),
new ItemStack(ModItems.particle_empty)
));
recipes.add(new ParticleAcceleratorRecipe(
new ComparableStack(ModItems.particle_muon),
new ComparableStack(ModItems.particle_dark),
100000,
new ItemStack(ModItems.particle_strange),
new ItemStack(ModItems.particle_empty)
));
recipes.add(new ParticleAcceleratorRecipe(
new ComparableStack(ModItems.particle_strange),
new ComparableStack(ModItems.powder_magic),
500000,
new ItemStack(ModItems.particle_sparkticle),
new ItemStack(ModItems.dust)
));
recipes.add(new ParticleAcceleratorRecipe(
new ComparableStack(ModItems.particle_sparkticle),
new ComparableStack(ModItems.particle_higgs),
1000000,
new ItemStack(ModItems.particle_digamma),
new ItemStack(ModItems.particle_empty)
));
recipes.add(new ParticleAcceleratorRecipe(
new ComparableStack(Items.chicken),
new ComparableStack(Items.chicken),
100,
new ItemStack(ModItems.nugget),
new ItemStack(ModItems.nugget)
));
}
public ParticleAcceleratorRecipe getOutput(ItemStack input1, ItemStack input2, int momentum) {
for(ParticleAcceleratorRecipe recipe : recipes) {
if(momentum >= recipe.momentum &&
((recipe.input1.matchesRecipe(input1, true) && recipe.input2.matchesRecipe(input2, true)) ||
(recipe.input1.matchesRecipe(input2, true) && recipe.input2.matchesRecipe(input1, true)))) {
return recipe;
}
}
return null;
}
public static class ParticleAcceleratorRecipe {
public AStack input1;
public AStack input2;
public int momentum;
public ItemStack output1;
public ItemStack output2;
public ParticleAcceleratorRecipe(AStack in1, AStack in2, int momentum, ItemStack out1, ItemStack out2) {
this.input1 = in1;
this.input2 = in2;
this.momentum = momentum;
this.output1 = out1;
this.output2 = out2;
}
}
@Override
public String getFileName() {
return "hbmParticleAccelerator.json";
}
@Override
public Object getRecipeObject() {
return recipes;
}
@Override
public void deleteRecipes() {
recipes.clear();
}
@Override
public void readRecipe(JsonElement recipe) {
JsonObject obj = (JsonObject) recipe;
int momentum = obj.get("momentum").getAsInt();
AStack[] in = this.readAStackArray(obj.get("inputs").getAsJsonArray());
ItemStack[] out = this.readItemStackArray(obj.get("outputs").getAsJsonArray());
this.recipes.add(new ParticleAcceleratorRecipe(
in[0],
in[1],
momentum,
out[0],
out[1]
));
}
@Override
public void writeRecipe(Object recipe, JsonWriter writer) throws IOException {
ParticleAcceleratorRecipe rec = (ParticleAcceleratorRecipe) recipe;
writer.name("momentum").value(rec.momentum);
writer.name("inputs").beginArray();
this.writeAStack(rec.input1, writer);
this.writeAStack(rec.input2, writer);
writer.endArray();
writer.name("outputs").beginArray();
this.writeItemStack(rec.output1, writer);
this.writeItemStack(rec.output2, writer);
writer.endArray();
}
}

View File

@ -38,9 +38,9 @@ public class RotaryFurnaceRecipes extends SerializableRecipe {
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_STEEL, INGOT.q(1)), 100, 100, new OreDictStack(IRON.ingot()), new OreDictStack(COAL.gem())));
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_STEEL, INGOT.q(1)), 100, 100, new OreDictStack(IRON.ingot()), new OreDictStack(ANY_COKE.gem())));
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_STEEL, INGOT.q(2)), 400, 25, new OreDictStack(IRON.fragment(), 9), new OreDictStack(COAL.gem())));
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_STEEL, INGOT.q(3)), 400, 25, new OreDictStack(IRON.fragment(), 9), new OreDictStack(ANY_COKE.gem())));
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_STEEL, INGOT.q(4)), 800, 25, new OreDictStack(IRON.fragment(), 9), new OreDictStack(ANY_COKE.gem()), new ComparableStack(ModItems.powder_flux)));
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_STEEL, INGOT.q(2)), 200, 25, new OreDictStack(IRON.fragment(), 9), new OreDictStack(COAL.gem())));
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_STEEL, INGOT.q(3)), 200, 25, new OreDictStack(IRON.fragment(), 9), new OreDictStack(ANY_COKE.gem())));
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_STEEL, INGOT.q(4)), 400, 25, new OreDictStack(IRON.fragment(), 9), new OreDictStack(ANY_COKE.gem()), new ComparableStack(ModItems.powder_flux)));
recipes.add(new RotaryFurnaceRecipe(new MaterialStack(MAT_DESH, INGOT.q(1)), 100, 200, new FluidStack(Fluids.LIGHTOIL, 100), new ComparableStack(ModItems.powder_desh_ready)));

View File

@ -110,6 +110,7 @@ public class SolderingRecipes extends SerializableRecipe {
// a very, very vague guess on what the recipes should be. testing still needed, upgrade requirements are likely to change. maybe inclusion of caesium?
recipes.add(new SolderingRecipe(new ItemStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER.ordinal()), 400, 15_000,
new FluidStack(Fluids.PERFLUOROMETHYL, 1_000),
new AStack[] {
new ComparableStack(ModItems.circuit, lbsm ? 8 : 32, EnumCircuitType.CHIP),
new ComparableStack(ModItems.circuit, lbsm ? 8 : 32, EnumCircuitType.CAPACITOR),
@ -121,6 +122,7 @@ public class SolderingRecipes extends SerializableRecipe {
new OreDictStack(PB.wireFine(), 16)}
));
recipes.add(new SolderingRecipe(new ItemStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER_ADVANCED.ordinal()), 600, 25_000,
new FluidStack(Fluids.PERFLUOROMETHYL, 4_000),
new AStack[] {
new ComparableStack(ModItems.circuit, lbsm ? 8 : 16, EnumCircuitType.CHIP_BISMOID),
new ComparableStack(ModItems.circuit, lbsm ? 16 : 48, EnumCircuitType.CAPACITOR_TANTALIUM),
@ -132,6 +134,7 @@ public class SolderingRecipes extends SerializableRecipe {
new OreDictStack(PB.wireFine(), 24)}
));
recipes.add(new SolderingRecipe(new ItemStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER_QUANTUM.ordinal()), 600, 250_000,
new FluidStack(Fluids.PERFLUOROMETHYL_COLD, 6_000),
new AStack[] {
new ComparableStack(ModItems.circuit, lbsm ? 8 : 16, EnumCircuitType.CHIP_QUANTUM),
new ComparableStack(ModItems.circuit, lbsm ? 16 : 48, EnumCircuitType.CHIP_BISMOID),

View File

@ -81,13 +81,11 @@ public class ItemPoolsSingle {
weighted(ModItems.powder_power, 0, 1, 5, 1),
weighted(ModItems.sat_chip, 0, 1, 1, 1),
weighted(Items.diamond, 0, 5, 9, 1),
weighted(ModItems.warhead_nuclear, 0, 1, 1, 1),
weighted(ModItems.ammo_standard, EnumAmmo.NUKE_STANDARD.ordinal(), 1, 3, 1),
weighted(ModItems.ammo_container, 0, 1, 4, 1),
weighted(ModItems.grenade_nuclear, 0, 1, 2, 1),
weighted(ModItems.grenade_mirv, 0, 1, 1, 1),
weighted(ModItems.powder_yellowcake, 0, 26, 42, 1),
weighted(ModItems.ingot_u235, 0, 3, 6, 1),
weighted(ModItems.gun_heavy_revolver, 0, 1, 1, 1),
weighted(ModItems.circuit, EnumCircuitType.CHIP.ordinal(), 18, 32, 1),
weighted(ModItems.circuit, EnumCircuitType.BASIC.ordinal(), 6, 12, 1)
@ -99,16 +97,10 @@ public class ItemPoolsSingle {
weighted(ModItems.ammo_container, 0, 3, 6, 1),
weighted(ModItems.ammo_standard, EnumAmmo.NUKE_DEMO.ordinal(), 2, 3, 1),
weighted(ModItems.gun_carbine, 0, 1, 1, 1),
weighted(ModItems.ammo_standard, EnumAmmo.R762_DU.ordinal(), 16, 32, 1),
weighted(ModItems.gun_congolake, 0, 1, 1, 1),
weighted(ModItems.gun_b92, 0, 1, 1, 1),
weighted(ModItems.ingot_combine_steel, 0, 16, 28, 1),
weighted(ModItems.man_core, 0, 1, 1, 1),
weighted(ModItems.boy_kit, 0, 1, 1, 1),
weighted(ModItems.nuke_starter_kit, 0, 1, 1, 1),
weighted(ModItems.weaponized_starblaster_cell, 0, 1, 1, 1),
weighted(ModItems.warhead_mirv, 0, 1, 1, 1),
weighted(ModItems.battery_schrabidium_cell, 0, 1, 1, 1),
weighted(ModItems.powder_nitan_mix, 0, 16, 32, 1)
weighted(ModItems.circuit, EnumCircuitType.ADVANCED.ordinal(), 6, 12, 1)
};
}};

View File

@ -6,6 +6,7 @@ import com.hbm.inventory.FluidStack;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.items.ModItems;
import com.hbm.util.BobMathUtil;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -40,7 +41,10 @@ public class ItemFluidIcon extends Item {
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
if(stack.hasTagCompound()) {
if(getQuantity(stack) > 0) list.add(getQuantity(stack) + "mB");
if(getPressure(stack) > 0) list.add(EnumChatFormatting.RED + "" + getPressure(stack) + "PU");
if(getPressure(stack) > 0) {
list.add(EnumChatFormatting.RED + "" + getPressure(stack) + "PU");
list.add((BobMathUtil.getBlink() ? EnumChatFormatting.RED : EnumChatFormatting.DARK_RED) + "Pressurized, use compressor!");
}
}
Fluids.fromID(stack.getItemDamage()).addInfo(list);

View File

@ -59,7 +59,7 @@ public class Receiver {
protected int roundsPerCycle_DNA = 1;
protected float spreadInnate_DNA = 0F;
protected float spreadMultAmmo_DNA = 1F;
protected float spreadPenaltyHipfire_DNA = 0.05F;
protected float spreadPenaltyHipfire_DNA = 0.025F;
protected float spreadDurability_DNA = 0.125F;
protected boolean refireOnHold_DNA = false;
protected boolean refireAfterDry_DNA = false;

View File

@ -131,8 +131,7 @@ public class HbmWorldGen implements IWorldGenerator {
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.aluminiumClusterSpawn, 6, 15, 35, ModBlocks.cluster_aluminium);
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.copperClusterSpawn, 6, 15, 20, ModBlocks.cluster_copper);
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.malachiteSpawn, 16, 6, 40, ModBlocks.stone_resource, EnumStoneType.MALACHITE.ordinal());
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.limestoneSpawn, 12, 25, 30, ModBlocks.stone_resource, EnumStoneType.LIMESTONE.ordinal());
DungeonToolbox.generateOre(world, rand, i, j, WorldConfig.limestoneSpawn, 16, 25, 30, ModBlocks.stone_resource, EnumStoneType.LIMESTONE.ordinal());
if(WorldConfig.newBedrockOres) {

View File

@ -876,6 +876,7 @@ public class MainRegistry {
new OreCave(ModBlocks.stone_resource, 1).setThreshold(1.75D).setRangeMult(20).setYLevel(25).setMaxRange(20); //asbestos
new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.HEMATITE.ordinal()).setScaleH(0.04D).setScaleV(0.25D).setThreshold(230);
new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.BAUXITE.ordinal()).setScaleH(0.03D).setScaleV(0.15D).setThreshold(300);
new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.MALACHITE.ordinal()).setScaleH(0.03D).setScaleV(0.15D).setThreshold(325);
//new BiomeCave().setThreshold(1.5D).setRangeMult(20).setYLevel(40).setMaxRange(20);
//new OreLayer(Blocks.coal_ore, 0.2F).setThreshold(4).setRangeMult(3).setYLevel(70);
BedrockOre.init();

View File

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

View File

@ -111,6 +111,7 @@ public class TileEntityCrucible extends TileEntityMachineBase implements IGUIPro
List<EntityItem> list = worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(xCoord - 0.5, yCoord + 0.5, zCoord - 0.5, xCoord + 1.5, yCoord + 1, zCoord + 1.5));
for(EntityItem item : list) {
if(item.isDead) continue;
ItemStack stack = item.getEntityItem();
if(this.isItemSmeltable(stack)) {

View File

@ -621,7 +621,7 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements
int z = zCoord + dir.offsetZ * 4;
List<ItemStack> stacks = new ArrayList();
items.forEach(i -> stacks.add(i.getEntityItem()));
items.forEach(i -> { if(!i.isDead) stacks.add(i.getEntityItem());});
/* try to insert into a valid container */
TileEntity tile = worldObj.getTileEntity(x, y, z);
@ -640,6 +640,7 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements
/* collect remaining items in internal buffer */
outer:
for(EntityItem item : items) {
if(item.isDead) continue;
ItemStack stack = item.getEntityItem();

View File

@ -0,0 +1,11 @@
package com.hbm.tileentity.machine.albion;
import com.hbm.tileentity.machine.albion.TileEntityPASource.Particle;
import net.minecraftforge.common.util.ForgeDirection;
public interface IParticleUser {
public boolean canParticleEnter(Particle particle, ForgeDirection dir);
public void onEnter(Particle particle, ForgeDirection dir);
}

View File

@ -1,6 +1,8 @@
package com.hbm.tileentity.machine.albion;
import com.hbm.interfaces.IControlReceiver;
import com.hbm.inventory.container.ContainerPADipole;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.inventory.gui.GUIPADipole;
import com.hbm.lib.Library;
import com.hbm.tileentity.IGUIProvider;
@ -13,10 +15,11 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProvider {
public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProvider, IControlReceiver {
public int dirLower;
public int dirUpper;
@ -37,6 +40,11 @@ public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProv
return dir == ForgeDirection.UP || dir == ForgeDirection.DOWN;
}
@Override
public boolean canConnect(FluidType type, ForgeDirection dir) {
return dir == ForgeDirection.UP || dir == ForgeDirection.DOWN;
}
@Override
public String getName() {
return "container.paDipole";
@ -138,4 +146,30 @@ public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProv
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUIPADipole(player.inventory, this);
}
@Override
public boolean hasPermission(EntityPlayer player) {
return this.isUseableByPlayer(player);
}
@Override
public void receiveControl(NBTTagCompound data) {
if(data.hasKey("lower")) this.dirLower++;
if(data.hasKey("upper")) this.dirUpper++;
if(data.hasKey("redstone")) this.dirRedstone++;
if(data.hasKey("threshold")) this.threshold = data.getInteger("threshold");
if(this.dirLower > 3) this.dirLower -= 4;
if(this.dirUpper > 3) this.dirUpper -= 4;
if(this.dirRedstone > 3) this.dirRedstone -= 4;
this.threshold = MathHelper.clamp_int(threshold, 0, 999_999_999);
}
public static ForgeDirection ditToForgeDir(int dir) {
if(dir == 1) return ForgeDirection.EAST;
if(dir == 2) return ForgeDirection.SOUTH;
if(dir == 3) return ForgeDirection.WEST;
return ForgeDirection.NORTH;
}
}

View File

@ -78,4 +78,13 @@ public class TileEntityPASource extends TileEntityCooledBase implements IGUIProv
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUIPASource(player.inventory, this);
}
public static class Particle {
public int x;
public int y;
public int z;
public ForgeDirection dir;
public int momentum;
}
}

View File

@ -12,6 +12,9 @@ import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.terraingen.DecorateBiomeEvent;
public class OreLayer3D {
public static int counter = 0;
public int id;
NoiseGeneratorPerlin noiseX;
NoiseGeneratorPerlin noiseY;
@ -29,6 +32,8 @@ public class OreLayer3D {
this.block = block;
this.meta = meta;
MinecraftForge.EVENT_BUS.register(this);
this.id = counter;
counter++;
}
public OreLayer3D setDimension(int dim) {
@ -58,9 +63,9 @@ public class OreLayer3D {
if(world.provider == null || world.provider.dimensionId != this.dim) return;
if(this.noiseX == null) this.noiseX = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + 101), 4);
if(this.noiseY == null) this.noiseY = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + 102), 4);
if(this.noiseZ == null) this.noiseZ = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + 103), 4);
if(this.noiseX == null) this.noiseX = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + 101 + id), 4);
if(this.noiseY == null) this.noiseY = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + 102 + id), 4);
if(this.noiseZ == null) this.noiseZ = new NoiseGeneratorPerlin(new Random(event.world.getSeed() + 103 + id), 4);
int cX = event.chunkX;
int cZ = event.chunkZ;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB