axe heads can be crafted normally, need to add code for ToolAxe
This commit is contained in:
@@ -211,7 +211,10 @@ public class Anvil extends CustomContainerFacing {
|
||||
if (hitz >= this.getNormalMin(z) && hitz <= this.getNormalMax(z)) {
|
||||
|
||||
if (pItem.getItem().equals(ModItems.stonetongs)) {
|
||||
if ((pItem.getTagCompound().getInteger("type") == 6) || (pItem.getTagCompound().getInteger("type") == 7) || (pItem.getTagCompound().getInteger("type") == 8)|| (pItem.getTagCompound().getInteger("type") == 0)) {
|
||||
if ((pItem.getTagCompound().getInteger("type") == 6) || (pItem.getTagCompound().getInteger("type") == 7) ||
|
||||
(pItem.getTagCompound().getInteger("type") == 8) ||
|
||||
(pItem.getTagCompound().getInteger("type") == 9) ||
|
||||
(pItem.getTagCompound().getInteger("type") == 0)) {
|
||||
|
||||
if (!tile.getSlotStack(counter).isEmpty()) {
|
||||
if (pItem.getTagCompound().getInteger("type") == 0) {
|
||||
@@ -249,6 +252,22 @@ public class Anvil extends CustomContainerFacing {
|
||||
tempStack.getTagCompound().setTag("tags", tags);
|
||||
tile.setSlotStack((counter), tempStack);
|
||||
|
||||
pItem.getTagCompound().setInteger("type", 0);
|
||||
pItem.getSubCompound("tags").setBoolean("hot", false);
|
||||
pItem.getSubCompound("tags").setBoolean("emerald", false);
|
||||
pItem.getSubCompound("tags").setInteger("diamond", 0);
|
||||
pItem.getSubCompound("tags").setInteger("redstone", 0);
|
||||
pItem.getSubCompound("tags").setInteger("lapis", 0);
|
||||
pItem.getSubCompound("tags").setInteger("modifiers", 0);
|
||||
return true;
|
||||
}
|
||||
if (pItem.getTagCompound().getInteger("type") == 9) {
|
||||
ItemStack tempStack = new ItemStack (ModItems.ironaxehead, 1);
|
||||
tempStack.setTagCompound(new NBTTagCompound());
|
||||
NBTTagCompound tags = pItem.getSubCompound("tags").copy();
|
||||
tempStack.getTagCompound().setTag("tags", tags);
|
||||
tile.setSlotStack((counter), tempStack);
|
||||
|
||||
pItem.getTagCompound().setInteger("type", 0);
|
||||
pItem.getSubCompound("tags").setBoolean("hot", false);
|
||||
pItem.getSubCompound("tags").setBoolean("emerald", false);
|
||||
|
||||
@@ -176,6 +176,17 @@ public class ModCrafting {
|
||||
1.0f
|
||||
);
|
||||
|
||||
//Makes a Hot AxeHead
|
||||
ForgeCrafting.addRecipe(
|
||||
ModItems.ironaxehead,
|
||||
new ItemStack(ModItems.ironaxehead, 1 ),
|
||||
800,
|
||||
160,
|
||||
400,
|
||||
1.0f,
|
||||
1.0f
|
||||
);
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
ANVILING
|
||||
|
||||
@@ -54,6 +54,7 @@ public class ModItems {
|
||||
pistonbellows = new ItemBellowsHandle();
|
||||
softcrucible = new ItemSoftCrucible();
|
||||
stonetongs = new ItemStoneTongs("stonetongs");
|
||||
|
||||
pickaxehead = new ToolPart("ironpickaxehead");
|
||||
ironaxehead = new ToolPart("ironaxehead");
|
||||
|
||||
@@ -127,6 +128,7 @@ public class ModItems {
|
||||
registerRender(ironchunkhot);
|
||||
//registerRender(test);
|
||||
registerRender(pickaxehead);
|
||||
registerRender(ironaxehead);
|
||||
|
||||
registerRender(ironpickaxe);
|
||||
//registerRender(forgingmanual);
|
||||
@@ -144,7 +146,8 @@ public class ModItems {
|
||||
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_hotironfailed"),
|
||||
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_ingot"),
|
||||
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_chunk"),
|
||||
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_pickaxe_hot")
|
||||
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_pickaxe_hot"),
|
||||
new ResourceLocation(ModInfo.MOD_ID, "stonetongs_axe_hot")
|
||||
);
|
||||
ModelLoader.setCustomMeshDefinition(ModItems.stonetongs, new ItemMeshDefinition() {
|
||||
|
||||
@@ -178,6 +181,9 @@ public class ModItems {
|
||||
else if (stack.getTagCompound().getInteger("type") == 8 ) {
|
||||
return new ModelResourceLocation(stack.getItem().getRegistryName() + "_pickaxe_hot", "inventory");
|
||||
}
|
||||
else if (stack.getTagCompound().getInteger("type") == 9 ) {
|
||||
return new ModelResourceLocation(stack.getItem().getRegistryName() + "_axe_hot", "inventory");
|
||||
}
|
||||
else return new ModelResourceLocation(stack.getItem().getRegistryName(), "inventory");
|
||||
}
|
||||
return new ModelResourceLocation(stack.getItem().getRegistryName(), "inventory");
|
||||
|
||||
@@ -78,8 +78,8 @@ public class ItemStoneTongs extends Item {
|
||||
6 | Hot Iron Ingot
|
||||
7 | Hot Iron Chunk
|
||||
8 | Hot Pickaxe Head
|
||||
9 | Hot Shovel Head
|
||||
10 | Hot Axe Head
|
||||
9 | Hot Axe Head
|
||||
10 | Hot Shovel Head
|
||||
11 | Hot Hoe Head
|
||||
*/
|
||||
|
||||
@@ -272,6 +272,16 @@ public class ItemStoneTongs extends Item {
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
if (tile.getSlotStack(i).getItem().equals(ModItems.ironaxehead)) {
|
||||
if(tile.getSlotStack(i).getSubCompound("tags").getBoolean("hot") == true) {
|
||||
itemstack.getTagCompound().setInteger("type", 9);
|
||||
NBTTagCompound tags = tile.getSlotStack(i).getSubCompound("tags").copy();
|
||||
itemstack.getTagCompound().setTag("tags", tags);
|
||||
//itemstack.getSubCompound("tags").setBoolean("hot", true);
|
||||
tile.setSlotStack(i, ItemStack.EMPTY);
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,6 +116,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(tile.getNormalX(a), -0.435D, tile.getNormalZ(i));
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.tiles.TileForge;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -71,7 +72,13 @@ public class TileForgeRender extends TileEntitySpecialRenderer<TileForge>
|
||||
}
|
||||
if(i == 4){
|
||||
//GL11.glScalef(0.6F, 0.6F, 0.6F);
|
||||
GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
if(tile.getSlotStack(i).getItem() == ModItems.pickaxehead) {
|
||||
GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
if(tile.getSlotStack(i).getItem() == ModItems.ironaxehead) {
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
}
|
||||
if(i == 5){
|
||||
GL11.glTranslated(0.3, -0.05D, -0.3D);
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
{
|
||||
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
|
||||
"textures": {
|
||||
"particle": "items/iron_ingot",
|
||||
"texture": "blocks/planks_oak",
|
||||
"texture1": "items/iron_ingot",
|
||||
"texture2": "blocks/iron_ingot_hot"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"__comment": "Cube1",
|
||||
"from": [ 6, 0, 1 ],
|
||||
"to": [ 7, 1, 4 ],
|
||||
"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": [ 9.5, 0, 1 ],
|
||||
"to": [ 10.5, 1, 4 ],
|
||||
"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": [ 6, 0, 4 ],
|
||||
"to": [ 7, 1, 9.5 ],
|
||||
"rotation": { "origin": [ 6, 0, 4 ], "axis": "y", "angle": 45 },
|
||||
"faces": {
|
||||
"down": { "uv": [ 7, 0, 8, 7 ], "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, 0, 7 ],
|
||||
"to": [ 7, 1, 16 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 6, 0, 7, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 6, 0, 7, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 9, 15, 10, 16 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 7, 15, 8, 16 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7, 15, 16, 16 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 0, 15, 9, 16 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube6",
|
||||
"from": [ 9.5, 0, 7 ],
|
||||
"to": [ 10.5, 1, 16 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 6, 0, 7, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 6, 7, 7, 16 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 9, 15, 10, 16 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 7, 15, 8, 16 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7, 15, 16, 16 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 0, 15, 9, 16 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube3",
|
||||
"from": [ 9.5, 0, 4 ],
|
||||
"to": [ 10.5, 1, 9.5 ],
|
||||
"rotation": { "origin": [ 10.5, 1, 4 ], "axis": "y", "angle": -45 },
|
||||
"faces": {
|
||||
"down": { "uv": [ 4, 3, 5, 10 ], "texture": "#texture", "rotation": 180 },
|
||||
"up": { "uv": [ 4, 2, 5, 9 ], "texture": "#texture", "rotation": 180 },
|
||||
"north": { "uv": [ 12, 16, 11, 15 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 5, 16, 4, 15 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7, 15, 14, 16 ], "texture": "#texture", "rotation": 180 },
|
||||
"east": { "uv": [ 3, 15, 10, 16 ], "texture": "#texture", "rotation": 180 }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube6",
|
||||
"from": [ 8.5, 0, 0 ],
|
||||
"to": [ 9.5, 1.5, 2 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 8, 7.5, 9, 9.5 ], "texture": "#texture2" },
|
||||
"up": { "uv": [ 8, 6.5, 9, 8.5 ], "texture": "#texture2" },
|
||||
"north": { "uv": [ 7, 14.5, 8, 16 ], "texture": "#texture2" },
|
||||
"south": { "uv": [ 8, 14.5, 9, 16 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 6.5, 14.5, 8.5, 16 ], "texture": "#texture2" },
|
||||
"east": { "uv": [ 7.5, 14.5, 9.5, 16 ], "texture": "#texture2" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube7",
|
||||
"from": [ 7.5, 0.5, 0 ],
|
||||
"to": [ 8, 1, 3 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 7, 6.5, 7.5, 9.5 ], "texture": "#texture2" },
|
||||
"up": { "uv": [ 7, 6.5, 7.5, 9.5 ], "texture": "#texture2" },
|
||||
"north": { "uv": [ 8.5, 15, 9, 15.5 ], "texture": "#texture2" },
|
||||
"south": { "uv": [ 7, 15, 7.5, 15.5 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 6.5, 15, 9.5, 15.5 ], "texture": "#texture2" },
|
||||
"east": { "uv": [ 6.5, 15, 9.5, 15.5 ], "texture": "#texture2" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube8",
|
||||
"from": [ 8, 0.5, 0 ],
|
||||
"to": [ 8.5, 1, 2.5 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 7.5, 7, 8, 9.5 ], "texture": "#texture2" },
|
||||
"up": { "uv": [ 7.5, 6.5, 8, 9 ], "texture": "#texture2" },
|
||||
"north": { "uv": [ 8, 15, 8.5, 15.5 ], "texture": "#texture2" },
|
||||
"south": { "uv": [ 7.5, 15, 8, 15.5 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 6.5, 15, 9, 15.5 ], "texture": "#texture2" },
|
||||
"east": { "uv": [ 7, 15, 9.5, 15.5 ], "texture": "#texture2" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Cube9",
|
||||
"from": [ 7, 0.5, -0.5 ],
|
||||
"to": [ 7.5, 1, 3.5 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 6.5, 6, 7, 10 ], "texture": "#texture2" },
|
||||
"up": { "uv": [ 6.5, 6, 7, 10 ], "texture": "#texture2" },
|
||||
"north": { "uv": [ 9, 15, 9.5, 15.5 ], "texture": "#texture2" },
|
||||
"south": { "uv": [ 6.5, 15, 7, 15.5 ], "texture": "#texture2" },
|
||||
"west": { "uv": [ 6, 15, 10, 15.5 ], "texture": "#texture2" },
|
||||
"east": { "uv": [ 6, 15, 10, 15.5 ], "texture": "#texture2" }
|
||||
}
|
||||
}
|
||||
],
|
||||
"display": {
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [ 60, 0, 0 ],
|
||||
"translation": [ -0.25, 8.33, 3.5 ]
|
||||
},
|
||||
"thirdperson_lefthand": {
|
||||
"rotation": [ 90, 0, 90 ],
|
||||
"translation": [ -7.25, -1.25, -0.75 ]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [ 20, 0, 0 ],
|
||||
"translation": [ 0, 8, -2 ]
|
||||
},
|
||||
"firstperson_lefthand": {
|
||||
"rotation": [ 90, 0, 90 ],
|
||||
"translation": [ -7.25, -1.25, -0.75 ]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [ 90, -45, 0 ],
|
||||
"translation": [ -0.25, 0, 8 ]
|
||||
},
|
||||
"ground": {
|
||||
"translation": [ 0, 4, 0 ]
|
||||
},
|
||||
"fixed": {
|
||||
"rotation": [ 90, 0, -180 ],
|
||||
"translation": [ 0, 0, -7.25 ]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"forge_marker":1,
|
||||
"textures": {
|
||||
"particle": "blocks/planks_oak",
|
||||
"texture": "blocks/planks_oak",
|
||||
"texture1": "forgecraft:blocks/stone_slab",
|
||||
"texture2": "forgecraft:blocks/iron_ingot_hot"
|
||||
},
|
||||
"parent": "forgecraft:item/stonetongs_axe_default"
|
||||
}
|
||||
Reference in New Issue
Block a user