Some more model work

This commit is contained in:
Ellpeck 2016-05-03 18:29:02 +02:00
parent 6e18866c79
commit 15c65216cd
39 changed files with 277 additions and 57 deletions

View file

@ -22,6 +22,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
@ -124,13 +125,9 @@ public class BlockColoredLamp extends BlockBase{
@Override
protected void registerRendering(){
ResourceLocation[] resLocs = new ResourceLocation[allLampTypes.length];
for(int i = 0; i < allLampTypes.length; i++){
String name = this.getBaseName()+allLampTypes[i].name;
resLocs[i] = new ResourceLocation(ModUtil.MOD_ID, name);
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID, name));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(this.getRegistryName(), META.getName()+"="+i));
}
ActuallyAdditions.proxy.addRenderVariant(Item.getItemFromBlock(this), resLocs);
}
@Override

View file

@ -20,6 +20,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
@ -64,9 +65,9 @@ public class BlockCrystal extends BlockBase{
protected void registerRendering(){
ResourceLocation[] resLocs = new ResourceLocation[allCrystals.length];
for(int i = 0; i < allCrystals.length; i++){
String name = this.getBaseName()+allCrystals[i].name;
String name = this.getRegistryName()+allCrystals[i].name;
resLocs[i] = new ResourceLocation(ModUtil.MOD_ID, name);
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID, name));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(name, "inventory"));
}
ActuallyAdditions.proxy.addRenderVariant(Item.getItemFromBlock(this), resLocs);
}

View file

@ -20,6 +20,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
@ -62,13 +63,9 @@ public class BlockMisc extends BlockBase{
@Override
protected void registerRendering(){
ResourceLocation[] resLocs = new ResourceLocation[allMiscBlocks.length];
for(int i = 0; i < allMiscBlocks.length; i++){
String name = this.getBaseName()+allMiscBlocks[i].name;
resLocs[i] = new ResourceLocation(ModUtil.MOD_ID, name);
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID, name));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(this.getRegistryName(), META.getName()+"="+i));
}
ActuallyAdditions.proxy.addRenderVariant(Item.getItemFromBlock(this), resLocs);
}
@Override

View file

@ -24,6 +24,7 @@ import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
@ -94,13 +95,9 @@ public class BlockWildPlant extends BlockBushBase{
@Override
protected void registerRendering(){
ResourceLocation[] resLocs = new ResourceLocation[allWildPlants.length];
for(int i = 0; i < allWildPlants.length; i++){
String name = this.getBaseName()+allWildPlants[i].name;
resLocs[i] = new ResourceLocation(ModUtil.MOD_ID, name);
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID, name));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(this.getRegistryName(), META.getName()+"="+i));
}
ActuallyAdditions.proxy.addRenderVariant(Item.getItemFromBlock(this), resLocs);
}
@Override

View file

