update weapon crafting

This commit is contained in:
Mohammad-Ali Minaie
2018-10-22 06:12:50 -04:00
parent eb429a5fc2
commit 908c5150e5
8 changed files with 34 additions and 232 deletions

View File

@@ -67,9 +67,7 @@ public class CommonEvents implements WeaponNBT {
modStack = getOppositeStack(inputList, inputStack);
if(inputStackItem != null) {
System.out.println("Stack is not null");
if (inputStack.hasTagCompound()) {
System.out.println("Stack Has NBT");
if (getModifiers(inputStack) < WeaponNBT.materialModifiers.get(((WeaponPart) outputStack.getItem()).getMaterial()) ) {
if (RecipeHelper.isOreName(modStack, "dustSilver")) {
setSmiteLevel(outputStack, getSmiteLevel(inputStack) + 1);

View File

@@ -379,9 +379,9 @@ public final class RecipesWorkbench {
/*********WEAPONS********/
recipes.register (new WorkbenchCrafting(
new OreIngredient("weaponHandle"),
new OreIngredient("cordageGeneral"),
Ingredient.fromStacks(new ItemStack(ModItems.rawbronzegladius, 1)),
new OreIngredient("weaponGuard"),
Ingredient.EMPTY,
Ingredient.EMPTY,
new ItemStack(ModItems.bronzegladius, 1)).setRecipeName("bronzegladius"));

View File

@@ -11,7 +11,10 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import nmd.primal.core.common.helper.RecipeHelper;
import nmd.primal.forgecraft.blocks.machine.Workbench;
import nmd.primal.forgecraft.items.parts.WeaponHandle;
import nmd.primal.forgecraft.items.parts.WeaponPart;
import nmd.primal.forgecraft.tiles.TileWorkbench;
import org.lwjgl.opengl.GL11;
@@ -84,13 +87,20 @@ public class TileWorkbenchRender extends TileEntitySpecialRenderer<TileWorkbench
}
if(!stack2.isEmpty()){
GL11.glPushMatrix();
//System.out.println(stack2);
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
GL11.glTranslated(0.4375, 0.65625D, 0.26D);
GL11.glScalef(0.7F, 1F, 0.55F);
GL11.glRotated(-45.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
if(RecipeHelper.isOreName(stack2.getItem(), "cordageGeneral")){
GL11.glTranslated(0.4375, 0.65625D, 0.26D);
GL11.glScalef(0.5F, 0.5F, 0.5F);
GL11.glRotated(90.0F, 1.0F, .0F, 0.0F);
//GL11.glRotated(45.0F, 0.0F, 0.0F, 1.0F);
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
} else {
GL11.glTranslated(0.4375, 0.65625D, 0.26D);
GL11.glScalef(0.7F, 1F, 0.55F);
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
GL11.glRotated(-45.0F, 0.0F, 1.0F, 0.0F);
}
renderItem.renderItem(stack2, ItemCameraTransforms.TransformType.FIXED);
GL11.glPopMatrix();
}
@@ -98,8 +108,15 @@ public class TileWorkbenchRender extends TileEntitySpecialRenderer<TileWorkbench
GL11.glPushMatrix();
//System.out.println(stack2);
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
GL11.glTranslated(0.37D, 0.2075D, 0.21D);
GL11.glScalef(1F, 1F, 1F);
if(stack3.getItem() instanceof WeaponPart){
GL11.glTranslated(0.67D, 0.376D, 0.25D);
GL11.glScalef(0.6F, 0.6F, 0.6F);
} else {
GL11.glTranslated(0.37D, 0.2075D, 0.21D);
GL11.glScalef(1F, 1F, 1F);
}
GL11.glRotated(-90.0F, 0.0F, 1.0F, 0.0F);
//GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);

View File

@@ -30,7 +30,7 @@ public class TileWorkbench extends TileBaseSlot{
if(index == 2){
if(RecipeHelper.isOreName(stack.getItem(), "stickTreatedWood") ||
RecipeHelper.isOreName(stack.getItem(), "stickLacquer") ||
stack.getItem() instanceof WeaponHandle){
RecipeHelper.isOreName(stack.getItem(), "cordageGeneral")){
return true;
}
}
@@ -45,7 +45,8 @@ public class TileWorkbench extends TileBaseSlot{
}
}
if(index == 4){
if ( (RecipeHelper.isOreName(stack.getItem(), "pinBasic")) || stack.getItem() instanceof WeaponGuard) {
if ( (RecipeHelper.isOreName(stack.getItem(), "pinBasic")) ||
stack.getItem() instanceof WeaponGuard) {
return true;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

View File

@@ -201,6 +201,10 @@
"translation": [ -0.4, -0.4, 0 ],
"scale": [ 0.5, 0.5, 0.5 ]
},
"head": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 7.2, 0 ]
},
"ground": {
"rotation": [ 90, 0, 0 ],
"scale": [ 0.75, 0.75, 0.75 ]

View File

@@ -1,218 +0,0 @@
{
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
"textures": {
"particle": "items/finished_bronze",
"texture": "items/finished_bronze"
},
"elements": [
{
"__comment": "Cube23",
"from": [ 7.25, -5.5, 7.25 ],
"to": [ 9.25, 1, 8.75 ],
"faces": {
"down": { "uv": [ 7, 7.5, 9, 8.5 ], "texture": "#texture" },
"up": { "uv": [ 7, 7.5, 9, 8.5 ], "texture": "#texture" },
"north": { "uv": [ 7, 8, 9, 16 ], "texture": "#texture" },
"south": { "uv": [ 7, 8, 9, 16 ], "texture": "#texture" },
"west": { "uv": [ 7.5, 8, 8.5, 16 ], "texture": "#texture" },
"east": { "uv": [ 7.5, 8, 8.5, 16 ], "texture": "#texture" }
}
},
{
"__comment": "Cube23",
"from": [ 6.5, 1, 7.5 ],
"to": [ 10, 6, 8.5 ],
"faces": {
"down": { "uv": [ 7, 7.5, 9, 8.5 ], "texture": "#texture" },
"up": { "uv": [ 7, 7.5, 9, 8.5 ], "texture": "#texture" },
"north": { "uv": [ 7, 9, 9, 16 ], "texture": "#texture" },
"south": { "uv": [ 7, 9, 9, 16 ], "texture": "#texture" },
"west": { "uv": [ 7.5, 9, 8.5, 16 ], "texture": "#texture" },
"east": { "uv": [ 7.5, 9, 8.5, 16 ], "texture": "#texture" }
}
},
{
"__comment": "Cube28",
"from": [ 8, 1, 8.5 ],
"to": [ 8.5, 24, 8.501 ],
"faces": {
"down": { "uv": [ 7.5, 7, 8.5, 7.5 ], "texture": "#texture" },
"up": { "uv": [ 7.5, 8.5, 8.5, 9 ], "texture": "#texture" },
"north": { "uv": [ 7.5, 0, 8.5, 15 ], "texture": "#texture" },
"south": { "uv": [ 7.5, 0, 8.5, 15 ], "texture": "#texture" },
"west": { "uv": [ 8.5, 0, 9, 15 ], "texture": "#texture" },
"east": { "uv": [ 7, 0, 7.5, 15 ], "texture": "#texture" }
}
},
{
"__comment": "Cube32",
"from": [ 6.75, 21.5, 7.5 ],
"to": [ 9.75, 23, 8.5 ],
"faces": {
"down": { "uv": [ 7, 7.5, 9, 8.5 ], "texture": "#texture" },
"up": { "uv": [ 7, 7.5, 9, 8.5 ], "texture": "#texture" },
"north": { "uv": [ 7, 7, 9, 9.5 ], "texture": "#texture" },
"south": { "uv": [ 7, 7, 9, 9.5 ], "texture": "#texture" },
"west": { "uv": [ 7.5, 7, 8.5, 9.5 ], "texture": "#texture" },
"east": { "uv": [ 7.5, 7, 8.5, 9.5 ], "texture": "#texture" }
}
},
{
"__comment": "Cube32",
"from": [ 7.25, 24.5, 7.5 ],
"to": [ 9.25, 26, 8.5 ],
"faces": {
"down": { "uv": [ 7, 7.5, 9, 8.5 ], "texture": "#texture" },
"up": { "uv": [ 7, 7.5, 9, 8.5 ], "texture": "#texture" },
"north": { "uv": [ 7, 7, 9, 8 ], "texture": "#texture" },
"south": { "uv": [ 7, 7, 9, 8 ], "texture": "#texture" },
"west": { "uv": [ 7.5, 7, 8.5, 8 ], "texture": "#texture" },
"east": { "uv": [ 7.5, 7, 8.5, 8 ], "texture": "#texture" }
}
},
{
"__comment": "Cube9",
"from": [ 7.75, 27, 7.5 ],
"to": [ 8.75, 28, 8.5 ],
"faces": {
"down": { "uv": [ 8, 7.5, 8.5, 8 ], "texture": "#texture", "rotation": 180 },
"up": { "uv": [ 8, 8, 8.5, 8.5 ], "texture": "#texture", "rotation": 180 },
"north": { "uv": [ 8, 4.5, 8.5, 5.5 ], "texture": "#texture" },
"south": { "uv": [ 7.5, 4.5, 8, 5.5 ], "texture": "#texture" },
"west": { "uv": [ 7.5, 4.5, 8, 5.5 ], "texture": "#texture" },
"east": { "uv": [ 8, 4.5, 8.5, 5.5 ], "texture": "#texture" }
}
},
{
"__comment": "Cube28",
"from": [ 8, 1, 7.499 ],
"to": [ 8.5, 24, 7.5 ],
"faces": {
"down": { "uv": [ 7.5, 7, 8.5, 7.5 ], "texture": "#texture", "rotation": 180 },
"up": { "uv": [ 7.5, 8.5, 8.5, 9 ], "texture": "#texture", "rotation": 180 },
"north": { "uv": [ 7.5, 0, 8.5, 15 ], "texture": "#texture" },
"south": { "uv": [ 7.5, 0, 8.5, 15 ], "texture": "#texture" },
"west": { "uv": [ 7, 0, 7.5, 15 ], "texture": "#texture" },
"east": { "uv": [ 8.5, 0, 9, 15 ], "texture": "#texture" }
}
},
{
"__comment": "Cube13",
"from": [ 7, 23, 7.5 ],
"to": [ 9.5, 24.5, 8.5 ],
"faces": {
"down": { "uv": [ 7, 7.5, 9.5, 8.5 ], "texture": "#texture" },
"up": { "uv": [ 7, 7.5, 9.5, 8.5 ], "texture": "#texture" },
"north": { "uv": [ 6.5, 7.5, 9, 9 ], "texture": "#texture" },
"south": { "uv": [ 7, 7.5, 9.5, 9 ], "texture": "#texture" },
"west": { "uv": [ 7.5, 7.5, 8.5, 9 ], "texture": "#texture" },
"east": { "uv": [ 7.5, 7.5, 8.5, 9 ], "texture": "#texture" }
}
},
{
"__comment": "Cube14",
"from": [ 7.5, 26, 7.5 ],
"to": [ 9, 27, 8.5 ],
"faces": {
"down": { "uv": [ 7.5, 7.5, 9, 8.5 ], "texture": "#texture" },
"up": { "uv": [ 7.5, 7.5, 9, 8.5 ], "texture": "#texture" },
"north": { "uv": [ 7, 5, 8.5, 6 ], "texture": "#texture" },
"south": { "uv": [ 7.5, 5, 9, 6 ], "texture": "#texture" },
"west": { "uv": [ 7.5, 5, 8.5, 6 ], "texture": "#texture" },
"east": { "uv": [ 7.5, 5, 8.5, 6 ], "texture": "#texture" }
}
},
{
"__comment": "Cube17",
"from": [ 8, -8.5, 7.75 ],
"to": [ 8.5, -5.5, 8.25 ],
"faces": {
"down": { "uv": [ 8, 7.75, 8.5, 8.25 ], "texture": "#texture" },
"up": { "uv": [ 8, 7.75, 8.5, 8.25 ], "texture": "#texture" },
"north": { "uv": [ 7.5, 8, 8, 11 ], "texture": "#texture" },
"south": { "uv": [ 8, 8, 8.5, 11 ], "texture": "#texture" },
"west": { "uv": [ 7.75, 8, 8.5, 11 ], "texture": "#texture" },
"east": { "uv": [ 7.75, 8, 8.5, 11 ], "texture": "#texture" }
}
},
{
"__comment": "Cube24",
"from": [ 6.75, 6, 7.5 ],
"to": [ 9.75, 15.5, 8.5 ],
"faces": {
"down": { "uv": [ 6.75, 7.5, 9.75, 8.5 ], "texture": "#texture" },
"up": { "uv": [ 6.75, 7.5, 9.75, 8.5 ], "texture": "#texture" },
"north": { "uv": [ 6.25, 0.5, 9.25, 10 ], "texture": "#texture" },
"south": { "uv": [ 6.75, 0.5, 9.75, 10 ], "texture": "#texture" },
"west": { "uv": [ 7.5, 0.5, 8.5, 10 ], "texture": "#texture" },
"east": { "uv": [ 7.5, 0.5, 8.5, 10 ], "texture": "#texture" }
}
},
{
"__comment": "Cube19",
"from": [ 6.5, 15.5, 7.5 ],
"to": [ 10, 21.5, 8.5 ],
"faces": {
"down": { "uv": [ 6.5, 7.5, 10, 8.5 ], "texture": "#texture" },
"up": { "uv": [ 6.5, 7.5, 10, 8.5 ], "texture": "#texture" },
"north": { "uv": [ 6, 0, 9.5, 0.5 ], "texture": "#texture" },
"south": { "uv": [ 6.5, 0, 10, 0.5 ], "texture": "#texture" },
"west": { "uv": [ 7.5, 0, 8.5, 0.5 ], "texture": "#texture" },
"east": { "uv": [ 7.5, 0, 8.5, 0.5 ], "texture": "#texture" }
}
},
{
"__comment": "Cube20",
"from": [ 8, 27.75, 7.5 ],
"to": [ 8.5, 28.75, 8.5 ],
"faces": {
"down": { "uv": [ 8, 7.5, 8.5, 8.5 ], "texture": "#texture" },
"up": { "uv": [ 8, 7.5, 8.5, 8.5 ], "texture": "#texture" },
"north": { "uv": [ 7.5, 3.25, 8, 4.25 ], "texture": "#texture" },
"south": { "uv": [ 8, 3.25, 8.5, 4.25 ], "texture": "#texture" },
"west": { "uv": [ 7.5, 3.25, 8.5, 4.25 ], "texture": "#texture" },
"east": { "uv": [ 7.5, 3.25, 8.5, 4.25 ], "texture": "#texture" }
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [ 0, 90, 0 ],
"translation": [ 0, 5.9, 1.33 ],
"scale": [ 0.75, 0.75, 0.75 ]
},
"thirdperson_lefthand": {
"rotation": [ 0, 90, 0 ],
"translation": [ 0, 5.9, 1.33 ],
"scale": [ 0.75, 0.75, 0.75 ]
},
"firstperson_righthand": {
"rotation": [ 0, 90, 0 ],
"translation": [ 0, 6.6, 1 ],
"scale": [ 0.75, 0.75, 0.75 ]
},
"firstperson_lefthand": {
"rotation": [ 0, 90, 0 ],
"translation": [ 0, 6.6, 1 ],
"scale": [ 0.75, 0.75, 0.75 ]
},
"gui": {
"rotation": [ 0, 0, -45 ],
"translation": [ -0.4, -0.4, 0 ],
"scale": [ 0.5, 0.5, 0.5 ]
},
"head": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 7.2, 0 ]
},
"ground": {
"rotation": [ 90, 0, 0 ],
"scale": [ 0.75, 0.75, 0.75 ]
},
"fixed": {
"rotation": [ 0, 0, 45 ],
"translation": [ 0.7, -0.7, 0 ],
"scale": [ 0.66, 0.66, 0.66 ]
}
}
}