stonetongs added, bloomery needs to check for addition of soft crucible

This commit is contained in:
Mohammad-Ali Minaie
2017-01-23 21:29:59 -05:00
parent 06920b621b
commit 8b41ae6205
12 changed files with 1521 additions and 1 deletions

BIN
1.10.2/.DS_Store vendored

Binary file not shown.

View File

@@ -29,6 +29,7 @@ public class ModInfo {
public enum ForgecraftItems {
TEST("test", "ItemTest"),
BELLOWSHANDLE("bellowshandle", "bellowshandle"),
STONETONGS("stonetongs", "stonetongs"),
SOFTCRUCIBLE("softcrucible", "softcrucible");
private String unlocalizedName;

View File

@@ -3,9 +3,13 @@ package nmd.primal.forgecraft.init;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.client.model.obj.OBJLoader;
import net.minecraftforge.fml.common.registry.GameRegistry;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.items.ItemBellowsHandle;
import nmd.primal.forgecraft.items.ItemSoftCrucible;
import nmd.primal.forgecraft.items.ItemStoneTongs;
/**
* Created by kitsu on 11/26/2016.
@@ -15,22 +19,45 @@ public class ModItems {
public static Item pistonbellows;
public static Item test;
public static Item softcrucible;
public static Item stonetongs;
//public static ModelResourceLocation modelLocation = new ModelResourceLocation("stonetongs", "inventory");
/*
@Override
public void preInit(FMLPreInitializationEvent event) {
OBJLoader.INSTANCE.addDomain(TutorialMod.MODID);
registerModel(ModItems.tutorialItem);
}
public void registerModel(Item item) {
ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(TutorialMod.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
}
*/
public static void init() {
OBJLoader.INSTANCE.addDomain(ModInfo.MOD_ID);
pistonbellows = new ItemBellowsHandle();
softcrucible = new ItemSoftCrucible();
stonetongs = new ItemStoneTongs();
//test = new ItemTest();
}
public static void register() {
GameRegistry.register(pistonbellows);
GameRegistry.register(softcrucible);
GameRegistry.register(stonetongs);
//GameRegistry.register(test);
}
public static void registerRenders() {
registerRender(pistonbellows);
registerRender(softcrucible);
registerRender(stonetongs);
//Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(stonetongs, 0, new ModelResourceLocation("stonetongs", "inventory"););
//ModelLoader.setCustomModelResourceLocation(stonetongs, 0, new ModelResourceLocation(ModInfo.MOD_ID + ":" + stonetongs + ".obj", "inventory"));
//registerRender(test);
}

View File

@@ -0,0 +1,43 @@
package nmd.primal.forgecraft.items;
import net.minecraft.entity.item.EntityEnderPearl;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList;
import net.minecraft.util.*;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.tiles.TileBloomery;
/**
* Created by mminaie on 1/23/17.
*/
public class ItemStoneTongs extends BaseItem {
public ItemStoneTongs() {
setUnlocalizedName(ModInfo.ForgecraftItems.STONETONGS.getUnlocalizedName());
//setRegistryName();
setRegistryName(new ResourceLocation(ModInfo.MOD_ID, ModInfo.ForgecraftItems.STONETONGS.getRegistryName()));
setMaxDamage(100);
setNoRepair();
setMaxStackSize(1);
}
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
{
//pos = pos.offset(facing);
ItemStack itemstack = player.getHeldItem(hand);
if (world.getBlockState(pos).getBlock() == ModBlocks.bloomery) {
TileBloomery tile = (TileBloomery) world.getTileEntity(pos);
System.out.println(tile.getSlotStack(1));
itemstack.damageItem(1, player);
return EnumActionResult.SUCCESS;
} else return EnumActionResult.FAIL;
}
}

View File

@@ -1,6 +1,10 @@
package nmd.primal.forgecraft.proxy;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraftforge.client.model.obj.OBJLoader;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import nmd.primal.forgecraft.ModInfo;
import nmd.primal.forgecraft.init.ModBlocks;
import nmd.primal.forgecraft.init.ModItems;
import nmd.primal.forgecraft.renders.TileBloomeryRender;
@@ -17,7 +21,8 @@ public class ClientProxy implements CommonProxy {
@Override
public void init() {
//OBJLoader.INSTANCE.addDomain(ModInfo.MOD_ID);
//Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(ModItems.stonetongs, 0, new ModelResourceLocation("stonetongs", "inventory"));
ModItems.registerRenders();
ModBlocks.registerRenders();
this.registerTileRendering();

View File

@@ -0,0 +1,43 @@
{
"forge_marker": 1,
"defaults": {
"model": "forgecraft:stonetongs.obj"
},
"variants": {
"inventory": [
{
"transform": {
"thirdperson_lefthand": {
"rotation": [ { "x": 0 }, { "y": 0 }, { "z": 0 } ],
"translation": [ 0, -0.1, 0.1 ],
"scale": 0.02
},
"thirdperson_righthand": {
"rotation": [ { "x": 0 }, { "y": 0 }, { "z": 0 } ],
"translation": [ 0, -0.1, 0.1 ],
"scale": 0.02
},
"gui": {
"rotation": [ { "x": 45 }, { "y": 10 }, { "z": -45 } ],
"translation": [ -0.2, -0.2, 0 ],
"scale": 0.02
},
"firstperson_righthand": {
"rotation": [ { "x": 180 }, { "y": 180 }, { "z": 170 } ],
"translation": [ 0, -0.1, 0 ],
"scale": 0.02
},
"firstperson_lefthand": {
"rotation": [ { "x": 180 }, { "y": 180 }, { "z": 170 } ],
"translation": [ 0, -0.1, 0 ],
"scale": 0.02
},
"ground": {
"rotation": [ { "x": 45 }, { "y": 0 }, { "z": 0 } ],
"scale": 0.02
}
}
}
]
}
}

View File

@@ -0,0 +1,109 @@
{
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
"textures": {
"particle": "blocks/planks_oak",
"texture": "blocks/planks_oak",
"texture1": "forgecraft:blocks/stone_slab"
},
"elements": [
{
"__comment": "Cube1",
"from": [ 4, 0, 0 ],
"to": [ 5, 1, 3 ],
"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 ],
"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 },
"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 },
"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 ],
"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 ],
"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" }
}
}
],
"display": {
"thirdperson_righthand": {
"translation": [ 0, 5.5, -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 ]
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,109 @@
{
"__comment": "Designed by Kitsushadow with Cubik Studio - https://cubik.studio",
"textures": {
"particle": "blocks/e_particle",
"texture": "blocks/checker_test",
"texture1": "blocks/stone_slab"
},
"elements": [
{
"__comment": "Cube1",
"from": [ 4, 0, 0 ],
"to": [ 5, 1, 3 ],
"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 ],
"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 },
"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 },
"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 ],
"faces": {
"down": { "uv": [ 6, 0.5, 7, 9 ], "texture": "#texture" },
"up": { "uv": [ 6, 2.5, 7, 11 ], "texture": "#texture" },
"north": { "uv": [ 9, 15, 10, 16 ], "texture": "#texture" },
"south": { "uv": [ 7, 15, 8, 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 ],
"faces": {
"down": { "uv": [ 8, 0.5, 9, 9 ], "texture": "#texture" },
"up": { "uv": [ 8, 6.5, 9, 15 ], "texture": "#texture" },
"north": { "uv": [ 7, 15, 8, 16 ], "texture": "#texture" },
"south": { "uv": [ 9, 15, 10, 16 ], "texture": "#texture" },
"west": { "uv": [ 7.5, 15, 16, 16 ], "texture": "#texture" },
"east": { "uv": [ 0, 15, 8.5, 16 ], "texture": "#texture" }
}
}
],
"display": {
"thirdperson_righthand": {
"translation": [ 0, 5.5, -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 ]
}
}
}

View File

@@ -0,0 +1,8 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl Material__65
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
d 1.000000
map_Kd forgecraft:items/stonetongs

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B