@ -18,6 +18,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
@ -52,7 +53,7 @@ public class BlockBase extends Block{
}
protected void registerRendering(){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
public EnumRarity getRarity(ItemStack stack){

View file

@ -18,6 +18,7 @@ import net.minecraft.block.SoundType;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
@ -52,7 +53,7 @@ public class BlockBushBase extends BlockBush{
}
protected void registerRendering(){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
public EnumRarity getRarity(ItemStack stack){

View file

@ -22,6 +22,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
@ -71,7 +72,7 @@ public abstract class BlockContainerBase extends BlockContainer{
}
protected void registerRendering(){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
public EnumRarity getRarity(ItemStack stack){

View file

@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.block.BlockCrops;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
@ -66,7 +67,7 @@ public class BlockPlant extends BlockCrops{
}
protected void registerRendering(){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
public EnumRarity getRarity(ItemStack stack){

View file

@ -16,6 +16,7 @@ import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.block.Block;
import net.minecraft.block.BlockStairs;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
@ -55,7 +56,7 @@ public class BlockStair extends BlockStairs{
}
protected void registerRendering(){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
public EnumRarity getRarity(ItemStack stack){

View file

@ -18,6 +18,7 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
@ -53,10 +54,9 @@ public class ItemAllToolAA extends ItemToolAA implements IColorProvidingItem{
@Override
protected void registerRendering(){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID, "itemPaxel"));
ActuallyAdditions.proxy.addRenderVariant(this, new ResourceLocation(ModUtil.MOD_ID, "itemPaxel"));
ResourceLocation resLoc = new ResourceLocation(ModUtil.MOD_ID, "itemPaxel");
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(resLoc, "inventory"));
ActuallyAdditions.proxy.addRenderVariant(this, resLoc);
}
@Override

View file

@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.mod.blocks.BlockCrystal;
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
@ -60,9 +61,9 @@ public class ItemCrystal extends ItemBase{
protected void registerRendering(){
ResourceLocation[] resLocs = new ResourceLocation[BlockCrystal.allCrystals.length];
for(int i = 0; i < BlockCrystal.allCrystals.length; i++){
String name = this.getBaseName()+BlockCrystal.allCrystals[i].name;
String name = this.getRegistryName()+BlockCrystal.allCrystals[i].name;
resLocs[i] = new ResourceLocation(ModUtil.MOD_ID, name);
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID, name));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(name, "inventory"));
}
ActuallyAdditions.proxy.addRenderVariant(this, resLocs);
}

View file

@ -24,6 +24,7 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@ -345,9 +346,9 @@ public class ItemDrill extends ItemEnergy{
protected void registerRendering(){
ResourceLocation[] resLocs = new ResourceLocation[16];
for(int i = 0; i < 16; i++){
String name = this.getBaseName()+TheColoredLampColors.values()[i].name;
String name = this.getRegistryName()+TheColoredLampColors.values()[i].name;
resLocs[i] = new ResourceLocation(ModUtil.MOD_ID, name);
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID, name));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(name, "inventory"));
}
ActuallyAdditions.proxy.addRenderVariant(this, resLocs);
}

View file

@ -16,6 +16,7 @@ import de.ellpeck.actuallyadditions.mod.items.metalists.TheDusts;
import de.ellpeck.actuallyadditions.mod.util.IColorProvidingItem;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
@ -62,7 +63,7 @@ public class ItemDust extends ItemBase implements IColorProvidingItem{
@Override
protected void registerRendering(){
for(int i = 0; i < allDusts.length; i++){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
}

View file

@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemFoodBase;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
@ -104,9 +105,9 @@ public class ItemFoods extends ItemFoodBase{
protected void registerRendering(){
ResourceLocation[] resLocs = new ResourceLocation[allFoods.length];
for(int i = 0; i < allFoods.length; i++){
String name = this.getBaseName()+allFoods[i].name;
String name = this.getRegistryName()+allFoods[i].name;
resLocs[i] = new ResourceLocation(ModUtil.MOD_ID, name);
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID, name));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(name, "inventory"));
}
ActuallyAdditions.proxy.addRenderVariant(this, resLocs);
}

View file

@ -16,6 +16,7 @@ import de.ellpeck.actuallyadditions.mod.items.metalists.TheJams;
import de.ellpeck.actuallyadditions.mod.util.IColorProvidingItem;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
@ -102,7 +103,7 @@ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{
@Override
protected void registerRendering(){
for(int i = 0; i < allJams.length; i++){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
}

View file

@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
@ -61,9 +62,9 @@ public class ItemMisc extends ItemBase{
protected void registerRendering(){
ResourceLocation[] resLocs = new ResourceLocation[allMiscItems.length];
for(int i = 0; i < allMiscItems.length; i++){
String name = this.getBaseName()+allMiscItems[i].name;
String name = this.getRegistryName()+allMiscItems[i].name;
resLocs[i] = new ResourceLocation(ModUtil.MOD_ID, name);
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID, name));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(name, "inventory"));
}
ActuallyAdditions.proxy.addRenderVariant(this, resLocs);
}

View file

@ -16,6 +16,7 @@ import de.ellpeck.actuallyadditions.mod.items.metalists.ThePotionRings;
import de.ellpeck.actuallyadditions.mod.util.IColorProvidingItem;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
@ -107,7 +108,7 @@ public class ItemPotionRing extends ItemBase implements IColorProvidingItem{
@Override
protected void registerRendering(){
for(int i = 0; i < allRings.length; i++){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
}

View file

@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerEnergizer;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerEnervator;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
@ -54,7 +55,7 @@ public class ItemArmorAA extends ItemArmor{
}
protected void registerRendering(){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
@Override

View file

@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items.base;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
@ -43,6 +44,6 @@ public class ItemBase extends Item{
}
protected void registerRendering(){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
}

View file

@ -14,6 +14,7 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.init.Items;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemBucket;
@ -47,7 +48,7 @@ public class ItemBucketAA extends ItemBucket{
}
protected void registerRendering(){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
@Override

View file

@ -14,6 +14,7 @@ import cofh.api.energy.ItemEnergyContainer;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
@ -54,7 +55,7 @@ public abstract class ItemEnergy extends ItemEnergyContainer{
}
protected void registerRendering(){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
@Override

View file

@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items.base;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
@ -44,6 +45,6 @@ public class ItemFoodBase extends ItemFood{
}
protected void registerRendering(){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
}

View file

@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items.base;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemHoe;
@ -50,7 +51,7 @@ public class ItemHoeAA extends ItemHoe{
}
protected void registerRendering(){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
@Override

View file

@ -16,6 +16,7 @@ import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.init.Blocks;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
@ -61,7 +62,7 @@ public class ItemSeed extends ItemSeeds{
}
protected void registerRendering(){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
@Override

View file

@ -14,6 +14,7 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
@ -50,7 +51,7 @@ public class ItemSwordAA extends ItemSword{
}
protected void registerRendering(){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
protected Class<? extends ItemBlockBase> getItemBlock(){

View file

@ -2,12 +2,11 @@ package de.ellpeck.actuallyadditions.mod.items.base;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemTool;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.oredict.OreDictionary;
import java.util.Set;
@ -49,7 +48,7 @@ public class ItemToolAA extends ItemTool{
}
protected void registerRendering(){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ResourceLocation(ModUtil.MOD_ID, this.getBaseName()));
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
}
@Override

View file

@ -60,7 +60,7 @@ public class ClientProxy implements IProxy{
public static int bookletCharCount;
private static List<Item> colorProdividingItemsForRegistering = new ArrayList<Item>();
private static Map<ItemStack, ResourceLocation> modelLocationsForRegistering = new HashMap<ItemStack, ResourceLocation>();
private static Map<ItemStack, ModelResourceLocation> modelLocationsForRegistering = new HashMap<ItemStack, ModelResourceLocation>();
private static Map<Item, ResourceLocation[]> modelVariantsForRegistering = new HashMap<Item, ResourceLocation[]>();
private static void countBookletWords(){
@ -99,8 +99,8 @@ public class ClientProxy implements IProxy{
PersistentClientData.setTheFile(new File(Minecraft.getMinecraft().mcDataDir, ModUtil.MOD_ID+"Data.dat"));
for(Map.Entry<ItemStack, ResourceLocation> entry : modelLocationsForRegistering.entrySet()){
ModelLoader.setCustomModelResourceLocation(entry.getKey().getItem(), entry.getKey().getItemDamage(), new ModelResourceLocation(entry.getValue(), "inventory"));
for(Map.Entry<ItemStack, ModelResourceLocation> entry : modelLocationsForRegistering.entrySet()){
ModelLoader.setCustomModelResourceLocation(entry.getKey().getItem(), entry.getKey().getItemDamage(), entry.getValue());
}
for(Map.Entry<Item, ResourceLocation[]> entry : modelVariantsForRegistering.entrySet()){
ModelBakery.registerItemVariants(entry.getKey(), entry.getValue());
@ -165,7 +165,7 @@ public class ClientProxy implements IProxy{
}
@Override
public void addRenderRegister(ItemStack stack, ResourceLocation location){
public void addRenderRegister(ItemStack stack, ModelResourceLocation location){
modelLocationsForRegistering.put(stack, location);
}

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.proxy;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
@ -25,7 +26,7 @@ public interface IProxy{
void postInit(FMLPostInitializationEvent event);
void addRenderRegister(ItemStack stack, ResourceLocation location);
void addRenderRegister(ItemStack stack, ModelResourceLocation location);
void addRenderVariant(Item item, ResourceLocation... location);

View file

@ -11,6 +11,8 @@
package de.ellpeck.actuallyadditions.mod.proxy;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
@ -37,7 +39,7 @@ public class ServerProxy implements IProxy{
}
@Override
public void addRenderRegister(ItemStack stack, ResourceLocation location){
public void addRenderRegister(ItemStack stack, ModelResourceLocation location){
}

View file

@ -121,7 +121,6 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
private void shootLaser(int endX, int endY, int endZ, Lens currentLens){
if(!ConfigValues.lessSound){
System.out.println("SOUND!");
this.worldObj.playSound(null, this.getX(), this.getY(), this.getZ(), SoundHandler.reconstructor, SoundCategory.BLOCKS, 0.35F, 1.0F);
}
PacketHandler.theNetwork.sendToAllAround(new PacketParticle(this.getX(), this.getY(), this.getZ(), endX, endY, endZ, currentLens.getColor(), ConfigValues.lessParticles ? 2 : 8, 2F), new NetworkRegistry.TargetPoint(this.worldObj.provider.getDimension(), this.getX(), this.getY(), this.getZ(), 64));

View file

@ -83,8 +83,10 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements
}
else if(this.isPlacer && PosUtil.getBlock(coordsBlock, this.worldObj).isReplaceable(this.worldObj, coordsBlock)){
if(this.tank.getFluidAmount() >= FluidContainerRegistry.BUCKET_VOLUME){
if(this.tank.getFluid().getFluid().getBlock() != null){
WorldUtil.useItemAtSide(sideToManipulate, this.worldObj, this.pos, new ItemStack(this.tank.getFluid().getFluid().getBlock()));
//TODO Fix this because apparently getting the item of the water block (for the ItemStack) returns null
Block block = this.tank.getFluid().getFluid().getBlock();
if(block != null){
WorldUtil.useItemAtSide(sideToManipulate, this.worldObj, this.pos, new ItemStack(block));
this.tank.drain(FluidContainerRegistry.BUCKET_VOLUME, true);
}
}

View file

@ -0,0 +1,28 @@
{
"forge_marker": 1,
"defaults": {
"model": "minecraft:cube",
"textures": {
"particle": "actuallyadditions:blocks/blockBreaker",
"down": "#particle",
"up": "actuallyadditions:blocks/blockBreakerTop",
"south": "#particle",
"north": "actuallyadditions:blocks/blockBreakerFront",
"east": "#particle",
"west": "#particle"
},
"transform": "forge:default-block"
},
"variants": {
"normal": [{}],
"inventory": [{}],
"meta": {
"0": { "x" : 90 },
"1": { "x" : 270 },
"2": { "y" : 0 },
"3": { "y" : 180 },
"4": { "y" : 270 },
"5": { "y" : 90 }
}
}
}

View file

@ -0,0 +1,28 @@
{
"forge_marker": 1,
"defaults": {
"model": "minecraft:cube",
"textures": {
"particle": "actuallyadditions:blocks/blockDirectionalBreaker",
"down": "#particle",
"up": "actuallyadditions:blocks/blockDirectionalBreakerTop",
"south": "#particle",
"north": "actuallyadditions:blocks/blockDirectionalBreakerFront",
"east": "#particle",
"west": "#particle"
},
"transform": "forge:default-block"
},
"variants": {
"normal": [{}],
"inventory": [{}],
"meta": {
"0": { "x" : 90 },
"1": { "x" : 270 },
"2": { "y" : 0 },
"3": { "y" : 180 },
"4": { "y" : 270 },
"5": { "y" : 90 }
}
}
}

View file

@ -0,0 +1,28 @@
{
"forge_marker": 1,
"defaults": {
"model": "minecraft:cube",
"textures": {
"particle": "actuallyadditions:blocks/blockDropper",
"down": "#particle",
"up": "actuallyadditions:blocks/blockDropperTop",
"south": "#particle",
"north": "actuallyadditions:blocks/blockDropperFront",
"east": "#particle",
"west": "#particle"
},
"transform": "forge:default-block"
},
"variants": {
"normal": [{}],
"inventory": [{}],
"meta": {
"0": { "x" : 90 },
"1": { "x" : 270 },
"2": { "y" : 0 },
"3": { "y" : 180 },
"4": { "y" : 270 },
"5": { "y" : 90 }
}
}
}

View file

@ -0,0 +1,28 @@
{
"forge_marker": 1,
"defaults": {
"model": "minecraft:cube",
"textures": {
"particle": "actuallyadditions:blocks/blockFluidCollector",
"down": "#particle",
"up": "actuallyadditions:blocks/blockFluidCollectorTop",
"south": "#particle",
"north": "actuallyadditions:blocks/blockFluidCollectorFront",
"east": "#particle",
"west": "#particle"
},
"transform": "forge:default-block"
},
"variants": {
"normal": [{}],
"inventory": [{}],
"meta": {
"0": { "x" : 90 },
"1": { "x" : 270 },
"2": { "y" : 0 },
"3": { "y" : 180 },
"4": { "y" : 270 },
"5": { "y" : 90 }
}
}
}

View file

@ -0,0 +1,28 @@
{
"forge_marker": 1,
"defaults": {
"model": "minecraft:cube",
"textures": {
"particle": "actuallyadditions:blocks/blockFluidPlacer",
"down": "#particle",
"up": "actuallyadditions:blocks/blockFluidPlacerTop",
"south": "#particle",
"north": "actuallyadditions:blocks/blockFluidPlacerFront",
"east": "#particle",
"west": "#particle"
},
"transform": "forge:default-block"
},
"variants": {
"normal": [{}],
"inventory": [{}],
"meta": {
"0": { "x" : 90 },
"1": { "x" : 270 },
"2": { "y" : 0 },
"3": { "y" : 180 },
"4": { "y" : 270 },
"5": { "y" : 90 }
}
}
}

View file

@ -0,0 +1,28 @@
{
"forge_marker": 1,
"defaults": {
"model": "minecraft:cube",
"textures": {
"particle": "actuallyadditions:blocks/blockPlacer",
"down": "#particle",
"up": "actuallyadditions:blocks/blockPlacerTop",
"south": "#particle",
"north": "actuallyadditions:blocks/blockPlacerFront",
"east": "#particle",
"west": "#particle"
},
"transform": "forge:default-block"
},
"variants": {
"normal": [{}],
"inventory": [{}],
"meta": {
"0": { "x" : 90 },
"1": { "x" : 270 },
"2": { "y" : 0 },
"3": { "y" : 180 },
"4": { "y" : 270 },
"5": { "y" : 90 }
}
}
}

View file

@ -0,0 +1,14 @@
{
"forge_marker": 1,
"defaults": {
"model": "minecraft:cube_all",
"textures": {
"all": "actuallyadditions:blocks/blockRangedCollector"
},
"transform": "forge:default-block"
},
"variants": {
"normal": [{}],
"inventory": [{}]
}
}

View file

@ -0,0 +1,23 @@
{
"forge_marker": 1,
"defaults": {
"model": "minecraft:cube_all",
"transform": "forge:default-block"
},
"variants": {
"normal": [{}],
"inventory": [{}],
"meta": {
"0": { "textures" : { "all" : "actuallyadditions:blocks/blockMiscBlackQuartzPillar" } },
"1": { "textures" : { "all" : "actuallyadditions:blocks/blockMiscBlackQuartzChiseled" } },
"2": { "textures" : { "all" : "actuallyadditions:blocks/blockMiscBlackQuartz" } },
"3": { "textures" : { "all" : "actuallyadditions:blocks/blockMiscOreBlackQuartz" } },
"4": { "textures" : { "all" : "actuallyadditions:blocks/blockMiscWoodCasing" } },
"5": { "textures" : { "all" : "actuallyadditions:blocks/blockMiscCharcoal" } },
"6": { "textures" : { "all" : "actuallyadditions:blocks/blockMiscEnderpearl" } },
"7": { "textures" : { "all" : "actuallyadditions:blocks/blockMiscLavaFactoryCase" } },
"8": { "textures" : { "all" : "actuallyadditions:blocks/blockMiscEnderCasing" } },
"9": { "textures" : { "all" : "actuallyadditions:blocks/blockMiscIronCasing" } }
}
}
}