This commit is contained in:
David-John Miller 2019-07-25 02:23:20 +00:00 committed by GitHub
commit 3edd9b2e27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
54 changed files with 503 additions and 25 deletions

View File

@ -28,7 +28,8 @@ public class GUIShulkerChest extends GuiContainer
COPPER(new ResourceLocation("ironchest", "textures/gui/copper_container.png")),
SILVER(new ResourceLocation("ironchest", "textures/gui/silver_container.png")),
GOLD(new ResourceLocation("ironchest", "textures/gui/gold_container.png")),
DIAMOND(new ResourceLocation("ironchest", "textures/gui/diamond_container.png"));
DIAMOND(new ResourceLocation("ironchest", "textures/gui/diamond_container.png")),
DIRT(new ResourceLocation("ironchest", "textures/gui/dirt_container.png"));
//@formatter:on
public final ResourceLocation location;
@ -48,7 +49,8 @@ public class GUIShulkerChest extends GuiContainer
COPPER(184, 184, ResourceList.COPPER, IronShulkerBoxType.COPPER),
SILVER(184, 238, ResourceList.SILVER, IronShulkerBoxType.SILVER),
CRYSTAL(238, 256, ResourceList.DIAMOND, IronShulkerBoxType.CRYSTAL),
OBSIDIAN(238, 256, ResourceList.DIAMOND,IronShulkerBoxType.OBSIDIAN);
OBSIDIAN(238, 256, ResourceList.DIAMOND,IronShulkerBoxType.OBSIDIAN),
DIRT(184, 184, ResourceList.DIRT,IronShulkerBoxType.DIRT);
//@formatter:on
private int xSize;

View File

@ -300,9 +300,12 @@ public class BlockIronShulkerBox extends Block
public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player)
{
TileEntityIronShulkerBox tileentityironshulkerbox = (TileEntityIronShulkerBox) worldIn.getTileEntity(pos);
if (tileentityironshulkerbox != null) {
tileentityironshulkerbox.setDestroyedByCreativePlayer(player.capabilities.isCreativeMode);
tileentityironshulkerbox.fillWithLoot(player);
} else {
// We don't have any drops here since the tile entity is null
}
}
/**

View File

@ -18,6 +18,7 @@ import cpw.mods.ironchest.common.tileentity.shulker.TileEntityGoldShulkerBox;
import cpw.mods.ironchest.common.tileentity.shulker.TileEntityIronShulkerBox;
import cpw.mods.ironchest.common.tileentity.shulker.TileEntityObsidianShulkerBox;
import cpw.mods.ironchest.common.tileentity.shulker.TileEntitySilverShulkerBox;
import cpw.mods.ironchest.common.tileentity.shulker.TileEntityDirtShulkerBox;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.EnumDyeColor;
@ -33,6 +34,7 @@ public enum IronShulkerBoxType implements IStringSerializable
SILVER(72, 9, false, "_silver.png", TileEntitySilverShulkerBox.class, 184, 238),
CRYSTAL(108, 12, true, "_crystal.png", TileEntityCrystalShulkerBox.class, 238, 256),
OBSIDIAN(108, 12, false, "_obsidian.png", TileEntityObsidianShulkerBox.class, 238, 256),
DIRT(1, 1, false, "_dirt.png", TileEntityDirtShulkerBox.class, 184, 184),
VANILLA(0, 0, false, "", null, 0, 0);
//@formatter:on
@ -145,6 +147,8 @@ public enum IronShulkerBoxType implements IStringSerializable
return new TileEntityCrystalShulkerBox(colorIn);
case OBSIDIAN:
return new TileEntityObsidianShulkerBox(colorIn);
case DIRT:
return new TileEntityDirtShulkerBox(colorIn);
default:
return null;
}

View File

@ -38,6 +38,12 @@ public class ContainerIronShulkerBox extends Container
}
protected void layoutContainer(IInventory playerInventory, IInventory shulkerBoxInventory, IronShulkerBoxType type, int xSize, int ySize)
{
if (type == IronShulkerBoxType.DIRT)
{
this.addSlotToContainer(type.makeSlot(shulkerBoxInventory, 0, 12 + 4 * 18, 8 + 2 * 18));
}
else
{
for (int chestRow = 0; chestRow < type.getRowCount(); chestRow++)
{
@ -46,6 +52,7 @@ public class ContainerIronShulkerBox extends Container
this.addSlotToContainer(type.makeSlot(shulkerBoxInventory, chestCol + chestRow * type.rowLength, 12 + chestCol * 18, 8 + chestRow * 18));
}
}
}
int leftCol = (xSize - 162) / 2 + 1;

View File

@ -0,0 +1,29 @@
/*******************************************************************************
* Copyright (c) 2012 cpw.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
* <p>
* Contributors:
* cpw - initial API and implementation
******************************************************************************/
package cpw.mods.ironchest.common.tileentity.shulker;
import javax.annotation.Nullable;
import cpw.mods.ironchest.common.blocks.shulker.IronShulkerBoxType;
import net.minecraft.item.EnumDyeColor;
public class TileEntityDirtShulkerBox extends TileEntityIronShulkerBox
{
public TileEntityDirtShulkerBox()
{
this(null);
}
public TileEntityDirtShulkerBox(@Nullable EnumDyeColor colorIn)
{
super(colorIn, IronShulkerBoxType.DIRT);
}
}

