more mining drill stuff

This commit is contained in:
Boblet 2022-12-16 15:12:24 +01:00
parent 5d56ef0f00
commit e5fbdf0a38
12 changed files with 90 additions and 2 deletions

View File

@ -0,0 +1,48 @@
package com.hbm.inventory.container;
import com.hbm.inventory.SlotMachineOutput;
import com.hbm.tileentity.machine.TileEntityMachineExcavator;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
public class ContainerMachineExcavator extends Container {
TileEntityMachineExcavator excavator;
public ContainerMachineExcavator(InventoryPlayer invPlayer, TileEntityMachineExcavator tile) {
this.excavator = tile;
//Battery
this.addSlotToContainer(new Slot(tile, 0, 220, 72));
//Fluid ID
this.addSlotToContainer(new Slot(tile, 1, 202, 72));
//Upgrades
for(int i = 0; i < 3; i++) {
this.addSlotToContainer(new Slot(tile, 2 + i, 136 + i * 18, 75));
}
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 3; j++) {
this.addSlotToContainer(new SlotMachineOutput(tile, 5 + j + i * 3, 136 + j * 18, 5 + i * 18));
}
}
for(int i = 0; i < 3; i++) {
for(int j = 0; j < 9; j++) {
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 41 + j * 18, 122 + i * 18));
}
}
for(int i = 0; i < 9; i++) {
this.addSlotToContainer(new Slot(invPlayer, i, 41 + i * 18, 180));
}
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return false;
}
}

View File

@ -0,0 +1,18 @@
package com.hbm.inventory.gui;
import com.hbm.inventory.container.ContainerMachineExcavator;
import com.hbm.tileentity.machine.TileEntityMachineExcavator;
import net.minecraft.entity.player.InventoryPlayer;
public class GUIMachineExcavator extends GuiInfoContainer {
public GUIMachineExcavator(InventoryPlayer inventory, TileEntityMachineExcavator tile) {
super(new ContainerMachineExcavator(inventory, tile));
}
@Override
protected void drawGuiContainerBackgroundLayer(float interp, int x, int y) {
}
}

View File

@ -253,7 +253,7 @@ public class ShredderRecipes extends SerializableRecipe {
ShredderRecipes.setRecipe(ModBlocks.steel_wall, new ItemStack(ModItems.powder_steel_tiny, 13));
ShredderRecipes.setRecipe(ModBlocks.steel_corner, new ItemStack(ModItems.powder_steel_tiny, 26));
ShredderRecipes.setRecipe(ModBlocks.steel_beam, new ItemStack(ModItems.powder_steel_tiny, 3));
ShredderRecipes.setRecipe(ModBlocks.steel_scaffold, new ItemStack(ModItems.powder_steel_tiny, 7));
ShredderRecipes.setRecipe(new ItemStack(ModBlocks.steel_scaffold, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.powder_steel_tiny, 7));
ShredderRecipes.setRecipe(ModItems.coil_copper, new ItemStack(ModItems.powder_red_copper, 1));
ShredderRecipes.setRecipe(ModItems.coil_copper_torus, new ItemStack(ModItems.powder_red_copper, 2));
ShredderRecipes.setRecipe(ModItems.coil_advanced_alloy, new ItemStack(ModItems.powder_advanced_alloy, 1));
@ -273,6 +273,7 @@ public class ShredderRecipes extends SerializableRecipe {
ShredderRecipes.setRecipe(ModBlocks.oil_duct_solid, new ItemStack(ModItems.powder_steel_tiny, 3));
ShredderRecipes.setRecipe(ModBlocks.gas_duct, new ItemStack(ModItems.powder_steel, 1));
ShredderRecipes.setRecipe(ModBlocks.gas_duct_solid, new ItemStack(ModItems.powder_steel, 1));
ShredderRecipes.setRecipe(ModBlocks.machine_fluidtank, new ItemStack(ModItems.powder_steel, 32));
/* Sellafite scrapping */
ShredderRecipes.setRecipe(ModBlocks.sellafield_slaked, new ItemStack(Blocks.gravel));

View File

@ -1,8 +1,18 @@
package com.hbm.tileentity.machine;
import com.hbm.inventory.container.ContainerMachineExcavator;
import com.hbm.inventory.gui.GUIMachineExcavator;
import com.hbm.tileentity.IGUIProvider;
import com.hbm.tileentity.TileEntityMachineBase;
public class TileEntityMachineExcavator extends TileEntityMachineBase {
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.world.World;
public class TileEntityMachineExcavator extends TileEntityMachineBase implements IGUIProvider {
public boolean enableDrill = false;
public boolean enableCrusher = false;
@ -23,4 +33,15 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase {
public void updateEntity() {
}
@Override
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new ContainerMachineExcavator(player.inventory, this);
}
@Override
@SideOnly(Side.CLIENT)
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUIMachineExcavator(player.inventory, this);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B