moving forward with method for creating tool and weapon parts
This commit is contained in:
36
1.11/To-Dos
36
1.11/To-Dos
@@ -1,24 +1,19 @@
|
||||
To-Dos
|
||||
|
||||
*** Priority ***
|
||||
- [x] Stone Anvil
|
||||
- [x] Stone Anvil Inventory
|
||||
- [x] Stone Anvil Tile
|
||||
- [x] Stone Anvil Crafting
|
||||
- [x] TESR Inventory Rendering for Anvil
|
||||
|
||||
- [x] Iron Chunk Item Model
|
||||
- [x] Anvil Item Model
|
||||
|
||||
- [x] StoneTongs Iron Chunks
|
||||
|
||||
- [ ] Hammer Crafting
|
||||
- [x] Iron Chunking
|
||||
- [ ] Tool Rendering
|
||||
- [ ] Toolhead Recipes
|
||||
- [ ] WeaponHead recipes
|
||||
- [ ] Add forgehammer to oreDict
|
||||
|
||||
|
||||
|
||||
Only modifiable bit is the tool head or weapon blade
|
||||
|
||||
The modifier is a product of the tagCompounds are the material type
|
||||
|
||||
the modifiers are transfered to the crafted item via NBT
|
||||
|
||||
*** Backlog ***
|
||||
|
||||
- [ ] Stone Anvil Bounding Box
|
||||
@@ -34,6 +29,21 @@ To-Dos
|
||||
- [ ] Forge Sound?
|
||||
|
||||
*** Completed ***
|
||||
|
||||
- [x] Stone Anvil
|
||||
- [x] Stone Anvil Inventory
|
||||
- [x] Stone Anvil Tile
|
||||
- [x] Stone Anvil Crafting
|
||||
- [x] TESR Inventory Rendering for Anvil
|
||||
|
||||
- [x] Iron Chunk Item Model
|
||||
- [x] Anvil Item Model
|
||||
|
||||
- [x] StoneTongs Iron Chunks
|
||||
|
||||
- [x] Hammer Crafting
|
||||
- [x] Iron Chunking
|
||||
|
||||
- [x] Forge Recipe Handler
|
||||
- [x] Hot Iron Ingot Recipe
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ public class ModInfo {
|
||||
//public static final String UPDATE_JSON = "";
|
||||
|
||||
public enum ForgecraftItems {
|
||||
TEST("test", "ItemTest"),
|
||||
TEST("test", "itemtest"),
|
||||
BELLOWSHANDLE("bellowshandle", "bellowshandle"),
|
||||
STONETONGS("stonetongs", "stonetongs"),
|
||||
SOFTCRUCIBLE("softcrucible", "softcrucible"),
|
||||
|
||||
@@ -30,11 +30,11 @@ import nmd.primal.forgecraft.items.blocks.ItemBlockIngotBall;
|
||||
*/
|
||||
public class ModItems {
|
||||
|
||||
public static Item test;
|
||||
public static Item pistonbellows;
|
||||
public static Item forgehammer = new ForgeHammer("forgehammer");
|
||||
public static Item softcrucible;
|
||||
public static Item stonetongs;
|
||||
//public static Item ironingotballcool;
|
||||
public static Item ironingotballhot;
|
||||
public static Item ironchunkhot;
|
||||
//public static Item forgingmanual;
|
||||
@@ -45,6 +45,7 @@ public class ModItems {
|
||||
softcrucible = new ItemSoftCrucible();
|
||||
stonetongs = new ItemStoneTongs("stonetongs");
|
||||
//ironingotballcool = new BaseMultiItem("ironingotcool") {};
|
||||
test = new ItemTest();
|
||||
ironingotballhot = new BaseMultiItem("ironingothot") {
|
||||
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
|
||||
if(!world.isRemote) {
|
||||
@@ -87,6 +88,7 @@ public class ModItems {
|
||||
GameRegistry.register(forgehammer);
|
||||
GameRegistry.register(ironingotballhot);
|
||||
GameRegistry.register(ironchunkhot);
|
||||
GameRegistry.register(test);
|
||||
//GameRegistry.register(forgingmanual);
|
||||
}
|
||||
|
||||
@@ -97,6 +99,7 @@ public class ModItems {
|
||||
registerRender(forgehammer);
|
||||
registerRender(ironingotballhot);
|
||||
registerRender(ironchunkhot);
|
||||
registerRender(test);
|
||||
//registerRender(forgingmanual);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
package nmd.primal.forgecraft.items;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.IItemPropertyGetter;
|
||||
import net.minecraft.item.ItemFishingRod;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Created by kitsu on 11/26/2016.
|
||||
*/
|
||||
@@ -10,6 +22,22 @@ public class ItemTest extends BaseItem {
|
||||
public ItemTest() {
|
||||
setUnlocalizedName(ModInfo.ForgecraftItems.TEST.getUnlocalizedName());
|
||||
setRegistryName(ModInfo.ForgecraftItems.TEST.getRegistryName());
|
||||
|
||||
this.addPropertyOverride(new ResourceLocation("test"), new IItemPropertyGetter()
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn)
|
||||
{
|
||||
if (entityIn == null)
|
||||
{
|
||||
return 0.0F;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1.0F;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package nmd.primal.forgecraft.items.toolparts;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 3/9/17.
|
||||
*/
|
||||
public abstract class ToolPart extends Item {
|
||||
|
||||
public ToolPart(String name) {
|
||||
this.setUnlocalizedName(name);
|
||||
this.setRegistryName(name);
|
||||
this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||
this.setMaxStackSize(1);
|
||||
}
|
||||
|
||||
public static boolean isHidden()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreated(ItemStack item, World worldIn, EntityPlayer playerIn) {
|
||||
|
||||
if (!item.hasTagCompound()) {
|
||||
item.setTagCompound(new NBTTagCompound());
|
||||
//this.setDamage(item, 1000);
|
||||
|
||||
item.getTagCompound().setBoolean("silk_touch", false);
|
||||
item.getTagCompound().setInteger("durability", 50);
|
||||
item.getTagCompound().setFloat("speed", 1.0F);
|
||||
item.getTagCompound().setFloat("fortune", 1.0F);
|
||||
item.getTagCompound().setInteger("modifiers", 0);
|
||||
this.setMaxDamage(item.getTagCompound().getInteger("durability"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack item, World world, Entity player, int itemSlot, boolean isSelected) {
|
||||
if (!item.hasTagCompound()) {
|
||||
item.setTagCompound(new NBTTagCompound());
|
||||
item.getTagCompound().setBoolean("silk_touch", false);
|
||||
item.getTagCompound().setInteger("durability", 50);
|
||||
item.getTagCompound().setFloat("speed", 1.0F);
|
||||
item.getTagCompound().setFloat("fortune", 1.0F);
|
||||
item.getTagCompound().setInteger("modifiers", 0);
|
||||
this.setMaxDamage(item.getTagCompound().getInteger("durability"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package nmd.primal.forgecraft.items.tools;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 3/9/17.
|
||||
*/
|
||||
public abstract class CustomTool extends Item {
|
||||
|
||||
public CustomTool(String name) {
|
||||
this.setUnlocalizedName(name);
|
||||
this.setRegistryName(name);
|
||||
this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||
this.setMaxStackSize(1);
|
||||
this.setNoRepair();
|
||||
}
|
||||
@Override
|
||||
public boolean isRepairable()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getItemEnchantability(ItemStack stack)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package nmd.primal.forgecraft.renders.items;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.IModel;
|
||||
import net.minecraftforge.client.model.IModelCustomData;
|
||||
import net.minecraftforge.common.model.IModelState;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 3/8/17.
|
||||
*/
|
||||
public class ModelPickaxe implements IModel, IModelCustomData {
|
||||
|
||||
public static final IModel MODEL = new ModelPickaxe();
|
||||
//private final ResourceLocation resourceHead;
|
||||
//private final ResourceLocation resourceHandle;
|
||||
|
||||
@Override
|
||||
public IModel process(ImmutableMap<String, String> customData) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<ResourceLocation> getDependencies() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<ResourceLocation> getTextures() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IModelState getDefaultState() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -2,5 +2,13 @@
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "forgecraft:items/test"
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"predicate": {
|
||||
"test": 1
|
||||
},
|
||||
"model": "forgecraft:item/softcrucible"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user