View File

@ -53,6 +53,12 @@
"particle":"minecraft:blocks/shulker_top_black",
"texture":"minecraft:entity/shulker/shulker_black"
}
},
"dirt": {
"textures": {
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/shulker/black/shulker_black_dirt"
}
}
}
}

View File

@ -53,6 +53,12 @@
"particle":"minecraft:blocks/shulker_top_blue",
"texture":"minecraft:entity/shulker/shulker_blue"
}
},
"dirt":{
"textures": {
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/shulker/blue/shulker_blue_dirt"
}
}
}
}

View File

@ -53,6 +53,12 @@
"particle":"minecraft:blocks/shulker_top_brown",
"texture":"minecraft:entity/shulker/shulker_brown"
}
},
"dirt":{
"textures": {
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/shulker/brown/shulker_brown_dirt"
}
}
}
}

View File

@ -53,6 +53,12 @@
"particle":"minecraft:blocks/shulker_top_cyan",
"texture":"minecraft:entity/shulker/shulker_cyan"
}
},
"dirt":{
"textures": {
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/shulker/cyan/shulker_cyan_dirt"
}
}
}
}

View File

@ -53,6 +53,12 @@
"particle":"minecraft:blocks/shulker_top_gray",
"texture":"minecraft:entity/shulker/shulker_gray"
}
},
"dirt":{
"textures": {
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/shulker/gray/shulker_gray_dirt"
}
}
}
}

View File

@ -53,6 +53,12 @@
"particle":"minecraft:blocks/shulker_top_green",
"texture":"minecraft:entity/shulker/shulker_green"
}
},
"dirt":{
"textures": {
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/shulker/green/shulker_green_dirt"
}
}
}
}

View File

@ -53,6 +53,12 @@
"particle":"minecraft:blocks/shulker_top_light_blue",
"texture":"minecraft:entity/shulker/shulker_light_blue"
}
},
"dirt":{
"textures": {
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/shulker/light_blue/shulker_light_blue_dirt"
}
}
}
}

View File

@ -53,6 +53,12 @@
"particle":"minecraft:blocks/shulker_top_lime",
"texture":"minecraft:entity/shulker/shulker_lime"
}
},
"dirt":{
"textures": {
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/shulker/lime/shulker_lime_dirt"
}
}
}
}

View File

@ -53,6 +53,12 @@
"particle":"minecraft:blocks/shulker_top_magenta",
"texture":"minecraft:entity/shulker/shulker_magenta"
}
},
"dirt":{
"textures": {
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/shulker/magenta/shulker_magenta_dirt"
}
}
}
}

View File

@ -53,6 +53,12 @@
"particle":"minecraft:blocks/shulker_top_orange",
"texture":"minecraft:entity/shulker/shulker_orange"
}
},
"dirt":{
"textures": {
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/shulker/orange/shulker_orange_dirt"
}
}
}
}

View File

@ -53,6 +53,12 @@
"particle":"minecraft:blocks/shulker_top_pink",
"texture":"minecraft:entity/shulker/shulker_pink"
}
},
"dirt":{
"textures": {
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/shulker/pink/shulker_pink_dirt"
}
}
}
}

View File

@ -53,6 +53,12 @@
"particle":"minecraft:blocks/shulker_top_purple",
"texture":"minecraft:entity/shulker/shulker_purple"
}
},
"dirt":{
"textures": {
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/shulker/purple/shulker_purple_dirt"
}
}
}
}

View File

@ -53,6 +53,12 @@
"particle":"minecraft:blocks/shulker_top_red",
"texture":"minecraft:entity/shulker/shulker_red"
}
},
"dirt":{
"textures": {
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/shulker/red/shulker_red_dirt"
}
}
}
}

View File

@ -53,6 +53,12 @@
"particle":"minecraft:blocks/shulker_top_silver",
"texture":"minecraft:entity/shulker/shulker_silver"
}
},
"dirt":{
"textures": {
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/shulker/silver/shulker_silver_dirt"
}
}
}
}

View File

@ -53,6 +53,12 @@
"particle":"minecraft:blocks/shulker_top_white",
"texture":"minecraft:entity/shulker/shulker_white"
}
},
"dirt":{
"textures": {
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/shulker/white/shulker_white_dirt"
}
}
}
}

View File

@ -53,6 +53,12 @@
"particle":"minecraft:blocks/shulker_top_yellow",
"texture":"minecraft:entity/shulker/shulker_yellow"
}
},
"dirt":{
"textures": {
"particle": "minecraft:blocks/dirt",
"texture": "ironchest:model/shulker/yellow/shulker_yellow_dirt"
}
}
}
}

View File

@ -151,6 +151,23 @@ tile.ironchest.shulker_box.obsidian.green.name=Green Obsidian Shulker Box
tile.ironchest.shulker_box.obsidian.red.name=Red Obsidian Shulker Box
tile.ironchest.shulker_box.obsidian.black.name=Black Obsidian Shulker Box
tile.ironchest.shulker_box.dirt.white.name=White Dirt Shulker Box
tile.ironchest.shulker_box.dirt.orange.name=Orange Dirt Shulker Box
tile.ironchest.shulker_box.dirt.magenta.name=Magenta Dirt Shulker Box
tile.ironchest.shulker_box.dirt.light_blue.name=Light Blue Dirt Shulker Box
tile.ironchest.shulker_box.dirt.yellow.name=Yellow Dirt Shulker Box
tile.ironchest.shulker_box.dirt.lime.name=Lime Dirt Shulker Box
tile.ironchest.shulker_box.dirt.pink.name=Pink Dirt Shulker Box
tile.ironchest.shulker_box.dirt.gray.name=Gray Dirt Shulker Box
tile.ironchest.shulker_box.dirt.silver.name=Silver Dirt Shulker Box
tile.ironchest.shulker_box.dirt.cyan.name=Cyan Dirt Shulker Box
tile.ironchest.shulker_box.dirt.purple.name=Purple Dirt Shulker Box
tile.ironchest.shulker_box.dirt.blue.name=Blue Dirt Shulker Box
tile.ironchest.shulker_box.dirt.brown.name=Brown Dirt Shulker Box
tile.ironchest.shulker_box.dirt.green.name=Green Dirt Shulker Box
tile.ironchest.shulker_box.dirt.red.name=Red Dirt Shulker Box
tile.ironchest.shulker_box.dirt.black.name=Black Dirt Shulker Box
item.ironchest.shulker_box.iron_gold.name=Iron to Gold Shulker Box Upgrade
item.ironchest.shulker_box.iron_gold.tooltip=Used to upgrade a Iron Shulker Box to a Gold Shulker Box\nThe color of the Shulker Box will stay the same.
item.ironchest.shulker_box.gold_diamond.name=Gold to Diamond Shulker Box Upgrade

View File

@ -0,0 +1,20 @@
{
"type": "ironchest:shulker_box",
"pattern": [
"MMM",
"MSM",
"MMM"
],
"key": {
"M": {
"item": "#DIRT"
},
"S": {
"item": "minecraft:black_shulker_box"
}
},
"result": {
"item": "ironchest:iron_shulker_box_black",
"data": 7
}
}

View File

@ -0,0 +1,20 @@
{
"type": "ironchest:shulker_box",
"pattern": [
"MMM",
"MSM",
"MMM"
],
"key": {
"M": {
"item": "#DIRT"
},
"S": {
"item": "minecraft:blue_shulker_box"
}
},
"result": {
"item": "ironchest:iron_shulker_box_blue",
"data": 7
}
}

View File

@ -0,0 +1,20 @@
{
"type": "ironchest:shulker_box",
"pattern": [
"MMM",
"MSM",
"MMM"
],
"key": {
"M": {
"item": "#DIRT"
},
"S": {
"item": "minecraft:brown_shulker_box"
}
},
"result": {
"item": "ironchest:iron_shulker_box_brown",
"data": 7
}
}

View File

@ -0,0 +1,20 @@
{
"type": "ironchest:shulker_box",
"pattern": [
"MMM",
"MSM",
"MMM"
],
"key": {
"M": {
"item": "#DIRT"
},
"S": {
"item": "minecraft:cyan_shulker_box"
}
},
"result": {
"item": "ironchest:iron_shulker_box_cyan",
"data": 7
}
}

