mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
tweaks, exposure chamber recipes
This commit is contained in:
parent
ace7812d3f
commit
f8e9cff64b
@ -7,6 +7,9 @@
|
||||
* A much less jankier alternative to the vanilla boat. Rotations are silky smooth and done via the strafe keys instead of based on the player's orientation
|
||||
* Won't break from ramming into blocks
|
||||
* Faster than a regular boat, but will decelerate quicker when there's nobody sitting in it, preventing the boat from drifting off too far when empty
|
||||
* Exposure chamber
|
||||
* Now performs the particle transmutation recipes that were previously done in the crafting table
|
||||
* Stylish as hell
|
||||
|
||||
## Changed
|
||||
* Reduced the blast resistance of the large doors from absurdly high to still very but not quite as high
|
||||
@ -20,6 +23,7 @@
|
||||
* Non-custom missiles have been slightly buffed
|
||||
* Explosions are now slightly larger and they use the new cross-detection entity damage code which still affects entities behind small hills that would otherwise be shielded
|
||||
* Explosions now have a 2x larger entity damage radius
|
||||
* Updated the digiminer recipe for mekanism cocmpat
|
||||
|
||||
## Fixed
|
||||
* Fixed ancient bug where custom missiles launched using the launch table would not use the accuracy calculation and always be pin-point accurate
|
||||
@ -28,4 +32,5 @@
|
||||
* Fixed the ballistic gauntlet spawning a client-side ghost bullet that doesn't move or despawn
|
||||
* Fixed bug where different custom machine cores would merge in a stack when picked up, turning them into the same type
|
||||
* Fixed radar screen blips being visible through the back of the model
|
||||
* Fixed desh crate's last half of slots preventing radiation entirely
|
||||
* Fixed desh crate's last half of slots preventing radiation entirely
|
||||
* Fixed large mining drill shift-clicking
|
||||
@ -54,8 +54,8 @@ public class ContainerMachineExcavator extends Container {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if(par2 <= 4) {
|
||||
if(!this.mergeItemStack(var5, 5, this.inventorySlots.size(), true)) {
|
||||
if(par2 <= 13) {
|
||||
if(!this.mergeItemStack(var5, 14, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -0,0 +1,86 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.inventory.SlotTakeOnly;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineExposureChamber;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerMachineExposureChamber extends Container {
|
||||
|
||||
private TileEntityMachineExposureChamber chamber;
|
||||
|
||||
public ContainerMachineExposureChamber(InventoryPlayer invPlayer, TileEntityMachineExposureChamber tedf) {
|
||||
this.chamber = tedf;
|
||||
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 8, 18));
|
||||
this.addSlotToContainer(new SlotTakeOnly(tedf, 2, 8, 54));
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 80, 36));
|
||||
this.addSlotToContainer(new SlotCraftingOutput(invPlayer.player, tedf, 4, 116, 36));
|
||||
this.addSlotToContainer(new Slot(tedf, 5, 152, 54));
|
||||
this.addSlotToContainer(new Slot(tedf, 6, 44, 54));
|
||||
this.addSlotToContainer(new Slot(tedf, 7, 62, 54));
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 104 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 162));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if(var4 != null && var4.getHasStack()) {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if(par2 <= 6) {
|
||||
if(!this.mergeItemStack(var5, 7, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
|
||||
if(var3.getItem() instanceof ItemMachineUpgrade) {
|
||||
if(!this.mergeItemStack(var5, 5, 7, false)) {
|
||||
return null;
|
||||
}
|
||||
} else if(var3.getItem() instanceof IBatteryItem || var3.getItem() == ModItems.battery_creative) {
|
||||
if(!this.mergeItemStack(var5, 4, 5, false)) {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
if(!this.mergeItemStack(var5, 0, 2, false)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(var5.stackSize == 0) {
|
||||
var4.putStack((ItemStack) null);
|
||||
} else {
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return chamber.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerMachineExposureChamber;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineExposureChamber;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIMachineExposureChamber extends GuiInfoContainer {
|
||||
|
||||
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_exposure_chamber.png");
|
||||
private TileEntityMachineExposureChamber chamber;
|
||||
|
||||
public GUIMachineExposureChamber(InventoryPlayer invPlayer, TileEntityMachineExposureChamber chamber) {
|
||||
super(new ContainerMachineExposureChamber(invPlayer, chamber));
|
||||
this.chamber = chamber;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 186;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 18, 16, 52, chamber.power, chamber.maxPower);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.chamber.hasCustomInventoryName() ? this.chamber.getInventoryName() : I18n.format(this.chamber.getInventoryName());
|
||||
this.fontRendererObj.drawString(name, 70 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
}
|
||||
}
|
||||
@ -1230,17 +1230,17 @@ public class AssemblerRecipes {
|
||||
|
||||
makeRecipe(new ComparableStack(mb, 1, 4), new AStack[] {
|
||||
new OreDictStack(DURA.ingot(), 16),
|
||||
new OreDictStack(DESH.ingot(), 8),
|
||||
new OreDictStack(STEEL.plate(), 48),
|
||||
new OreDictStack(CU.plate(), 24),
|
||||
new OreDictStack(DESH.ingot(), 16),
|
||||
new OreDictStack(STEEL.plateWelded(), 32),
|
||||
new OreDictStack(CU.plateWelded(), 24),
|
||||
new ComparableStack(ModItems.pipes_steel, 8),
|
||||
new ComparableStack(ModItems.circuit_gold, 8),
|
||||
new ComparableStack(ModItems.wire_advanced_alloy, 24),
|
||||
new OreDictStack(KEY_CIRCUIT_BISMUTH, 4),
|
||||
new ComparableStack(ModItems.wire_dense, 32, Mats.MAT_ALLOY.id),
|
||||
new ComparableStack(ModBlocks.fusion_conductor, 12),
|
||||
new ComparableStack(ModBlocks.machine_lithium_battery, 3),
|
||||
new ComparableStack(ModItems.crystal_redstone, 12),
|
||||
new ComparableStack(ModBlocks.capacitor_tantalium, 53),
|
||||
new ComparableStack(ModItems.crystal_redstone, 16),
|
||||
new ComparableStack(ModItems.crystal_diamond, 8),
|
||||
new ComparableStack(ModItems.motor_desh, 16)
|
||||
new ComparableStack(ModItems.motor_bismuth, 4)
|
||||
}, 15 * 60 * 20);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,83 @@
|
||||
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 static com.hbm.inventory.OreDictManager.*;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ExposureChamberRecipes extends SerializableRecipe {
|
||||
|
||||
public static List<ExposureChamberRecipe> recipes = new ArrayList();
|
||||
|
||||
@Override
|
||||
public void registerDefaults() {
|
||||
recipes.add(new ExposureChamberRecipe(new ComparableStack(ModItems.particle_higgs), new OreDictStack(U.ingot()), new ItemStack(ModItems.ingot_schraranium)));
|
||||
recipes.add(new ExposureChamberRecipe(new ComparableStack(ModItems.particle_higgs), new OreDictStack(U238.ingot()), new ItemStack(ModItems.ingot_schrabidium)));
|
||||
recipes.add(new ExposureChamberRecipe(new ComparableStack(ModItems.particle_dark), new OreDictStack(PU.ingot()), new ItemStack(ModItems.ingot_euphemium)));
|
||||
recipes.add(new ExposureChamberRecipe(new ComparableStack(ModItems.particle_sparkticle), new OreDictStack(SBD.ingot()), new ItemStack(ModItems.ingot_dineutronium)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileName() {
|
||||
return "hbmExposureChamber.json";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getRecipeObject() {
|
||||
return recipes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRecipes() {
|
||||
recipes.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readRecipe(JsonElement recipe) {
|
||||
|
||||
JsonObject obj = (JsonObject) recipe;
|
||||
|
||||
AStack particle = this.readAStack(obj.get("particle").getAsJsonArray());
|
||||
AStack ingredient = this.readAStack(obj.get("ingredient").getAsJsonArray());
|
||||
ItemStack output = this.readItemStack(obj.get("output").getAsJsonArray());
|
||||
|
||||
ExposureChamberRecipe rec = new ExposureChamberRecipe(particle, ingredient, output);
|
||||
recipes.add(rec);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeRecipe(Object o, JsonWriter writer) throws IOException {
|
||||
ExposureChamberRecipe recipe = (ExposureChamberRecipe) o;
|
||||
|
||||
writer.name("particle");
|
||||
this.writeAStack(recipe.particle, writer);
|
||||
writer.name("ingredient");
|
||||
this.writeAStack(recipe.ingredient, writer);
|
||||
writer.name("output");
|
||||
this.writeItemStack(recipe.output, writer);
|
||||
}
|
||||
|
||||
public static class ExposureChamberRecipe {
|
||||
|
||||
public AStack particle;
|
||||
public AStack ingredient;
|
||||
public ItemStack output;
|
||||
|
||||
public ExposureChamberRecipe(AStack particle, AStack ingredient, ItemStack output) {
|
||||
this.particle = particle;
|
||||
this.ingredient = ingredient;
|
||||
this.output = output;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -65,6 +65,7 @@ public abstract class SerializableRecipe {
|
||||
recipeHandlers.add(new ElectrolyserFluidRecipes());
|
||||
recipeHandlers.add(new ElectrolyserMetalRecipes());
|
||||
recipeHandlers.add(new ArcWelderRecipes());
|
||||
recipeHandlers.add(new ExposureChamberRecipes());
|
||||
|
||||
recipeHandlers.add(new MatDistribution());
|
||||
recipeHandlers.add(new CustomMachineRecipes());
|
||||
|
||||
@ -862,10 +862,6 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_cooler, 1, 0), new Object[] { "PCP", "CHC", "PCP", 'P', ANY_RESISTANTALLOY.plateCast(), 'C', ModItems.circuit_gold, 'H', Fluids.HELIUM4.getDict(16_000) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.hadron_cooler, 1, 1), new Object[] { "PCP", "CHC", "PCP", 'P', GOLD.plateCast(), 'C', ModItems.motor_bismuth, 'H', new ItemStack(ModBlocks.hadron_cooler, 1, 0) });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.ingot_schrabidium, 8), new Object[] { "UUU", "UPU", "UUU", 'U', U.ingot(), 'P', new ItemStack(ModItems.particle_higgs).setStackDisplayName("Higgs Boson (Temporary Recipe)") });
|
||||
addRecipeAuto(new ItemStack(ModItems.ingot_euphemium, 8), new Object[] { "UUU", "UPU", "UUU", 'U', PU.ingot(), 'P', new ItemStack(ModItems.particle_dark).setStackDisplayName("Dark Matter (Temporary Recipe)") });
|
||||
addRecipeAuto(new ItemStack(ModItems.ingot_dineutronium, 8), new Object[] { "UUU", "UPU", "UUU", 'U', SBD.ingot(), 'P', new ItemStack(ModItems.particle_sparkticle).setStackDisplayName("Sparkticle (Temporary Recipe)") });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fireworks, 1), new Object[] { "PPP", "PPP", "WIW", 'P', Items.paper, 'W', KEY_PLANKS, 'I', IRON.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.safety_fuse, 8), new Object[] { "SSS", "SGS", "SSS", 'S', Items.string, 'G', Items.gunpowder });
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineExposureChamber;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -11,7 +12,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
public class RenderExposureChamber extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float interp) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
@ -25,18 +26,24 @@ public class RenderExposureChamber extends TileEntitySpecialRenderer {
|
||||
case 2: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
TileEntityMachineExposureChamber chamber = (TileEntityMachineExposureChamber) tileEntity;
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.exposure_chamber_tex);
|
||||
ResourceManager.exposure_chamber.renderPart("Chamber");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated((tileEntity.getWorldObj().getTotalWorldTime() % 360D + f) * 5, 0, 1, 0);
|
||||
GL11.glTranslated(0, Math.sin((tileEntity.getWorldObj().getTotalWorldTime() % (Math.PI * 16D) + f) * 0.125) * 0.0625, 0);
|
||||
ResourceManager.exposure_chamber.renderPart("Core");
|
||||
GL11.glPopMatrix();
|
||||
double rotation = chamber.prevRotation + (chamber.rotation - chamber.prevRotation) * interp;
|
||||
|
||||
if(chamber.isOn) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(rotation / 2D, 0, 1, 0);
|
||||
GL11.glTranslated(0, Math.sin((tileEntity.getWorldObj().getTotalWorldTime() % (Math.PI * 16D) + interp) * 0.125) * 0.0625, 0);
|
||||
ResourceManager.exposure_chamber.renderPart("Core");
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated((tileEntity.getWorldObj().getTotalWorldTime() % 360D + f) * 10, 0, 1, 0);
|
||||
GL11.glRotated(rotation, 0, 1, 0);
|
||||
ResourceManager.exposure_chamber.renderPart("Magnets");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
@ -1,15 +1,42 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.inventory.container.ContainerMachineExposureChamber;
|
||||
import com.hbm.inventory.gui.GUIMachineExposureChamber;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityMachineExposureChamber extends TileEntityMachineBase {
|
||||
public class TileEntityMachineExposureChamber extends TileEntityMachineBase implements IGUIProvider {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 1_000_000;
|
||||
|
||||
public int progress;
|
||||
public static final int processTimeBase = 200;
|
||||
public int processTime = processTimeBase;
|
||||
public boolean isOn = false;
|
||||
public float rotation;
|
||||
public float prevRotation;
|
||||
|
||||
public TileEntityMachineExposureChamber() {
|
||||
super(7);
|
||||
/*
|
||||
* 0: Particle
|
||||
* 1: Particle internal
|
||||
* 2: Particle container
|
||||
* 3: Ingredient
|
||||
* 4: Output
|
||||
* 5: Battery
|
||||
* 6-7: Upgrades
|
||||
*/
|
||||
super(8);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -20,6 +47,38 @@ public class TileEntityMachineExposureChamber extends TileEntityMachineBase {
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.isOn = false;
|
||||
this.networkPackNT(50);
|
||||
} else {
|
||||
|
||||
this.prevRotation = this.rotation;
|
||||
|
||||
if(this.isOn) {
|
||||
|
||||
this.rotation += 10D;
|
||||
|
||||
if(this.rotation >= 720D) {
|
||||
this.rotation -= 720D;
|
||||
this.prevRotation -= 720D;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
buf.writeBoolean(this.isOn);
|
||||
buf.writeInt(this.progress);
|
||||
buf.writeInt(this.processTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(ByteBuf buf) {
|
||||
this.isOn = buf.readBoolean();
|
||||
this.progress = buf.readInt();
|
||||
this.processTime = buf.readInt();
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
@ -46,4 +105,15 @@ public class TileEntityMachineExposureChamber extends TileEntityMachineBase {
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerMachineExposureChamber(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIMachineExposureChamber(player.inventory, this);
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 314 B After Width: | Height: | Size: 6.9 KiB |
Loading…
x
Reference in New Issue
Block a user