updated forge hammer model and texture
This commit is contained in:
@@ -77,7 +77,7 @@ public class Anvil extends CustomContainerFacing {
|
|||||||
// ***************************************************************************** //
|
// ***************************************************************************** //
|
||||||
// Crafting Anvil Recipes
|
// Crafting Anvil Recipes
|
||||||
// ***************************************************************************** //
|
// ***************************************************************************** //
|
||||||
if(pItem.getItem() == PrimalItems.STONE_GALLAGHER){
|
if((pItem.getItem().equals(PrimalItems.STONE_GALLAGHER)) || (pItem.getItem() == ModItems.forgehammer)){
|
||||||
Integer[] tempArray = new Integer[25];
|
Integer[] tempArray = new Integer[25];
|
||||||
for(int i=0; i < 25 ; i++){
|
for(int i=0; i < 25 ; i++){
|
||||||
if(!tile.getSlotStack(i).isEmpty()){
|
if(!tile.getSlotStack(i).isEmpty()){
|
||||||
@@ -86,6 +86,12 @@ public class Anvil extends CustomContainerFacing {
|
|||||||
}
|
}
|
||||||
AnvilCrafting recipe = AnvilCrafting.getRecipe(tempArray);
|
AnvilCrafting recipe = AnvilCrafting.getRecipe(tempArray);
|
||||||
if(recipe != null) {
|
if(recipe != null) {
|
||||||
|
if(pItem.getItem().equals(PrimalItems.STONE_GALLAGHER)) {
|
||||||
|
pItem.damageItem(15, player);
|
||||||
|
}
|
||||||
|
if(pItem.getItem().equals(ModItems.forgehammer)) {
|
||||||
|
pItem.damageItem(1, player);
|
||||||
|
}
|
||||||
CommonUtils.spawnItemEntityFromWorld(world, pos, recipe.getOutput());
|
CommonUtils.spawnItemEntityFromWorld(world, pos, recipe.getOutput());
|
||||||
world.playEvent(1031, pos, 0);
|
world.playEvent(1031, pos, 0);
|
||||||
for (int i = 0; i < tile.getSlotListSize(); i++) {
|
for (int i = 0; i < tile.getSlotListSize(); i++) {
|
||||||
|
|||||||
@@ -100,33 +100,37 @@ public class ModBlocks {
|
|||||||
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
//CommonUtils.spawnItemEntityFromWorld(world, pos, new ItemStack(ModBlocks.stoneanvil, 1));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (pItem.equals(PrimalItems.STONE_GALLAGHER) && world.getBlockState(belowPos).getBlock().equals(ModBlocks.stoneanvil)) {
|
if (pItem.equals(PrimalItems.STONE_GALLAGHER) || pItem.equals(ModItems.forgehammer)) {
|
||||||
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
if(world.getBlockState(belowPos).getBlock().equals(ModBlocks.stoneanvil)) {
|
||||||
|
|
||||||
|
|
||||||
if (tile.getSlotStack(6).isEmpty() &&
|
TileAnvil tile = (TileAnvil) world.getTileEntity(belowPos);
|
||||||
tile.getSlotStack(7).isEmpty() &&
|
|
||||||
tile.getSlotStack(8).isEmpty() &&
|
|
||||||
tile.getSlotStack(11).isEmpty() &&
|
if (tile.getSlotStack(6).isEmpty() &&
|
||||||
tile.getSlotStack(12).isEmpty() &&
|
tile.getSlotStack(7).isEmpty() &&
|
||||||
tile.getSlotStack(13).isEmpty() &&
|
tile.getSlotStack(8).isEmpty() &&
|
||||||
tile.getSlotStack(16).isEmpty() &&
|
tile.getSlotStack(11).isEmpty() &&
|
||||||
tile.getSlotStack(17).isEmpty() &&
|
tile.getSlotStack(12).isEmpty() &&
|
||||||
tile.getSlotStack(18).isEmpty()
|
tile.getSlotStack(13).isEmpty() &&
|
||||||
) {
|
tile.getSlotStack(16).isEmpty() &&
|
||||||
player.swingArm(hand);
|
tile.getSlotStack(17).isEmpty() &&
|
||||||
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
tile.getSlotStack(18).isEmpty()
|
||||||
tile.setSlotStack(6, new ItemStack(ModItems.ironchunkhot, 1));
|
) {
|
||||||
tile.setSlotStack(7, new ItemStack(ModItems.ironchunkhot, 1));
|
player.swingArm(hand);
|
||||||
tile.setSlotStack(8, new ItemStack(ModItems.ironchunkhot, 1));
|
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
||||||
tile.setSlotStack(11, new ItemStack(ModItems.ironchunkhot, 1));
|
tile.setSlotStack(6, new ItemStack(ModItems.ironchunkhot, 1));
|
||||||
tile.setSlotStack(12, new ItemStack(ModItems.ironchunkhot, 1));
|
tile.setSlotStack(7, new ItemStack(ModItems.ironchunkhot, 1));
|
||||||
tile.setSlotStack(13, new ItemStack(ModItems.ironchunkhot, 1));
|
tile.setSlotStack(8, new ItemStack(ModItems.ironchunkhot, 1));
|
||||||
tile.setSlotStack(16, new ItemStack(ModItems.ironchunkhot, 1));
|
tile.setSlotStack(11, new ItemStack(ModItems.ironchunkhot, 1));
|
||||||
tile.setSlotStack(17, new ItemStack(ModItems.ironchunkhot, 1));
|
tile.setSlotStack(12, new ItemStack(ModItems.ironchunkhot, 1));
|
||||||
tile.setSlotStack(18, new ItemStack(ModItems.ironchunkhot, 1));
|
tile.setSlotStack(13, new ItemStack(ModItems.ironchunkhot, 1));
|
||||||
world.playEvent(1031, pos, 0);
|
tile.setSlotStack(16, new ItemStack(ModItems.ironchunkhot, 1));
|
||||||
return true;
|
tile.setSlotStack(17, new ItemStack(ModItems.ironchunkhot, 1));
|
||||||
|
tile.setSlotStack(18, new ItemStack(ModItems.ironchunkhot, 1));
|
||||||
|
world.playEvent(1031, pos, 0);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -157,8 +157,8 @@ public class ModCrafting {
|
|||||||
//Makes a ForgeHammer
|
//Makes a ForgeHammer
|
||||||
AnvilCrafting.addRecipe(
|
AnvilCrafting.addRecipe(
|
||||||
new Integer[] {
|
new Integer[] {
|
||||||
1,1,1,1,0,
|
0,1,1,1,0,
|
||||||
0,0,1,0,0,
|
0,1,1,0,0,
|
||||||
0,0,1,0,0,
|
0,0,1,0,0,
|
||||||
0,0,1,0,0,
|
0,0,1,0,0,
|
||||||
0,0,1,0,0 },
|
0,0,1,0,0 },
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ public class ForgeHammer extends Item {
|
|||||||
public ForgeHammer(String unlocalizedName) {
|
public ForgeHammer(String unlocalizedName) {
|
||||||
setUnlocalizedName(unlocalizedName);
|
setUnlocalizedName(unlocalizedName);
|
||||||
this.setRegistryName(unlocalizedName);
|
this.setRegistryName(unlocalizedName);
|
||||||
//this.setMaxDamage(1000);
|
this.setMaxDamage(1000);
|
||||||
//this.setHasSubtypes(true); //This just says the item has metadata
|
//this.setHasSubtypes(true); //This just says the item has metadata
|
||||||
this.setMaxStackSize(1);
|
this.setMaxStackSize(1);
|
||||||
this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||||
|
|||||||
@@ -1,86 +1,107 @@
|
|||||||
{
|
{
|
||||||
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
||||||
"textures": {
|
"textures": {
|
||||||
"particle": "forgecraft:blocks/iron_ingot",
|
"particle": "forgecraft:items/forgehammer_iron",
|
||||||
"texture": "forgecraft:blocks/anvil_base"
|
"texture": "forgecraft:items/forgehammer_iron"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
{
|
{
|
||||||
"__comment": "Cube1",
|
"__comment": "Cube1",
|
||||||
"from": [ 7, 0, 7 ],
|
"from": [ 7, 0, 7 ],
|
||||||
"to": [ 9, 15.5, 9 ],
|
"to": [ 9, 13, 9 ],
|
||||||
"faces": {
|
"faces": {
|
||||||
"down": { "uv": [ 7, 7, 9, 9 ], "texture": "#texture" },
|
"down": { "uv": [ 0, 0, 2, 2 ], "texture": "#texture" },
|
||||||
"up": { "uv": [ 7, 7, 9, 9 ], "texture": "#texture" },
|
"up": { "uv": [ 0, 0, 2, 2 ], "texture": "#texture" },
|
||||||
"north": { "uv": [ 7, 0.5, 9, 16 ], "texture": "#texture" },
|
"north": { "uv": [ 0, 0, 2, 13 ], "texture": "#texture" },
|
||||||
"south": { "uv": [ 7, 0.5, 9, 16 ], "texture": "#texture" },
|
"south": { "uv": [ 0, 0, 2, 13 ], "texture": "#texture" },
|
||||||
"west": { "uv": [ 7, 0.5, 9, 16 ], "texture": "#texture" },
|
"west": { "uv": [ 0, 0, 2, 13 ], "texture": "#texture" },
|
||||||
"east": { "uv": [ 7, 0.5, 9, 16 ], "texture": "#texture" }
|
"east": { "uv": [ 0, 0, 2, 13 ], "texture": "#texture" }
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__comment": "Cube2",
|
|
||||||
"from": [ 7, 13.5, 9 ],
|
|
||||||
"to": [ 9, 15.5, 10.5 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 7, 5.5, 9, 7 ], "texture": "#texture" },
|
|
||||||
"up": { "uv": [ 7, 9, 9, 10.5 ], "texture": "#texture" },
|
|
||||||
"north": { "uv": [ 7, 0.5, 9, 2.5 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 7, 0.5, 9, 2.5 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 9, 0.5, 10.5, 2.5 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 5.5, 0.5, 7, 2.5 ], "texture": "#texture" }
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__comment": "Cube3",
|
"__comment": "Cube3",
|
||||||
"from": [ 7, 13.5, 4.5 ],
|
"from": [ 6.5, 13, 5 ],
|
||||||
"to": [ 9, 15.5, 7 ],
|
"to": [ 9.5, 16, 10 ],
|
||||||
"faces": {
|
"faces": {
|
||||||
"down": { "uv": [ 7, 9, 9, 11.5 ], "texture": "#texture" },
|
"down": { "uv": [ 13, 0, 16, 5 ], "texture": "#texture" },
|
||||||
"up": { "uv": [ 7, 4.5, 9, 7 ], "texture": "#texture" },
|
"up": { "uv": [ 13, 0, 16, 5 ], "texture": "#texture" },
|
||||||
"north": { "uv": [ 7, 0.5, 9, 2.5 ], "texture": "#texture" },
|
"north": { "uv": [ 13, 0, 16, 3 ], "texture": "#texture" },
|
||||||
"south": { "uv": [ 7, 0.5, 9, 2.5 ], "texture": "#texture" },
|
"south": { "uv": [ 13, 0, 16, 3 ], "texture": "#texture" },
|
||||||
"west": { "uv": [ 4.5, 0.5, 7, 2.5 ], "texture": "#texture" },
|
"west": { "uv": [ 13, 0, 16, 5 ], "texture": "#texture" },
|
||||||
"east": { "uv": [ 9, 0.5, 11.5, 2.5 ], "texture": "#texture" }
|
"east": { "uv": [ 13, 0, 16, 5 ], "texture": "#texture" }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__comment": "Cube5",
|
"__comment": "PlaneY18",
|
||||||
"from": [ 6.5, 13.5, 6.5 ],
|
"from": [ 6.5, 16, 10 ],
|
||||||
"to": [ 7, 15.5, 9.5 ],
|
"to": [ 9.5, 16.001, 11.5 ],
|
||||||
|
"rotation": { "origin": [ 6.5, 16, 10 ], "axis": "x", "angle": 45 },
|
||||||
"faces": {
|
"faces": {
|
||||||
"down": { "uv": [ 6.5, 6.5, 7, 9.5 ], "texture": "#texture" },
|
"down": { "uv": [ 7, 3, 10, 4 ], "texture": "#texture" },
|
||||||
"up": { "uv": [ 6.5, 6.5, 7, 9.5 ], "texture": "#texture" },
|
"up": { "uv": [ 7, 3, 10, 4 ], "texture": "#texture" }
|
||||||
"north": { "uv": [ 9, 0.5, 9.5, 2.5 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 6.5, 0.5, 7, 2.5 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 6.5, 0.5, 9.5, 2.5 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 6.5, 0.5, 9.5, 2.5 ], "texture": "#texture" }
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__comment": "Cube5",
|
"__comment": "PlaneY19",
|
||||||
"from": [ 9, 13.5, 6.5 ],
|
"from": [ 6.5, 13, 10 ],
|
||||||
"to": [ 9.5, 15.5, 9.5 ],
|
"to": [ 9.5, 13.001, 11.5 ],
|
||||||
|
"rotation": { "origin": [ 6.5, 13, 10 ], "axis": "x", "angle": -45 },
|
||||||
"faces": {
|
"faces": {
|
||||||
"down": { "uv": [ 6.5, 6.5, 7, 9.5 ], "texture": "#texture" },
|
"down": { "uv": [ 7, 3, 10, 4 ], "texture": "#texture" },
|
||||||
"up": { "uv": [ 6.5, 6.5, 7, 9.5 ], "texture": "#texture" },
|
"up": { "uv": [ 7, 7, 10, 8 ], "texture": "#texture" }
|
||||||
"north": { "uv": [ 9, 0, 9.5, 2 ], "texture": "#texture" },
|
|
||||||
"south": { "uv": [ 6.5, 0, 7, 2 ], "texture": "#texture" },
|
|
||||||
"west": { "uv": [ 6.5, 0, 9.5, 2 ], "texture": "#texture" },
|
|
||||||
"east": { "uv": [ 6.5, 0, 9.5, 2 ], "texture": "#texture" }
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__comment": "Cube7",
|
"__comment": "Cube20",
|
||||||
"from": [ 7, 15.5, 6.5 ],
|
"from": [ 6.5, 14, 10 ],
|
||||||
"to": [ 9, 16, 9.5 ],
|
"to": [ 9.5, 15, 11 ],
|
||||||
"faces": {
|
"faces": {
|
||||||
"down": { "uv": [ 7, 6.5, 9, 9.5 ], "texture": "#texture" },
|
"down": { "uv": [ 8, 2, 11, 3 ], "texture": "#texture" },
|
||||||
"up": { "uv": [ 7, 6.5, 9, 9.5 ], "texture": "#texture" },
|
"up": { "uv": [ 8, 4, 11, 5 ], "texture": "#texture" },
|
||||||
"north": { "uv": [ 7, 0, 9, 0.5 ], "texture": "#texture" },
|
"north": { "uv": [ 7, 3, 10, 4 ], "texture": "#texture" },
|
||||||
"south": { "uv": [ 7, 0, 9, 0.5 ], "texture": "#texture" },
|
"south": { "uv": [ 8, 1, 11, 2 ], "texture": "#texture" },
|
||||||
"west": { "uv": [ 6.5, 0, 9.5, 0.5 ], "texture": "#texture" },
|
"west": { "uv": [ 10, 1, 11, 2 ], "texture": "#texture" },
|
||||||
"east": { "uv": [ 6.5, 0, 9.5, 0.5 ], "texture": "#texture" }
|
"east": { "uv": [ 7, 2, 8, 3 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "PlaneX21",
|
||||||
|
"from": [ 6.5, 14.5, 10 ],
|
||||||
|
"to": [ 6.501, 16, 11.5 ],
|
||||||
|
"rotation": { "origin": [ 6.5, 16, 10 ], "axis": "x", "angle": 45 },
|
||||||
|
"faces": {
|
||||||
|
"west": { "uv": [ 9, 6, 10, 7 ], "texture": "#texture", "rotation": 90 },
|
||||||
|
"east": { "uv": [ 5, 6, 6, 7 ], "texture": "#texture", "rotation": 270 }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "PlaneX21",
|
||||||
|
"from": [ 9.5, 14.5, 10 ],
|
||||||
|
"to": [ 9.501, 16, 11.5 ],
|
||||||
|
"rotation": { "origin": [ 9.5, 16, 10 ], "axis": "x", "angle": 45 },
|
||||||
|
"faces": {
|
||||||
|
"west": { "uv": [ 8, 7, 9, 8 ], "texture": "#texture", "rotation": 90 },
|
||||||
|
"east": { "uv": [ 9, 4, 10, 5 ], "texture": "#texture", "rotation": 270 }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "PlaneX24",
|
||||||
|
"from": [ 6.5, 13, 10 ],
|
||||||
|
"to": [ 6.501, 14, 11.5 ],
|
||||||
|
"rotation": { "origin": [ 6.5, 13, 10 ], "axis": "x", "angle": -45 },
|
||||||
|
"faces": {
|
||||||
|
"west": { "uv": [ 9, 2, 10, 3 ], "texture": "#texture" },
|
||||||
|
"east": { "uv": [ 6, 1.5, 7, 2.5 ], "texture": "#texture" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__comment": "PlaneX24",
|
||||||
|
"from": [ 9.5, 13, 10 ],
|
||||||
|
"to": [ 9.501, 14, 11.5 ],
|
||||||
|
"rotation": { "origin": [ 9.5, 13, 10 ], "axis": "x", "angle": -45 },
|
||||||
|
"faces": {
|
||||||
|
"west": { "uv": [ 7, 3, 8, 4 ], "texture": "#texture" },
|
||||||
|
"east": { "uv": [ 7, 3, 8, 4 ], "texture": "#texture" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -92,8 +113,9 @@
|
|||||||
"translation": [ 0, 4.1, 0 ]
|
"translation": [ 0, 4.1, 0 ]
|
||||||
},
|
},
|
||||||
"gui": {
|
"gui": {
|
||||||
"rotation": [ 0, 90, 0 ],
|
"rotation": [ -90, 135, 90 ],
|
||||||
"scale": [ 0.9, 0.9, 0.9 ]
|
"translation": [ -0.5, -0.5, 0 ],
|
||||||
|
"scale": [ 0.95, 0.95, 0.95 ]
|
||||||
},
|
},
|
||||||
"ground": {
|
"ground": {
|
||||||
"rotation": [ 90, 90, 0 ]
|
"rotation": [ 90, 90, 0 ]
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 474 B |
Reference in New Issue
Block a user