View File

@ -0,0 +1,20 @@
{
"type": "ironchest:shulker_box",
"pattern": [
"MMM",
"MSM",
"MMM"
],
"key": {
"M": {
"item": "#DIRT"
},
"S": {
"item": "minecraft:gray_shulker_box"
}
},
"result": {
"item": "ironchest:iron_shulker_box_gray",
"data": 7
}
}

View File

@ -0,0 +1,20 @@
{
"type": "ironchest:shulker_box",
"pattern": [
"MMM",
"MSM",
"MMM"
],
"key": {
"M": {
"item": "#DIRT"
},
"S": {
"item": "minecraft:green_shulker_box"
}
},
"result": {
"item": "ironchest:iron_shulker_box_green",
"data": 7
}
}

View File

@ -0,0 +1,20 @@
{
"type": "ironchest:shulker_box",
"pattern": [
"MMM",
"MSM",
"MMM"
],
"key": {
"M": {
"item": "#DIRT"
},
"S": {
"item": "minecraft:light_blue_shulker_box"
}
},
"result": {
"item": "ironchest:iron_shulker_box_light_blue",
"data": 7
}
}

View File

@ -0,0 +1,20 @@
{
"type": "ironchest:shulker_box",
"pattern": [
"MMM",
"MSM",
"MMM"
],
"key": {
"M": {
"item": "#DIRT"
},
"S": {
"item": "minecraft:lime_shulker_box"
}
},
"result": {
"item": "ironchest:iron_shulker_box_lime",
"data": 7
}
}

View File

@ -0,0 +1,20 @@
{
"type": "ironchest:shulker_box",
"pattern": [
"MMM",
"MSM",
"MMM"
],
"key": {
"M": {
"item": "#DIRT"
},
"S": {
"item": "minecraft:magenta_shulker_box"
}
},
"result": {
"item": "ironchest:iron_shulker_box_magenta",
"data": 7
}
}

View File

@ -0,0 +1,20 @@
{
"type": "ironchest:shulker_box",
"pattern": [
"MMM",
"MSM",
"MMM"
],
"key": {
"M": {
"item": "#DIRT"
},
"S": {
"item": "minecraft:orange_shulker_box"
}
},
"result": {
"item": "ironchest:iron_shulker_box_orange",
"data": 7
}
}

View File

@ -0,0 +1,20 @@
{
"type": "ironchest:shulker_box",
"pattern": [
"MMM",
"MSM",
"MMM"
],
"key": {
"M": {
"item": "#DIRT"
},
"S": {
"item": "minecraft:pink_shulker_box"
}
},
"result": {
"item": "ironchest:iron_shulker_box_pink",
"data": 7
}
}

View File

@ -0,0 +1,20 @@
{
"type": "ironchest:shulker_box",
"pattern": [
"MMM",
"MSM",
"MMM"
],
"key": {
"M": {
"item": "#DIRT"
},
"S": {
"item": "minecraft:purple_shulker_box"
}
},
"result": {
"item": "ironchest:iron_shulker_box_purple",
"data": 7
}
}

View File

@ -0,0 +1,20 @@
{
"type": "ironchest:shulker_box",
"pattern": [
"MMM",
"MSM",
"MMM"
],
"key": {
"M": {
"item": "#DIRT"
},
"S": {
"item": "minecraft:red_shulker_box"
}
},
"result": {
"item": "ironchest:iron_shulker_box_red",
"data": 7
}
}

View File

@ -0,0 +1,20 @@
{
"type": "ironchest:shulker_box",
"pattern": [
"MMM",
"MSM",
"MMM"
],
"key": {
"M": {
"item": "#DIRT"
},
"S": {
"item": "minecraft:gray_shulker_box"
}
},
"result": {
"item": "ironchest:iron_shulker_box_gray",
"data": 7
}
}

View File

@ -0,0 +1,20 @@
{
"type": "ironchest:shulker_box",
"pattern": [
"MMM",
"MSM",
"MMM"
],
"key": {
"M": {
"item": "#DIRT"
},
"S": {
"item": "minecraft:white_shulker_box"
}
},
"result": {
"item": "ironchest:iron_shulker_box_white",
"data": 7
}
}

View File

@ -0,0 +1,20 @@
{
"type": "ironchest:shulker_box",
"pattern": [
"MMM",
"MSM",
"MMM"
],
"key": {
"M": {
"item": "#DIRT"
},
"S": {
"item": "minecraft:yellow_shulker_box"
}
},
"result": {
"item": "ironchest:iron_shulker_box_yellow",
"data": 7
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB