mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-23 03:49:22 +01:00
parent
c2c33412bf
commit
2ebe4989b7
29 changed files with 35 additions and 30 deletions
|
@ -126,7 +126,7 @@ public class BlockColoredLamp extends BlockBase{
|
|||
@Override
|
||||
protected void registerRendering(){
|
||||
for(int i = 0; i < allLampTypes.length; i++){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(this.getRegistryName(), META.getName()+"="+i));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), META.getName()+"="+i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ public class BlockCrystal extends BlockBase{
|
|||
@Override
|
||||
protected void registerRendering(){
|
||||
for(int i = 0; i < allCrystals.length; i++){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(this.getRegistryName(), META.getName()+"="+i));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), META.getName()+"="+i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ public class BlockMisc extends BlockBase{
|
|||
@Override
|
||||
protected void registerRendering(){
|
||||
for(int i = 0; i < ALL_MISC_BLOCKS.length; i++){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(this.getRegistryName(), META.getName()+"="+i));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), META.getName()+"="+i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ public class BlockWildPlant extends BlockBushBase{
|
|||
@Override
|
||||
protected void registerRendering(){
|
||||
for(int i = 0; i < allWildPlants.length; i++){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(this.getRegistryName(), META.getName()+"="+i));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), META.getName()+"="+i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ public class BlockBase extends Block{
|
|||
}
|
||||
|
||||
protected void registerRendering(){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
|
||||
}
|
||||
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
|
|
|
@ -53,7 +53,7 @@ public class BlockBushBase extends BlockBush{
|
|||
}
|
||||
|
||||
protected void registerRendering(){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
|
||||
}
|
||||
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
|
|
|
@ -74,7 +74,7 @@ public abstract class BlockContainerBase extends BlockContainer{
|
|||
}
|
||||
|
||||
protected void registerRendering(){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
|
||||
}
|
||||
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
|
|
|
@ -66,7 +66,7 @@ public class BlockPlant extends BlockCrops{
|
|||
}
|
||||
|
||||
protected void registerRendering(){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
|
||||
}
|
||||
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
|
|
|
@ -55,7 +55,7 @@ public class BlockStair extends BlockStairs{
|
|||
}
|
||||
|
||||
protected void registerRendering(){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
|
||||
}
|
||||
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
|
|
|
@ -81,7 +81,7 @@ public class EntityLivingEvents{
|
|||
|
||||
data.setTag("Deaths", deaths);
|
||||
|
||||
player.addChatComponentMessage(new TextComponentTranslation("info."+ModUtil.MOD_ID+".deathRecorded"));
|
||||
//player.addChatComponentMessage(new TextComponentTranslation("info."+ModUtil.MOD_ID+".deathRecorded"));
|
||||
WorldData.makeDirty();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public class ItemAllToolAA extends ItemToolAA implements IColorProvidingItem{
|
|||
@Override
|
||||
protected void registerRendering(){
|
||||
ResourceLocation resLoc = new ResourceLocation(ModUtil.MOD_ID, "itemPaxel");
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(resLoc, "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), resLoc, "inventory");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -62,7 +63,7 @@ public class ItemCrystal extends ItemBase{
|
|||
protected void registerRendering(){
|
||||
for(int i = 0; i < BlockCrystal.allCrystals.length; i++){
|
||||
String name = this.getRegistryName()+BlockCrystal.allCrystals[i].name;
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(name, "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(name), "inventory");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -344,7 +344,7 @@ public class ItemDrill extends ItemEnergy{
|
|||
protected void registerRendering(){
|
||||
for(int i = 0; i < 16; i++){
|
||||
String name = this.getRegistryName()+TheColoredLampColors.values()[i].name;
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(name, "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(name), "inventory");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,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 ModelResourceLocation(this.getRegistryName(), "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), "inventory");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ public class ItemFoods extends ItemFoodBase{
|
|||
protected void registerRendering(){
|
||||
for(int i = 0; i < allFoods.length; i++){
|
||||
String name = this.getRegistryName()+allFoods[i].name;
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(name, "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(name), "inventory");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -104,7 +104,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 ModelResourceLocation(this.getRegistryName(), "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), "inventory");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -63,7 +64,7 @@ public class ItemMisc extends ItemBase{
|
|||
protected void registerRendering(){
|
||||
for(int i = 0; i < allMiscItems.length; i++){
|
||||
String name = this.getRegistryName()+allMiscItems[i].name;
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(name, "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(name), "inventory");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,7 +110,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 ModelResourceLocation(this.getRegistryName(), "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), "inventory");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ public class ItemArmorAA extends ItemArmor{
|
|||
}
|
||||
|
||||
protected void registerRendering(){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -42,6 +42,6 @@ public class ItemBase extends Item{
|
|||
}
|
||||
|
||||
protected void registerRendering(){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ public abstract class ItemEnergy extends ItemEnergyContainer{
|
|||
}
|
||||
|
||||
protected void registerRendering(){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -43,6 +43,6 @@ public class ItemFoodBase extends ItemFood{
|
|||
}
|
||||
|
||||
protected void registerRendering(){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public class ItemHoeAA extends ItemHoe{
|
|||
}
|
||||
|
||||
protected void registerRendering(){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public class ItemSeed extends ItemSeeds{
|
|||
}
|
||||
|
||||
protected void registerRendering(){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public class ItemSwordAA extends ItemSword{
|
|||
}
|
||||
|
||||
protected void registerRendering(){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
|
||||
}
|
||||
|
||||
protected Class<? extends ItemBlockBase> getItemBlock(){
|
||||
|
|
|
@ -59,7 +59,7 @@ public class ItemToolAA extends ItemTool{
|
|||
}
|
||||
|
||||
protected void registerRendering(){
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), new ModelResourceLocation(this.getRegistryName(), "inventory"));
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ import net.minecraft.client.resources.IResourceManager;
|
|||
import net.minecraft.client.resources.IResourceManagerReloadListener;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
@ -181,8 +182,8 @@ public class ClientProxy implements IProxy{
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addRenderRegister(ItemStack stack, ModelResourceLocation location){
|
||||
MODEL_LOCATIONS_FOR_REGISTERING.put(stack, location);
|
||||
public void addRenderRegister(ItemStack stack, ResourceLocation location, String variant){
|
||||
MODEL_LOCATIONS_FOR_REGISTERING.put(stack, new ModelResourceLocation(location, variant));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,6 +13,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;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
|
@ -25,7 +26,7 @@ public interface IProxy{
|
|||
|
||||
void postInit(FMLPostInitializationEvent event);
|
||||
|
||||
void addRenderRegister(ItemStack stack, ModelResourceLocation location);
|
||||
void addRenderRegister(ItemStack stack, ResourceLocation location, String variant);
|
||||
|
||||
void addColoredItem(Item item);
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ 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;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
|
@ -37,7 +38,7 @@ public class ServerProxy implements IProxy{
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addRenderRegister(ItemStack stack, ModelResourceLocation location){
|
||||
public void addRenderRegister(ItemStack stack, ResourceLocation location, String variant){
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue