mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
This doesn't work.
This commit is contained in:
parent
020384f5ff
commit
c08d2221fa
24 changed files with 122 additions and 0 deletions
|
@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.base;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
|
@ -41,6 +42,8 @@ public class BlockBase extends Block{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.base;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.block.BlockBush;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
|
@ -39,6 +40,8 @@ public class BlockBushBase extends BlockBush{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -59,6 +59,8 @@ public abstract class BlockContainerBase extends BlockContainer{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -14,6 +14,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.base;
|
|||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.PosUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -45,6 +46,8 @@ public class BlockFluidFlowing extends BlockFluidClassic{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.base;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.block.BlockCrops;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
@ -51,6 +52,8 @@ public class BlockPlant extends BlockCrops{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.base;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
@ -44,6 +45,8 @@ public class BlockStair extends BlockStairs{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.base;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockWall;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
@ -51,6 +52,8 @@ public class BlockWallAA extends BlockWall{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.mod.config.ConfigValues;
|
|||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDirt;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -74,6 +75,8 @@ public class ItemAllToolAA extends ItemTool{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items.base;
|
|||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -46,6 +47,8 @@ public class ItemArmorAA extends ItemArmor{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items.base;
|
|||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemAxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -43,6 +44,8 @@ public class ItemAxeAA extends ItemAxe{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.items.base;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
|
@ -35,6 +36,8 @@ public class ItemBase extends Item{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.items.base;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
@ -40,6 +41,8 @@ public class ItemBucketAA extends ItemBucket{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items.base;
|
|||
import cofh.api.energy.ItemEnergyContainer;
|
||||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -47,6 +48,8 @@ public abstract class ItemEnergy extends ItemEnergyContainer{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.items.base;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
|
@ -36,6 +37,8 @@ public class ItemFoodBase extends ItemFood{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items.base;
|
|||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemHoe;
|
||||
|
@ -44,6 +45,8 @@ public class ItemHoeAA extends ItemHoe{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items.base;
|
|||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -43,6 +44,8 @@ public class ItemPickaxeAA extends ItemPickaxe{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.items.base;
|
|||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemSpade;
|
||||
|
@ -44,6 +45,8 @@ public class ItemShovelAA extends ItemSpade{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -14,6 +14,7 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
|
|||
import de.ellpeck.actuallyadditions.mod.creative.CreativeTab;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
|
@ -44,6 +45,8 @@ public class ItemSwordAA extends ItemSword{
|
|||
else{
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
Util.ITEMS_AND_BLOCKS.add(this);
|
||||
}
|
||||
|
||||
protected String getBaseName(){
|
||||
|
|
|
@ -22,8 +22,14 @@ import de.ellpeck.actuallyadditions.mod.misc.special.SpecialRenderInit;
|
|||
import de.ellpeck.actuallyadditions.mod.tile.*;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import de.ellpeck.actuallyadditions.mod.util.playerdata.PersistentClientData;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemModelMesher;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
|
@ -31,7 +37,9 @@ import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
|||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class ClientProxy implements IProxy{
|
||||
|
@ -75,6 +83,24 @@ public class ClientProxy implements IProxy{
|
|||
|
||||
//TODO Fix villager
|
||||
//VillagerRegistry.instance().registerVillagerSkin(ConfigIntValues.JAM_VILLAGER_ID.getValue(), new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/entity/villager/jamVillager.png"));
|
||||
|
||||
for(Object o : Util.ITEMS_AND_BLOCKS){
|
||||
ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher();
|
||||
if(o instanceof Item){
|
||||
List<ItemStack> subItems = new ArrayList<ItemStack>();
|
||||
((Item)o).getSubItems((Item)o, null, subItems);
|
||||
for(ItemStack aStack : subItems){
|
||||
mesher.register(aStack.getItem(), aStack.getItemDamage(), new ModelResourceLocation(ModUtil.MOD_ID_LOWER+":"+aStack.getItem().getRegistryName(), "inventory"));
|
||||
}
|
||||
}
|
||||
else if(o instanceof Block){
|
||||
List<ItemStack> subItems = new ArrayList<ItemStack>();
|
||||
((Block)o).getSubBlocks(Item.getItemFromBlock((Block)o), null, subItems);
|
||||
for(ItemStack aStack : subItems){
|
||||
mesher.register(aStack.getItem(), aStack.getItemDamage(), new ModelResourceLocation(ModUtil.MOD_ID_LOWER+":"+aStack.getItem().getRegistryName(), "inventory"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,12 +24,15 @@ import net.minecraftforge.common.MinecraftForge;
|
|||
import net.minecraftforge.common.util.EnumHelper;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class Util{
|
||||
|
||||
public static final List ITEMS_AND_BLOCKS = new ArrayList();
|
||||
|
||||
public static final Random RANDOM = new Random();
|
||||
public static final int WILDCARD = OreDictionary.WILDCARD_VALUE;
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"variants": {
|
||||
"meta=0": { "model": "actuallyadditions:blockGrinder" },
|
||||
"meta=1": { "model": "actuallyadditions:blockGrinderOn" }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"parent": "block/cube",
|
||||
"textures": {
|
||||
"particle": "actuallyadditions:blocks/blockGrinder",
|
||||
"down": "actuallyadditions:blocks/blockGrinderBottom",
|
||||
"up": "actuallyadditions:blocks/blockGrinderTop",
|
||||
"north": "actuallyadditions:blocks/blockGrinder",
|
||||
"east": "actuallyadditions:blocks/blockGrinder",
|
||||
"south": "actuallyadditions:blocks/blockGrinder",
|
||||
"west": "actuallyadditions:blocks/blockGrinder"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"parent": "block/cube",
|
||||
"textures": {
|
||||
"particle": "actuallyadditions:blocks/blockGrinder",
|
||||
"down": "actuallyadditions:blocks/blockGrinderBottom",
|
||||
"up": "actuallyadditions:blocks/blockGrinderOn",
|
||||
"north": "actuallyadditions:blocks/blockGrinder",
|
||||
"east": "actuallyadditions:blocks/blockGrinder",
|
||||
"south": "actuallyadditions:blocks/blockGrinder",
|
||||
"west": "actuallyadditions:blocks/blockGrinder"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"parent": "actuallyadditions:block/blockGrinder",
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ 10, -45, 170 ],
|
||||
"translation": [ 0, 1.5, -2.75 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue