Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f439bf
commit ff14573
Showing
7 changed files
with
97 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 17 additions & 1 deletion
18
src/main/java/icbm/classic/content/machines/battery/ContainerBattery.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
package icbm.classic.content.machines.battery; | ||
|
||
import icbm.classic.prefab.gui.ContainerBase; | ||
import icbm.classic.prefab.gui.slot.SlotEnergyItem; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
|
||
/** | ||
* @see <a href="https://github.com/BuiltBrokenModding/VoltzEngine/blob/development/license.md">License</a> for what you can and can't do with the code. | ||
* Created by Dark(DarkGuardsman, Robert) on 3/28/2018. | ||
*/ | ||
public class ContainerBattery | ||
public class ContainerBattery extends ContainerBase<TileEntityBattery> | ||
{ | ||
public ContainerBattery(EntityPlayer player, TileEntityBattery node) | ||
{ | ||
super(player, node); | ||
int x = 50; | ||
int y = 50; | ||
for (int slot = 0; slot < TileEntityBattery.SLOTS; slot++) | ||
{ | ||
this.addSlotToContainer(new SlotEnergyItem(node.getInventory(), slot, slot * 18 + x, y)); | ||
} | ||
|
||
addPlayerInventory(player); | ||
} | ||
} |
20 changes: 19 additions & 1 deletion
20
src/main/java/icbm/classic/content/machines/battery/GuiBattery.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
package icbm.classic.content.machines.battery; | ||
|
||
import icbm.classic.prefab.gui.GuiContainerBase; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.inventory.Slot; | ||
|
||
/** | ||
* @see <a href="https://github.com/BuiltBrokenModding/VoltzEngine/blob/development/license.md">License</a> for what you can and can't do with the code. | ||
* Created by Dark(DarkGuardsman, Robert) on 3/28/2018. | ||
*/ | ||
public class GuiBattery | ||
public class GuiBattery extends GuiContainerBase | ||
{ | ||
public GuiBattery(EntityPlayer player, TileEntityBattery battery) | ||
{ | ||
super(new ContainerBattery(player, battery)); | ||
} | ||
|
||
@Override | ||
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) | ||
{ | ||
super.drawGuiContainerBackgroundLayer(par1, par2, par3); | ||
for(Slot slot : inventorySlots.inventorySlots) | ||
{ | ||
drawSlot(slot); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 4 additions & 22 deletions
26
src/main/resources/assets/icbmclassic/blockstates/batterybox.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/main/resources/assets/icbmclassic/models/block/batterybox.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"parent": "block/cube_all", | ||
"textures": { | ||
"particle": "minecraft:blocks/anvil_base", | ||
"down": "minecraft:blocks/planks_big_oak", | ||
"up": "minecraft:blocks/planks_big_oak", | ||
"north": "minecraft:blocks/anvil_base", | ||
"east": "minecraft:blocks/anvil_base", | ||
"south": "minecraft:blocks/anvil_base", | ||
"west": "minecraft:blocks/anvil_base" | ||
} | ||
} |