updating more casting and crucible shit
This commit is contained in:
@@ -67,13 +67,15 @@ public class CastingForm extends CustomContainerFacing implements CastingFormHan
|
||||
SlottedTongs tongs = (SlottedTongs) pItem.getItem();
|
||||
if(tongs.getSlotList().get(0).getItem().equals(Item.getItemFromBlock(ModBlocks.nbtCrucible))) {
|
||||
ItemStack tongsStack = tongs.getSlotList().get(0).copy();
|
||||
NBTTagCompound tag = tongsStack.getSubCompound("BlockEntityTag").copy();
|
||||
NBTTagCompound tag = tongsStack.getTagCompound().copy();
|
||||
if(tag != null){
|
||||
NonNullList<ItemStack> ingList = NonNullList.<ItemStack>withSize(5, ItemStack.EMPTY);
|
||||
ItemStackHelper.loadAllItems(tag, ingList);
|
||||
NonNullList<ItemStack> ingListEmpty = NonNullList.<ItemStack>withSize(5, ItemStack.EMPTY);
|
||||
ItemStackHelper.loadAllItems(tag.getCompoundTag("BlockEntityTag"), ingList);
|
||||
//getSubCompound("BlockEntityTag")
|
||||
CrucibleCrafting recipe = CrucibleCrafting.getRecipe(ingList.get(0), ingList.get(1), ingList.get(2), ingList.get(3), ingList.get(4));
|
||||
if(recipe != null){
|
||||
if(tag.getBoolean("status") && tag.getInteger("hot") == 15){
|
||||
if(tag.getCompoundTag("BlockEntityTag").getBoolean("status") && tag.getCompoundTag("BlockEntityTag").getInteger("hot") == 15){
|
||||
Item[] tempArray = new Item[25];
|
||||
for(int i=0; i<25; i++){
|
||||
tempArray[i] = tile.getSlotStack(i).getItem();
|
||||
@@ -81,10 +83,13 @@ public class CastingForm extends CustomContainerFacing implements CastingFormHan
|
||||
CastingCrafting casting = CastingCrafting.getRecipe(tempArray);
|
||||
if(casting != null){
|
||||
CommonUtils.spawnItemEntityFromWorld(world, pos, casting.getOutput());
|
||||
tag.getCompoundTag("BlockEntityTag").setBoolean("status", false);
|
||||
tag.getCompoundTag("BlockEntityTag").setInteger("hot", 0);
|
||||
ItemStackHelper.loadAllItems(tag, ingListEmpty);
|
||||
tongs.getSlotList().get(0).setTagCompound(tag);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,6 +108,7 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider {
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.LAYERS, 0), 2);
|
||||
tile.setHot(0);
|
||||
tile.setStatus(false);
|
||||
//tile.setDrops(ItemStack.EMPTY);
|
||||
tile.update();
|
||||
tile.markDirty();
|
||||
return true;
|
||||
@@ -123,6 +124,7 @@ public class NBTCrucible extends BlockContainer implements ITileEntityProvider {
|
||||
world.setBlockState(pos, state.withProperty(PrimalAPI.States.LAYERS, 0), 2);
|
||||
tile.setHot(0);
|
||||
tile.setStatus(false);
|
||||
//tile.setDrops(ItemStack.EMPTY);
|
||||
tile.update();
|
||||
tile.markDirty();
|
||||
return true;
|
||||
|
||||
@@ -14,23 +14,16 @@ public class CastingCrafting {
|
||||
// ***************************************************************************** //
|
||||
// Recipe Handler AnvilCrafting
|
||||
// ***************************************************************************** //
|
||||
|
||||
private static ArrayList<CastingCrafting> castingRecipes = new ArrayList<>();
|
||||
|
||||
private Item[] input = new Item[25];
|
||||
|
||||
public String getUpgradeType() {
|
||||
return upgradeType;
|
||||
}
|
||||
|
||||
private String upgradeType;
|
||||
private ItemStack output;
|
||||
|
||||
|
||||
public CastingCrafting(Item[] input, ItemStack output){
|
||||
|
||||
this.input = input;
|
||||
this.output = output;
|
||||
//this.upgradeType = upgrade;
|
||||
}
|
||||
|
||||
// ***************************************************************************** //
|
||||
@@ -42,6 +35,10 @@ public class CastingCrafting {
|
||||
castingRecipes.add(new CastingCrafting(input, output));
|
||||
}
|
||||
|
||||
public static ArrayList<CastingCrafting> getCastingRecipes() {
|
||||
return castingRecipes;
|
||||
}
|
||||
|
||||
public static boolean isRecipe(Item[] array)
|
||||
{
|
||||
for(CastingCrafting recipe : castingRecipes) {
|
||||
|
||||
@@ -56,13 +56,11 @@ public class SlottedTongs extends Item implements IPickup, AnvilHandler{
|
||||
{
|
||||
SlottedTongs item = (SlottedTongs) stack.getItem();
|
||||
ItemStack slotStack = item.getSlotList().get(0);
|
||||
//TODO get the item name
|
||||
if (stack.getItem() instanceof SlottedTongs) {
|
||||
//System.out.println(slotStack.getTagCompound());
|
||||
if (slotStack.getItem() instanceof ItemNBTCrucible){
|
||||
if (slotStack.getItem() instanceof ItemNBTCrucible) {
|
||||
/***Render Empty Crucible***/
|
||||
if(item.getSlotList().get(0).getSubCompound("BlockEntityTag").getInteger("hot") == 0){
|
||||
return 0.0f;
|
||||
return 0.99f;
|
||||
}
|
||||
/***Render Level 1***/
|
||||
if(item.getSlotList().get(0).getSubCompound("BlockEntityTag").getInteger("hot") == 1){
|
||||
|
||||
@@ -59,7 +59,8 @@
|
||||
{"predicate": {"type": 0.43},"model": "forgecraft:item/slottedtongs/slottedtongs_43"},
|
||||
{"predicate": {"type": 0.44},"model": "forgecraft:item/slottedtongs/slottedtongs_44"},
|
||||
{"predicate": {"type": 0.45},"model": "forgecraft:item/slottedtongs/slottedtongs_45"},
|
||||
{"predicate": {"type": 0.46},"model": "forgecraft:item/slottedtongs/slottedtongs_46"}
|
||||
{"predicate": {"type": 0.46},"model": "forgecraft:item/slottedtongs/slottedtongs_46"},
|
||||
{"predicate": {"type": 0.99},"model": "forgecraft:item/slottedtongs/slottedtongs_99"}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"parent": "forgecraft:item/slottedtongs_crucible0",
|
||||
"textures": {
|
||||
"particle": "blocks/planks_oak",
|
||||
"texture": "blocks/planks_oak",
|
||||
"texture1": "forgecraft:blocks/stone_slab",
|
||||
"texture2": "forgecraft:blocks/stone_slab",
|
||||
"texture3": "forgecraft:blocks/dirty_sand"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,244 @@
|
||||
{
|
||||
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
||||
"textures": {
|
||||
"particle": "blocks/planks_oak",
|
||||
"texture": "blocks/planks_oak",
|
||||
"texture1": "blocks/stone_slab",
|
||||
"texture2": "blocks/stone_slab_hot",
|
||||
"texture3": "blocks/dirty_sand"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"__comment": "Cube1",
|
||||
"from": [ 4, 0, 0 ],
|
||||
"to": [ 5, 1, 3 ],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 4, 12, 5, 15 ], "texture": "#texture1" },
|
||||
"up": { "uv": [ 4, 1, 5, 4 ], "texture": "#texture1" },
|
||||
"north": { "uv": [ 11, 13, 12, 14 ], "texture": "#texture1" },
|
||||
"south": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture1" },
|
||||
"west": { "uv": [ 1, 14, 4, 15 ], "texture": "#texture1" },
|
||||
"east": { "uv": [ 12, 14, 15, 15 ], "texture": "#texture1" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube2",
|
||||
"from": [ 11, 0, 0 ],
|
||||
"to": [ 12, 1, 3 ],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 4, 12, 5, 15 ], "texture": "#texture1" },
|
||||
"up": { "uv": [ 4, 1, 5, 4 ], "texture": "#texture1" },
|
||||
"north": { "uv": [ 11, 13, 12, 14 ], "texture": "#texture1" },
|
||||
"south": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture1" },
|
||||
"west": { "uv": [ 1, 14, 4, 15 ], "texture": "#texture1" },
|
||||
"east": { "uv": [ 12, 14, 15, 15 ], "texture": "#texture1" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube3",
|
||||
"from": [ 4, 0, 3 ],
|
||||
"to": [ 5, 1, 10 ],
|
||||
"rotation": { "origin": [ 4, 0, 3 ], "axis": "y", "angle": 45 },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 4, 2, 5, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 4, 3, 5, 10 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 11, 15, 12, 16 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 4, 15, 5, 16 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 3, 15, 10, 16 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 7, 15, 14, 16 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube4",
|
||||
"from": [ 11, 0, 3 ],
|
||||
"to": [ 12, 1, 10 ],
|
||||
"rotation": { "origin": [ 12, 1, 3 ], "axis": "y", "angle": -45 },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 4, 2, 5, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 4, 3, 5, 10 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 11, 15, 12, 16 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 4, 15, 5, 16 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 3, 15, 10, 16 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 7, 15, 14, 16 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube5",
|
||||
"from": [ 6.5, 0, 7.5 ],
|
||||
"to": [ 7.5, 1, 16 ],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 6.5, 0, 7.5, 8.5 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 6.5, 7.5, 7.5, 16 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 8.5, 15, 9.5, 16 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 6.5, 15, 7.5, 16 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7.5, 15, 16, 16 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 0, 15, 8.5, 16 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube6",
|
||||
"from": [ 8.5, 0, 7.5 ],
|
||||
"to": [ 9.5, 1, 16 ],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 8.5, 0, 9.5, 8.5 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 8.5, 7.5, 9.5, 16 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 6.5, 15, 7.5, 16 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 8.5, 15, 9.5, 16 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7.5, 15, 16, 16 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 0, 15, 8.5, 16 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube16",
|
||||
"from": [ 5, -3, 2 ],
|
||||
"to": [ 11, 3, 3 ],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 5, 13, 11, 14 ], "texture": "#texture2" },
|
||||
"up": { "uv": [ 5, 2, 11, 3 ], "texture": "#texture2" },
|
||||
"north": { "uv": [ 5, 10, 11, 16 ], "texture": "#texture2" },
|
||||
"south": { "uv": [ 5, 10, 11, 16 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 2, 10, 3, 16 ], "texture": "#texture2" },
|
||||
"east": { "uv": [ 13, 10, 14, 16 ], "texture": "#texture2" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube17",
|
||||
"from": [ 5, -3, -3 ],
|
||||
"to": [ 11, 3, -2 ],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 5, 13, 11, 14 ], "texture": "#texture2" },
|
||||
"up": { "uv": [ 5, 2, 11, 3 ], "texture": "#texture2" },
|
||||
"north": { "uv": [ 5, 10, 11, 16 ], "texture": "#texture2" },
|
||||
"south": { "uv": [ 5, 10, 11, 16 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 2, 10, 3, 16 ], "texture": "#texture2" },
|
||||
"east": { "uv": [ 13, 10, 14, 16 ], "texture": "#texture2" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube18",
|
||||
"from": [ 5, -3, -2 ],
|
||||
"to": [ 6, 3, 2 ],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 5, 12, 6, 16 ], "texture": "#texture2" },
|
||||
"up": { "uv": [ 5, 0, 6, 4 ], "texture": "#texture2" },
|
||||
"north": { "uv": [ 10, 10, 11, 16 ], "texture": "#texture2" },
|
||||
"south": { "uv": [ 5, 10, 6, 16 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 0, 10, 4, 16 ], "texture": "#texture2" },
|
||||
"east": { "uv": [ 12, 10, 16, 16 ], "texture": "#texture2" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube19",
|
||||
"from": [ 10, -3, -2 ],
|
||||
"to": [ 11, 3, 2 ],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 5, 12, 6, 16 ], "texture": "#texture2" },
|
||||
"up": { "uv": [ 5, 0, 6, 4 ], "texture": "#texture2" },
|
||||
"north": { "uv": [ 10, 10, 11, 16 ], "texture": "#texture2" },
|
||||
"south": { "uv": [ 5, 10, 6, 16 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 0, 10, 4, 16 ], "texture": "#texture2" },
|
||||
"east": { "uv": [ 12, 10, 16, 16 ], "texture": "#texture2" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube20",
|
||||
"from": [ 5, -4, -3 ],
|
||||
"to": [ 11, -3, 3 ],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 5, 10, 11, 16 ], "texture": "#texture2" },
|
||||
"up": { "uv": [ 5, 0, 11, 6 ], "texture": "#texture2" },
|
||||
"north": { "uv": [ 5, 3, 11, 4 ], "texture": "#texture2" },
|
||||
"south": { "uv": [ 5, 3, 11, 4 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 0, 3, 6, 4 ], "texture": "#texture2" },
|
||||
"east": { "uv": [ 10, 3, 16, 4 ], "texture": "#texture2" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube21",
|
||||
"from": [ 4, 1, -2 ],
|
||||
"to": [ 5, 2, 2 ],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 4, 12, 5, 16 ], "texture": "#texture2" },
|
||||
"up": { "uv": [ 4, 0, 5, 4 ], "texture": "#texture2" },
|
||||
"north": { "uv": [ 11, 14, 12, 15 ], "texture": "#texture2" },
|
||||
"south": { "uv": [ 4, 14, 5, 15 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 0, 14, 4, 15 ], "texture": "#texture2" },
|
||||
"east": { "uv": [ 12, 14, 16, 15 ], "texture": "#texture2" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube22",
|
||||
"from": [ 11, 1, -2 ],
|
||||
"to": [ 12, 2, 2 ],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 4, 12, 5, 16 ], "texture": "#texture2", "rotation": 90 },
|
||||
"up": { "uv": [ 4, 0, 5, 4 ], "texture": "#texture2", "rotation": 270 },
|
||||
"north": { "uv": [ 12, 14, 16, 15 ], "texture": "#texture2" },
|
||||
"south": { "uv": [ 0, 14, 4, 15 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 11, 14, 12, 15 ], "texture": "#texture2" },
|
||||
"east": { "uv": [ 4, 14, 5, 15 ], "texture": "#texture2" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube23",
|
||||
"from": [ 6, 1, -4 ],
|
||||
"to": [ 10, 2, -3 ],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 4, 12, 5, 16 ], "texture": "#texture2", "rotation": 90 },
|
||||
"up": { "uv": [ 4, 0, 5, 4 ], "texture": "#texture2", "rotation": 270 },
|
||||
"north": { "uv": [ 12, 14, 16, 15 ], "texture": "#texture2" },
|
||||
"south": { "uv": [ 0, 14, 4, 15 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 11, 14, 12, 15 ], "texture": "#texture2" },
|
||||
"east": { "uv": [ 4, 14, 5, 15 ], "texture": "#texture2" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube24",
|
||||
"from": [ 6, 1, 3 ],
|
||||
"to": [ 10, 2, 4 ],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 4, 12, 5, 16 ], "texture": "#texture2", "rotation": 90 },
|
||||
"up": { "uv": [ 4, 0, 5, 4 ], "texture": "#texture2", "rotation": 270 },
|
||||
"north": { "uv": [ 12, 14, 16, 15 ], "texture": "#texture2" },
|
||||
"south": { "uv": [ 0, 14, 4, 15 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 11, 14, 12, 15 ], "texture": "#texture2" },
|
||||
"east": { "uv": [ 4, 14, 5, 15 ], "texture": "#texture2" }
|
||||
}
|
||||
}
|
||||
],
|
||||
"display": {
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [ 60, 0, 0 ],
|
||||
"translation": [ 0, 8.9, 3.7 ]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"translation": [ 0, 5.5, -7 ]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [ 90, 0, 0 ],
|
||||
"scale": [ 0.95, 0.95, 0.95 ]
|
||||
},
|
||||
"ground": {
|
||||
"translation": [ 0, 4, 0 ]
|
||||
},
|
||||
"fixed": {
|
||||
"rotation": [ 90, 0, 0 ],
|
||||
"translation": [ 0, 0, 8 ]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user