Added an automatic feeder and prep for a new block
|
@ -22,7 +22,7 @@ group = "ellpeck.someprettyrandomstuff"
|
||||||
archivesBaseName = "SomePrettyRandomStuff"
|
archivesBaseName = "SomePrettyRandomStuff"
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
version = "1.8-11.14.0.1295-1.8"
|
version = "1.7.10-10.13.2.1291"
|
||||||
runDir = "idea"
|
runDir = "idea"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
package ellpeck.someprettyrandomstuff;
|
package ellpeck.someprettyrandomstuff;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.Mod;
|
||||||
|
import cpw.mods.fml.common.SidedProxy;
|
||||||
|
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||||
|
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||||
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||||
import ellpeck.someprettyrandomstuff.achievement.AchievementEvent;
|
import ellpeck.someprettyrandomstuff.achievement.AchievementEvent;
|
||||||
import ellpeck.someprettyrandomstuff.achievement.InitAchievements;
|
import ellpeck.someprettyrandomstuff.achievement.InitAchievements;
|
||||||
import ellpeck.someprettyrandomstuff.blocks.InitBlocks;
|
import ellpeck.someprettyrandomstuff.blocks.InitBlocks;
|
||||||
|
@ -8,14 +13,10 @@ import ellpeck.someprettyrandomstuff.crafting.InitCrafting;
|
||||||
import ellpeck.someprettyrandomstuff.gen.OreGen;
|
import ellpeck.someprettyrandomstuff.gen.OreGen;
|
||||||
import ellpeck.someprettyrandomstuff.inventory.GuiHandler;
|
import ellpeck.someprettyrandomstuff.inventory.GuiHandler;
|
||||||
import ellpeck.someprettyrandomstuff.items.InitItems;
|
import ellpeck.someprettyrandomstuff.items.InitItems;
|
||||||
|
import ellpeck.someprettyrandomstuff.material.InitItemMaterials;
|
||||||
import ellpeck.someprettyrandomstuff.proxy.IProxy;
|
import ellpeck.someprettyrandomstuff.proxy.IProxy;
|
||||||
import ellpeck.someprettyrandomstuff.tile.TileEntityBase;
|
import ellpeck.someprettyrandomstuff.tile.TileEntityBase;
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
|
||||||
import net.minecraftforge.fml.common.SidedProxy;
|
|
||||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
|
||||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
|
||||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
|
||||||
|
|
||||||
@Mod(modid = Util.MOD_ID, name = Util.NAME, version = Util.VERSION)
|
@Mod(modid = Util.MOD_ID, name = Util.NAME, version = Util.VERSION)
|
||||||
public class SPRS{
|
public class SPRS{
|
||||||
|
@ -33,6 +34,7 @@ public class SPRS{
|
||||||
Util.logInfo("Starting PreInitialization Phase...");
|
Util.logInfo("Starting PreInitialization Phase...");
|
||||||
|
|
||||||
ConfigurationHandler.init(event.getSuggestedConfigurationFile());
|
ConfigurationHandler.init(event.getSuggestedConfigurationFile());
|
||||||
|
InitItemMaterials.init();
|
||||||
InitBlocks.init();
|
InitBlocks.init();
|
||||||
InitItems.init();
|
InitItems.init();
|
||||||
proxy.preInit();
|
proxy.preInit();
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
package ellpeck.someprettyrandomstuff.achievement;
|
package ellpeck.someprettyrandomstuff.achievement;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||||
import ellpeck.someprettyrandomstuff.blocks.InitBlocks;
|
import ellpeck.someprettyrandomstuff.blocks.InitBlocks;
|
||||||
import ellpeck.someprettyrandomstuff.items.InitItems;
|
import ellpeck.someprettyrandomstuff.items.InitItems;
|
||||||
import ellpeck.someprettyrandomstuff.items.metalists.TheFoods;
|
import ellpeck.someprettyrandomstuff.items.metalists.TheFoods;
|
||||||
import ellpeck.someprettyrandomstuff.items.metalists.TheMiscItems;
|
import ellpeck.someprettyrandomstuff.items.metalists.TheMiscItems;
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
|
||||||
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
|
|
||||||
|
|
||||||
public class AchievementEvent{
|
public class AchievementEvent{
|
||||||
|
|
||||||
|
@ -30,6 +30,12 @@ public class AchievementEvent{
|
||||||
if(event.crafting.getItem() == InitItems.itemMisc && event.crafting.getItemDamage() == TheMiscItems.MASHED_FOOD.ordinal()){
|
if(event.crafting.getItem() == InitItems.itemMisc && event.crafting.getItemDamage() == TheMiscItems.MASHED_FOOD.ordinal()){
|
||||||
event.player.addStat(InitAchievements.achievementCraftMashedFood, 1);
|
event.player.addStat(InitAchievements.achievementCraftMashedFood, 1);
|
||||||
}
|
}
|
||||||
|
if(event.crafting.getItem() == InitItems.itemMisc && event.crafting.getItemDamage() == TheMiscItems.KNIFE_BLADE.ordinal()){
|
||||||
|
event.player.addStat(InitAchievements.achievementCraftKnifeBlade, 1);
|
||||||
|
}
|
||||||
|
if(event.crafting.getItem() == InitItems.itemKnife){
|
||||||
|
event.player.addStat(InitAchievements.achievementCraftKnife, 1);
|
||||||
|
}
|
||||||
if(event.crafting.getItem() == InitItems.itemFoods && event.crafting.getItemDamage() == TheFoods.SUBMARINE_SANDWICH.ordinal()){
|
if(event.crafting.getItem() == InitItems.itemFoods && event.crafting.getItemDamage() == TheFoods.SUBMARINE_SANDWICH.ordinal()){
|
||||||
event.player.addStat(InitAchievements.achievementCraftSubSandwich, 1);
|
event.player.addStat(InitAchievements.achievementCraftSubSandwich, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ public class AchievementSPRS extends Achievement{
|
||||||
public AchievementSPRS(String name, int x, int y, ItemStack displayStack, Achievement hasToHaveBefore){
|
public AchievementSPRS(String name, int x, int y, ItemStack displayStack, Achievement hasToHaveBefore){
|
||||||
super("achievement." + name, name, x, y, displayStack, hasToHaveBefore);
|
super("achievement." + name, name, x, y, displayStack, hasToHaveBefore);
|
||||||
InitAchievements.achievementList.add(this);
|
InitAchievements.achievementList.add(this);
|
||||||
if(hasToHaveBefore == null) this.func_180789_a();
|
if(hasToHaveBefore == null) this.initIndependentStat();
|
||||||
this.func_180788_c();
|
this.registerStat();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,6 +17,9 @@ public class InitAchievements{
|
||||||
public static AchievementPage theAchievementPage;
|
public static AchievementPage theAchievementPage;
|
||||||
public static ArrayList<Achievement> achievementList = new ArrayList<Achievement>();
|
public static ArrayList<Achievement> achievementList = new ArrayList<Achievement>();
|
||||||
|
|
||||||
|
public static Achievement achievementCraftKnifeBlade;
|
||||||
|
public static Achievement achievementCraftKnife;
|
||||||
|
|
||||||
public static Achievement achievementCraftDough;
|
public static Achievement achievementCraftDough;
|
||||||
public static Achievement achievementSmeltBaguette;
|
public static Achievement achievementSmeltBaguette;
|
||||||
public static Achievement achievementCraftSubSandwich;
|
public static Achievement achievementCraftSubSandwich;
|
||||||
|
@ -33,21 +36,24 @@ public class InitAchievements{
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Initializing Achievements...");
|
Util.logInfo("Initializing Achievements...");
|
||||||
|
|
||||||
achievementCraftDough = new AchievementSPRS("craftDough", 0, -3, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), null);
|
achievementCraftKnifeBlade = new AchievementSPRS("craftKnifeBlade", -2, 0, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()), null);
|
||||||
|
achievementCraftKnife = new AchievementSPRS("craftKnife", 0, 0, new ItemStack(InitItems.itemKnife), achievementCraftKnifeBlade);
|
||||||
|
|
||||||
|
achievementCraftDough = new AchievementSPRS("craftDough", 0, -3, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), achievementCraftKnife);
|
||||||
achievementSmeltBaguette = new AchievementSPRS("smeltBaguette", 2, -3, new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), achievementCraftDough);
|
achievementSmeltBaguette = new AchievementSPRS("smeltBaguette", 2, -3, new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), achievementCraftDough);
|
||||||
achievementCraftSubSandwich = new AchievementSPRS("craftSubSandwich", 4, -3, new ItemStack(InitItems.itemFoods, 1, TheFoods.SUBMARINE_SANDWICH.ordinal()), achievementSmeltBaguette);
|
achievementCraftSubSandwich = new AchievementSPRS("craftSubSandwich", 4, -3, new ItemStack(InitItems.itemFoods, 1, TheFoods.SUBMARINE_SANDWICH.ordinal()), achievementSmeltBaguette);
|
||||||
|
|
||||||
achievementCraftMashedFood = new AchievementSPRS("craftMashedFood", 0, 0 , new ItemStack(InitItems.itemMisc, 1, TheMiscItems.MASHED_FOOD.ordinal()), null);
|
achievementCraftMashedFood = new AchievementSPRS("craftMashedFood", 3, 0, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.MASHED_FOOD.ordinal()), achievementCraftKnife);
|
||||||
achievementCraftCompost = new AchievementSPRS("craftCompost", 2, 0, new ItemStack(InitBlocks.blockCompost), achievementCraftMashedFood);
|
achievementCraftCompost = new AchievementSPRS("craftCompost", 5, 0, new ItemStack(InitBlocks.blockCompost), achievementCraftMashedFood);
|
||||||
achievementCraftFertilizer = new AchievementSPRS("craftFertilizer", 4, 0, new ItemStack(InitItems.itemFertilizer), achievementCraftCompost);
|
achievementCraftFertilizer = new AchievementSPRS("craftFertilizer", 7, 0, new ItemStack(InitItems.itemFertilizer), achievementCraftCompost);
|
||||||
|
|
||||||
achievementCraftPaperCone = new AchievementSPRS("craftPaperCone", 0, 3, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), null);
|
achievementCraftPaperCone = new AchievementSPRS("craftPaperCone", 0, 3, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), achievementCraftKnife);
|
||||||
achievementCraftFrenchFry = new AchievementSPRS("craftFrenchFry", 2, 3, new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()), achievementCraftPaperCone);
|
achievementCraftFrenchFry = new AchievementSPRS("craftFrenchFry", 2, 3, new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()), achievementCraftPaperCone);
|
||||||
achievementCraftFrenchFries = new AchievementSPRS("craftFrenchFries", 4, 4, new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRIES.ordinal()), achievementCraftFrenchFry);
|
achievementCraftFrenchFries = new AchievementSPRS("craftFrenchFries", 4, 4, new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRIES.ordinal()), achievementCraftFrenchFry);
|
||||||
achievementCraftFishNChips = new AchievementSPRS("craftFishNChips", 4, 2, new ItemStack(InitItems.itemFoods, 1, TheFoods.FISH_N_CHIPS.ordinal()), achievementCraftFrenchFry);
|
achievementCraftFishNChips = new AchievementSPRS("craftFishNChips", 4, 2, new ItemStack(InitItems.itemFoods, 1, TheFoods.FISH_N_CHIPS.ordinal()), achievementCraftFrenchFry);
|
||||||
|
|
||||||
|
|
||||||
theAchievementPage = new AchievementPage(StatCollector.translateToLocal("achievement.page." + Util.MOD_ID), achievementList.toArray(new Achievement[achievementList.size()]));
|
theAchievementPage = new AchievementPage(StatCollector.translateToLocal("achievement.page." + Util.MOD_ID_LOWER), achievementList.toArray(new Achievement[achievementList.size()]));
|
||||||
AchievementPage.registerAchievementPage(theAchievementPage);
|
AchievementPage.registerAchievementPage(theAchievementPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,19 @@
|
||||||
package ellpeck.someprettyrandomstuff.blocks;
|
package ellpeck.someprettyrandomstuff.blocks;
|
||||||
|
|
||||||
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||||
import ellpeck.someprettyrandomstuff.achievement.InitAchievements;
|
import ellpeck.someprettyrandomstuff.achievement.InitAchievements;
|
||||||
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
||||||
import ellpeck.someprettyrandomstuff.items.ItemFertilizer;
|
import ellpeck.someprettyrandomstuff.items.ItemFertilizer;
|
||||||
import ellpeck.someprettyrandomstuff.items.ItemMisc;
|
import ellpeck.someprettyrandomstuff.items.ItemMisc;
|
||||||
import ellpeck.someprettyrandomstuff.items.metalists.TheMiscItems;
|
import ellpeck.someprettyrandomstuff.items.metalists.TheMiscItems;
|
||||||
import ellpeck.someprettyrandomstuff.tile.TileEntityCompost;
|
import ellpeck.someprettyrandomstuff.tile.TileEntityCompost;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.state.IBlockState;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.util.BlockPos;
|
|
||||||
import net.minecraft.util.EnumFacing;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -24,25 +23,26 @@ public class BlockCompost extends BlockContainerBase{
|
||||||
public BlockCompost(){
|
public BlockCompost(){
|
||||||
super(Material.wood);
|
super(Material.wood);
|
||||||
this.setCreativeTab(CreativeTab.instance);
|
this.setCreativeTab(CreativeTab.instance);
|
||||||
this.setUnlocalizedName("blockCompost");
|
this.setBlockName("blockCompost");
|
||||||
this.setHarvestLevel("axe", 0);
|
this.setHarvestLevel("axe", 0);
|
||||||
this.setHardness(1.0F);
|
this.setHardness(1.0F);
|
||||||
this.setStepSound(soundTypeWood);
|
this.setStepSound(soundTypeWood);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ){
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int f6, float f7, float f8, float f9){
|
||||||
if(!world.isRemote){
|
if(!world.isRemote){
|
||||||
ItemStack stackPlayer = player.getCurrentEquippedItem();
|
ItemStack stackPlayer = player.getCurrentEquippedItem();
|
||||||
TileEntityCompost tile = (TileEntityCompost)world.getTileEntity(pos);
|
TileEntityCompost tile = (TileEntityCompost)world.getTileEntity(x, y, z);
|
||||||
//Add items to be composted
|
//Add items to be composted
|
||||||
if(stackPlayer != null && stackPlayer.getItem() instanceof ItemMisc && stackPlayer.getMetadata() == TheMiscItems.MASHED_FOOD.ordinal() && (tile.slots[0] == null || (!(tile.slots[0].getItem() instanceof ItemFertilizer) && tile.slots[0].stackSize < tile.amountNeededToConvert))){
|
if(stackPlayer != null && stackPlayer.getItem() instanceof ItemMisc && stackPlayer.getItemDamage() == TheMiscItems.MASHED_FOOD.ordinal() && (tile.slots[0] == null || (!(tile.slots[0].getItem() instanceof ItemFertilizer) && tile.slots[0].stackSize < tile.amountNeededToConvert))){
|
||||||
if(tile.slots[0] == null) tile.slots[0] = new ItemStack(stackPlayer.getItem(), 1, TheMiscItems.MASHED_FOOD.ordinal());
|
if(tile.slots[0] == null) tile.slots[0] = new ItemStack(stackPlayer.getItem(), 1, TheMiscItems.MASHED_FOOD.ordinal());
|
||||||
else tile.slots[0].stackSize++;
|
else tile.slots[0].stackSize++;
|
||||||
if(!player.capabilities.isCreativeMode) player.inventory.getCurrentItem().stackSize--;
|
if(!player.capabilities.isCreativeMode) player.inventory.getCurrentItem().stackSize--;
|
||||||
}
|
}
|
||||||
//Add Fertilizer to player's inventory
|
//Add Fertilizer to player's inventory
|
||||||
else if(stackPlayer == null && tile.slots[0] != null && tile.slots[0].getItem() instanceof ItemFertilizer){
|
else if(tile.slots[0] != null && (stackPlayer == null || (stackPlayer.getItem() instanceof ItemFertilizer && stackPlayer.stackSize <= stackPlayer.getMaxStackSize() - tile.slots[0].stackSize)) && tile.slots[0].getItem() instanceof ItemFertilizer){
|
||||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, tile.slots[0].copy());
|
if(stackPlayer == null) player.inventory.setInventorySlotContents(player.inventory.currentItem, tile.slots[0].copy());
|
||||||
|
else player.getCurrentEquippedItem().stackSize+=tile.slots[0].stackSize;
|
||||||
player.addStat(InitAchievements.achievementCraftFertilizer, 1);
|
player.addStat(InitAchievements.achievementCraftFertilizer, 1);
|
||||||
tile.slots[0] = null;
|
tile.slots[0] = null;
|
||||||
}
|
}
|
||||||
|
@ -50,18 +50,18 @@ public class BlockCompost extends BlockContainerBase{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addCollisionBoxesToList(World world, BlockPos pos, IBlockState state, AxisAlignedBB mask, List list, Entity collidingEntity){
|
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB mask, List list, Entity collidingEntity){
|
||||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.3125F, 1.0F);
|
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.3125F, 1.0F);
|
||||||
super.addCollisionBoxesToList(world, pos, state, mask, list, collidingEntity);
|
super.addCollisionBoxesToList(world, x, y, z, mask, list, collidingEntity);
|
||||||
float f = 0.125F;
|
float f = 0.125F;
|
||||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F);
|
this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F);
|
||||||
super.addCollisionBoxesToList(world, pos, state, mask, list, collidingEntity);
|
super.addCollisionBoxesToList(world, x, y, z, mask, list, collidingEntity);
|
||||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f);
|
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f);
|
||||||
super.addCollisionBoxesToList(world, pos, state, mask, list, collidingEntity);
|
super.addCollisionBoxesToList(world, x, y, z, mask, list, collidingEntity);
|
||||||
this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||||
super.addCollisionBoxesToList(world, pos, state, mask, list, collidingEntity);
|
super.addCollisionBoxesToList(world, x, y, z, mask, list, collidingEntity);
|
||||||
this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F);
|
this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F);
|
||||||
super.addCollisionBoxesToList(world, pos, state, mask, list, collidingEntity);
|
super.addCollisionBoxesToList(world, x, y, z, mask, list, collidingEntity);
|
||||||
this.setBlockBoundsForItemRender();
|
this.setBlockBoundsForItemRender();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,15 +73,20 @@ public class BlockCompost extends BlockContainerBase{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFullCube(){
|
public boolean renderAsNormalBlock(){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRenderType(){
|
public int getRenderType(){
|
||||||
return 3;
|
return RenderingRegistry.getNextAvailableRenderId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TileEntity createNewTileEntity(World world, int meta){
|
public TileEntity createNewTileEntity(World world, int meta){
|
||||||
return new TileEntityCompost();
|
return new TileEntityCompost();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void breakBlock(World world, int x, int y, int z, Block block, int par6){
|
||||||
|
this.dropInventory(world, x, y, z);
|
||||||
|
super.breakBlock(world, x, y, z, block, par6);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
@ -17,8 +16,8 @@ public abstract class BlockContainerBase extends BlockContainer{
|
||||||
super(mat);
|
super(mat);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TileEntityInventoryBase dropInventory(World world, BlockPos blockPos){
|
public TileEntityInventoryBase dropInventory(World world, int x, int y, int z){
|
||||||
TileEntityInventoryBase tileEntity = (TileEntityInventoryBase) world.getTileEntity(blockPos);
|
TileEntityInventoryBase tileEntity = (TileEntityInventoryBase)world.getTileEntity(x, y, z);
|
||||||
for (int i = 0; i < tileEntity.getSizeInventory(); i++){
|
for (int i = 0; i < tileEntity.getSizeInventory(); i++){
|
||||||
ItemStack itemStack = tileEntity.getStackInSlot(i);
|
ItemStack itemStack = tileEntity.getStackInSlot(i);
|
||||||
if (itemStack != null && itemStack.stackSize > 0) {
|
if (itemStack != null && itemStack.stackSize > 0) {
|
||||||
|
@ -26,7 +25,7 @@ public abstract class BlockContainerBase extends BlockContainer{
|
||||||
float dX = rand.nextFloat() * 0.8F + 0.1F;
|
float dX = rand.nextFloat() * 0.8F + 0.1F;
|
||||||
float dY = rand.nextFloat() * 0.8F + 0.1F;
|
float dY = rand.nextFloat() * 0.8F + 0.1F;
|
||||||
float dZ = rand.nextFloat() * 0.8F + 0.1F;
|
float dZ = rand.nextFloat() * 0.8F + 0.1F;
|
||||||
EntityItem entityItem = new EntityItem(world, blockPos.getX() + dX, blockPos.getY() + dY, blockPos.getZ() + dZ, itemStack.copy());
|
EntityItem entityItem = new EntityItem(world, x + dX, y + dY, z + dZ, itemStack.copy());
|
||||||
if (itemStack.hasTagCompound())
|
if (itemStack.hasTagCompound())
|
||||||
entityItem.getEntityItem().setTagCompound((NBTTagCompound) itemStack.getTagCompound().copy());
|
entityItem.getEntityItem().setTagCompound((NBTTagCompound) itemStack.getTagCompound().copy());
|
||||||
float factor = 0.05F;
|
float factor = 0.05F;
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
package ellpeck.someprettyrandomstuff.blocks;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import ellpeck.someprettyrandomstuff.SPRS;
|
||||||
|
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
||||||
|
import ellpeck.someprettyrandomstuff.inventory.GuiHandler;
|
||||||
|
import ellpeck.someprettyrandomstuff.tile.TileEntityFeeder;
|
||||||
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class BlockFeeder extends BlockContainerBase{
|
||||||
|
|
||||||
|
private IIcon topIcon;
|
||||||
|
|
||||||
|
public BlockFeeder(){
|
||||||
|
super(Material.wood);
|
||||||
|
this.setBlockName("blockFeeder");
|
||||||
|
this.setCreativeTab(CreativeTab.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TileEntity createNewTileEntity(World world, int par2){
|
||||||
|
return new TileEntityFeeder();
|
||||||
|
}
|
||||||
|
|
||||||
|
public IIcon getIcon(int side, int metadata){
|
||||||
|
return (side == 0 || side == 1) ? this.topIcon : this.blockIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerBlockIcons(IIconRegister iconReg){
|
||||||
|
this.blockIcon = iconReg.registerIcon(Util.MOD_ID_LOWER + ":" + Util.getSubbedUnlocalized(this));
|
||||||
|
this.topIcon = iconReg.registerIcon(Util.MOD_ID_LOWER + ":" + Util.getSubbedUnlocalized(this) + "Top");
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||||
|
if(!world.isRemote){
|
||||||
|
TileEntityFeeder feeder = (TileEntityFeeder)world.getTileEntity(x, y, z);
|
||||||
|
if (feeder != null) player.openGui(SPRS.instance, GuiHandler.FEEDER_ID, world, x, y, z);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void breakBlock(World world, int x, int y, int z, Block block, int par6){
|
||||||
|
this.dropInventory(world, x, y, z);
|
||||||
|
super.breakBlock(world, x, y, z, block, par6);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,85 @@
|
||||||
|
package ellpeck.someprettyrandomstuff.blocks;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import ellpeck.someprettyrandomstuff.blocks.metalists.TheMiscBlocks;
|
||||||
|
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
||||||
|
import ellpeck.someprettyrandomstuff.items.InitItems;
|
||||||
|
import ellpeck.someprettyrandomstuff.items.metalists.TheMiscItems;
|
||||||
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemBlock;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
public class BlockMisc extends Block{
|
||||||
|
|
||||||
|
public static final TheMiscBlocks[] allMiscBlocks = TheMiscBlocks.values();
|
||||||
|
public IIcon[] textures = new IIcon[allMiscBlocks.length];
|
||||||
|
|
||||||
|
public BlockMisc(){
|
||||||
|
super(Material.rock);
|
||||||
|
this.setBlockName("blockMisc");
|
||||||
|
this.setCreativeTab(CreativeTab.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("all")
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void getSubBlocks(Item item, CreativeTabs tab, List list){
|
||||||
|
for (int j = 0; j < allMiscBlocks.length; ++j){
|
||||||
|
list.add(new ItemStack(item, 1, j));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Item getItemDropped(int meta, Random rand, int par3){
|
||||||
|
return meta == TheMiscBlocks.ORE_QUARTZ.ordinal() ? InitItems.itemMisc : super.getItemDropped(meta, rand, par3);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int damageDropped(int meta){
|
||||||
|
return meta == TheMiscBlocks.ORE_QUARTZ.ordinal() ? TheMiscItems.QUARTZ.ordinal() : super.damageDropped(meta);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IIcon getIcon(int side, int metadata){
|
||||||
|
return textures[metadata];
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerBlockIcons(IIconRegister iconReg){
|
||||||
|
for(int i = 0; i < textures.length; i++){
|
||||||
|
textures[i] = iconReg.registerIcon(Util.MOD_ID_LOWER + ":" + Util.getSubbedUnlocalized(this) + allMiscBlocks[i].getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ItemBlockMisc extends ItemBlock{
|
||||||
|
|
||||||
|
public ItemBlockMisc(Block block){
|
||||||
|
super(block);
|
||||||
|
this.setHasSubtypes(true);
|
||||||
|
this.setMaxDamage(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnlocalizedName(ItemStack stack){
|
||||||
|
return this.getUnlocalizedName() + allMiscBlocks[stack.getItemDamage()].getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
|
if(Util.isShiftPressed()) list.add(StatCollector.translateToLocal("tooltip." + this.getUnlocalizedName(stack).substring(5) + ".desc"));
|
||||||
|
else list.add(Util.shiftForInfo());
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMetadata(int damage){
|
||||||
|
return damage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,12 +1,12 @@
|
||||||
package ellpeck.someprettyrandomstuff.blocks;
|
package ellpeck.someprettyrandomstuff.blocks;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,27 @@
|
||||||
package ellpeck.someprettyrandomstuff.blocks;
|
package ellpeck.someprettyrandomstuff.blocks;
|
||||||
|
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
|
||||||
|
|
||||||
public class InitBlocks{
|
public class InitBlocks{
|
||||||
|
|
||||||
public static Block blockCompost;
|
public static Block blockCompost;
|
||||||
|
public static Block blockMisc;
|
||||||
|
public static Block blockFeeder;
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Initializing Blocks...");
|
Util.logInfo("Initializing Blocks...");
|
||||||
|
|
||||||
blockCompost = new BlockCompost();
|
blockCompost = new BlockCompost();
|
||||||
GameRegistry.registerBlock(blockCompost, DefaultItemBlock.class, blockCompost.getUnlocalizedName().substring(5));
|
GameRegistry.registerBlock(blockCompost, DefaultItemBlock.class, Util.getSubbedUnlocalized(blockCompost));
|
||||||
|
|
||||||
|
blockMisc = new BlockMisc();
|
||||||
|
GameRegistry.registerBlock(blockMisc, BlockMisc.ItemBlockMisc.class, Util.getSubbedUnlocalized(blockMisc));
|
||||||
|
|
||||||
|
blockFeeder = new BlockFeeder();
|
||||||
|
GameRegistry.registerBlock(blockFeeder, DefaultItemBlock.class, Util.getSubbedUnlocalized(blockFeeder));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
package ellpeck.someprettyrandomstuff.blocks.metalists;
|
||||||
|
|
||||||
|
import ellpeck.someprettyrandomstuff.util.IItemEnum;
|
||||||
|
|
||||||
|
public enum TheMiscBlocks implements IItemEnum{
|
||||||
|
|
||||||
|
QUARTZ_PILLAR("BlackQuartzPillar"),
|
||||||
|
QUARTZ_CHISELED("BlackQuartzChiseled"),
|
||||||
|
QUARTZ("BlackQuartz"),
|
||||||
|
ORE_QUARTZ("OreBlackQuartz");
|
||||||
|
|
||||||
|
public final String name;
|
||||||
|
|
||||||
|
private TheMiscBlocks(String name){
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName(){
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,10 +9,30 @@ public class ConfigValues{
|
||||||
public static boolean[] enabledFoodRecipes = new boolean[TheFoods.values().length];
|
public static boolean[] enabledFoodRecipes = new boolean[TheFoods.values().length];
|
||||||
public static boolean[] enabledMiscRecipes = new boolean[TheMiscItems.values().length];
|
public static boolean[] enabledMiscRecipes = new boolean[TheMiscItems.values().length];
|
||||||
public static boolean enableCompostRecipe;
|
public static boolean enableCompostRecipe;
|
||||||
|
public static boolean enableKnifeRecipe;
|
||||||
|
|
||||||
public static int tileEntityCompostAmountNeededToConvert;
|
public static int tileEntityCompostAmountNeededToConvert;
|
||||||
public static int tileEntityCompostConversionTimeNeeded;
|
public static int tileEntityCompostConversionTimeNeeded;
|
||||||
|
|
||||||
|
public static int tileEntityFeederReach;
|
||||||
|
public static int tileEntityFeederTimeNeeded;
|
||||||
|
public static int tileEntityFeederThreshold;
|
||||||
|
|
||||||
|
public static int itemKnifeMaxDamage;
|
||||||
|
|
||||||
|
public static int toolEmeraldHarvestLevel;
|
||||||
|
public static int toolEmeraldMaxUses;
|
||||||
|
public static float toolEmeraldEfficiency;
|
||||||
|
public static float toolEmeraldDamage;
|
||||||
|
public static int toolEmeraldEnchantability;
|
||||||
|
|
||||||
|
public static int toolObsidianHarvestLevel;
|
||||||
|
public static int toolObsidianMaxUses;
|
||||||
|
public static float toolObsidianEfficiency;
|
||||||
|
public static float toolObsidianDamage;
|
||||||
|
public static int toolObsidianEnchantability;
|
||||||
|
|
||||||
|
|
||||||
public static void defineConfigValues(Configuration config){
|
public static void defineConfigValues(Configuration config){
|
||||||
|
|
||||||
for(int i = 0; i < enabledFoodRecipes.length; i++){
|
for(int i = 0; i < enabledFoodRecipes.length; i++){
|
||||||
|
@ -23,8 +43,28 @@ public class ConfigValues{
|
||||||
}
|
}
|
||||||
|
|
||||||
enableCompostRecipe = config.getBoolean("isCompostCraftingRecipeEnabled", ConfigurationHandler.CATEGORY_BLOCKS_CRAFTING, true, "If the Crafting Recipe for the Compost is Enabled");
|
enableCompostRecipe = config.getBoolean("isCompostCraftingRecipeEnabled", ConfigurationHandler.CATEGORY_BLOCKS_CRAFTING, true, "If the Crafting Recipe for the Compost is Enabled");
|
||||||
|
enableKnifeRecipe = config.getBoolean("isKnifeCraftingRecipeEnabled", ConfigurationHandler.CATEGORY_ITEMS_CRAFTING, true, "If the Crafting Recipe for the Knife is Enabled");
|
||||||
|
|
||||||
tileEntityCompostAmountNeededToConvert = config.getInt("tileEntityCompostAmountNeededToConvert", ConfigurationHandler.CATEGORY_COMPOST_VALUES, 10, 1, 64, "How many items are needed in the Compost to convert to Fertilizer");
|
tileEntityCompostAmountNeededToConvert = config.getInt("tileEntityCompostAmountNeededToConvert", ConfigurationHandler.CATEGORY_COMPOST_VALUES, 10, 1, 64, "How many items are needed in the Compost to convert to Fertilizer");
|
||||||
tileEntityCompostConversionTimeNeeded = config.getInt("tileEntityCompostConversionTimeNeeded", ConfigurationHandler.CATEGORY_COMPOST_VALUES, 1000, 30, 10000, "How long the Compost needs to convert to Fertilizer");
|
tileEntityCompostConversionTimeNeeded = config.getInt("tileEntityCompostConversionTimeNeeded", ConfigurationHandler.CATEGORY_COMPOST_VALUES, 1000, 30, 10000, "How long the Compost needs to convert to Fertilizer");
|
||||||
|
|
||||||
|
tileEntityFeederReach = config.getInt("tileEntityFeederReach", ConfigurationHandler.CATEGORY_FEEDER_VALUES, 5, 1, 20, "The Radius of Action of the Feeder");
|
||||||
|
tileEntityFeederTimeNeeded = config.getInt("tileEntityFeederTimeNeeded", ConfigurationHandler.CATEGORY_FEEDER_VALUES, 100, 50, 5000, "The time spent between feeding animals with the Feeder");
|
||||||
|
tileEntityFeederThreshold = config.getInt("tileEntityFeederThreshold", ConfigurationHandler.CATEGORY_FEEDER_VALUES, 30, 3, 500, "How many animals need to be in the area for the Feeder to stop");
|
||||||
|
|
||||||
|
itemKnifeMaxDamage = config.getInt("itemKnifeMaxDamage", ConfigurationHandler.CATEGORY_ITEM_DAMAGE_VALUES, 100, 5, 5000, "How often the Knife can be crafted with");
|
||||||
|
|
||||||
|
toolEmeraldHarvestLevel = config.getInt("toolEmeraldHarvestLevel", ConfigurationHandler.CATEGORY_TOOL_VALUES, 3, 0, 3, "What Harvest Level Emerald Tools have (0 = Wood, 1 = Stone, 2 = Iron, 3 = Diamond)");
|
||||||
|
toolEmeraldMaxUses = config.getInt("toolEmeraldMaxUses", ConfigurationHandler.CATEGORY_TOOL_VALUES, 2000, 50, 10000, "How often Emerald Tools can be used");
|
||||||
|
toolEmeraldEfficiency = config.getFloat("toolEmeraldEfficiency", ConfigurationHandler.CATEGORY_TOOL_VALUES, 9.0F, 1.0F, 20.0F, "How fast Emerald Tools are");
|
||||||
|
toolEmeraldDamage = config.getFloat("toolEmeraldDamage", ConfigurationHandler.CATEGORY_TOOL_VALUES, 5.0F, 0.1F, 50.0F, "How much damage an Emerald Tool deals");
|
||||||
|
toolEmeraldEnchantability = config.getInt("toolEmeraldEnchantability", ConfigurationHandler.CATEGORY_TOOL_VALUES, 15, 1, 30, "How enchantable an Emerald Tool is");
|
||||||
|
|
||||||
|
toolObsidianHarvestLevel = config.getInt("toolObsidianHarvestLevel", ConfigurationHandler.CATEGORY_TOOL_VALUES, 3, 0, 3, "What Harvest Level Obsidian Tools have (0 = Wood, 1 = Stone, 2 = Iron, 3 = Diamond)");
|
||||||
|
toolObsidianMaxUses = config.getInt("toolObsidianMaxUses", ConfigurationHandler.CATEGORY_TOOL_VALUES, 8000, 50, 20000, "How often Obsidian Tools can be used");
|
||||||
|
toolObsidianEfficiency = config.getFloat("toolObsidianEfficiency", ConfigurationHandler.CATEGORY_TOOL_VALUES, 4.0F, 1.0F, 20.0F, "How fast Obsidian Tools are");
|
||||||
|
toolObsidianDamage = config.getFloat("toolObsidianDamage", ConfigurationHandler.CATEGORY_TOOL_VALUES, 2.0F, 0.1F, 50.0F, "How much damage an Obsidian Tool deals");
|
||||||
|
toolObsidianEnchantability = config.getInt("toolObsidianEnchantability", ConfigurationHandler.CATEGORY_TOOL_VALUES, 15, 1, 30, "How enchantable an Obsidian Tool is");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,11 +11,14 @@ public class ConfigurationHandler{
|
||||||
public static final String CATEGORY_MISC_CRAFTING = "misc crafting";
|
public static final String CATEGORY_MISC_CRAFTING = "misc crafting";
|
||||||
public static final String CATEGORY_COMPOST_VALUES = "compost values";
|
public static final String CATEGORY_COMPOST_VALUES = "compost values";
|
||||||
public static final String CATEGORY_BLOCKS_CRAFTING = "block crafting";
|
public static final String CATEGORY_BLOCKS_CRAFTING = "block crafting";
|
||||||
|
public static final String CATEGORY_ITEMS_CRAFTING = "items crafting";
|
||||||
|
public static final String CATEGORY_ITEM_DAMAGE_VALUES = "item damage values";
|
||||||
|
public static final String CATEGORY_TOOL_VALUES = "tool values";
|
||||||
|
public static final String CATEGORY_FEEDER_VALUES = "feeder values";
|
||||||
|
|
||||||
public static Configuration config;
|
public static Configuration config;
|
||||||
|
|
||||||
public static void init(File configFile){
|
public static void init(File configFile){
|
||||||
|
|
||||||
Util.logInfo("Grabbing Configurations...");
|
Util.logInfo("Grabbing Configurations...");
|
||||||
Configuration config = new Configuration(configFile);
|
Configuration config = new Configuration(configFile);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package ellpeck.someprettyrandomstuff.crafting;
|
package ellpeck.someprettyrandomstuff.crafting;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import ellpeck.someprettyrandomstuff.blocks.InitBlocks;
|
import ellpeck.someprettyrandomstuff.blocks.InitBlocks;
|
||||||
import ellpeck.someprettyrandomstuff.config.ConfigValues;
|
import ellpeck.someprettyrandomstuff.config.ConfigValues;
|
||||||
import ellpeck.someprettyrandomstuff.items.InitItems;
|
import ellpeck.someprettyrandomstuff.items.InitItems;
|
||||||
|
@ -11,84 +12,143 @@ import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemFood;
|
import net.minecraft.item.ItemFood;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
|
||||||
|
|
||||||
public class InitCrafting {
|
public class InitCrafting {
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Initializing Crafting Recipes...");
|
Util.logInfo("Initializing Crafting Recipes...");
|
||||||
|
|
||||||
|
//Baguette
|
||||||
if(ConfigValues.enabledFoodRecipes[TheFoods.BAGUETTE.ordinal()])
|
if(ConfigValues.enabledFoodRecipes[TheFoods.BAGUETTE.ordinal()])
|
||||||
GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1,
|
GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1,
|
||||||
TheMiscItems.DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 1F);
|
TheMiscItems.DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 1F);
|
||||||
|
|
||||||
|
//Dough
|
||||||
if(ConfigValues.enabledMiscRecipes[TheMiscItems.DOUGH.ordinal()])
|
if(ConfigValues.enabledMiscRecipes[TheMiscItems.DOUGH.ordinal()])
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()),
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()),
|
||||||
new ItemStack(Items.wheat), new ItemStack(Items.wheat));
|
new ItemStack(Items.wheat), new ItemStack(Items.wheat));
|
||||||
|
|
||||||
|
//Pizza
|
||||||
if(ConfigValues.enabledFoodRecipes[TheFoods.PIZZA.ordinal()])
|
if(ConfigValues.enabledFoodRecipes[TheFoods.PIZZA.ordinal()])
|
||||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PIZZA.ordinal()),
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PIZZA.ordinal()),
|
||||||
"HHH", "MCF", " D ",
|
"HKH", "MCF", " D ",
|
||||||
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
|
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
|
||||||
'M', new ItemStack(Blocks.brown_mushroom),
|
'M', new ItemStack(Blocks.brown_mushroom),
|
||||||
'C', new ItemStack(Items.carrot),
|
'C', new ItemStack(Items.carrot),
|
||||||
'F', new ItemStack(Items.fish, 1, Util.WILDCARD),
|
'F', new ItemStack(Items.fish, 1, Util.WILDCARD),
|
||||||
|
'K', new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD),
|
||||||
'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()));
|
'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()));
|
||||||
|
|
||||||
|
//Hamburger
|
||||||
if(ConfigValues.enabledFoodRecipes[TheFoods.HAMBURGER.ordinal()])
|
if(ConfigValues.enabledFoodRecipes[TheFoods.HAMBURGER.ordinal()])
|
||||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()),
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()),
|
||||||
" T ", "CBS", " T ",
|
"KT ", "CBS", " T ",
|
||||||
'T', new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()),
|
'T', new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()),
|
||||||
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
|
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
|
||||||
'S', new ItemStack(Blocks.leaves, 1, Util.WILDCARD),
|
'S', new ItemStack(Blocks.leaves, 1, Util.WILDCARD),
|
||||||
|
'K', new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD),
|
||||||
'B', new ItemStack(Items.cooked_beef));
|
'B', new ItemStack(Items.cooked_beef));
|
||||||
|
|
||||||
|
//Big Cookie
|
||||||
if(ConfigValues.enabledFoodRecipes[TheFoods.BIG_COOKIE.ordinal()])
|
if(ConfigValues.enabledFoodRecipes[TheFoods.BIG_COOKIE.ordinal()])
|
||||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.BIG_COOKIE.ordinal()),
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.BIG_COOKIE.ordinal()),
|
||||||
"DCD", "CDC", "DCD",
|
"DCD", "CDC", "DCD",
|
||||||
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
|
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
|
||||||
'C', new ItemStack(Items.dye, 1, 3));
|
'C', new ItemStack(Items.dye, 1, 3));
|
||||||
|
|
||||||
|
//Sub Sandwich
|
||||||
if(ConfigValues.enabledFoodRecipes[TheFoods.SUBMARINE_SANDWICH.ordinal()])
|
if(ConfigValues.enabledFoodRecipes[TheFoods.SUBMARINE_SANDWICH.ordinal()])
|
||||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SUBMARINE_SANDWICH.ordinal()),
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SUBMARINE_SANDWICH.ordinal()),
|
||||||
"PCP", "FBS", "PCP",
|
"KCP", "FBS", "PCP",
|
||||||
'P', new ItemStack(Items.paper),
|
'P', new ItemStack(Items.paper),
|
||||||
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
|
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
|
||||||
'F', new ItemStack(Items.fish, 1, Util.WILDCARD),
|
'F', new ItemStack(Items.fish, 1, Util.WILDCARD),
|
||||||
'B', new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()),
|
'B', new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()),
|
||||||
|
'K', new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD),
|
||||||
'S', new ItemStack(Blocks.leaves, 1, Util.WILDCARD));
|
'S', new ItemStack(Blocks.leaves, 1, Util.WILDCARD));
|
||||||
|
|
||||||
|
//Paper Cone
|
||||||
if(ConfigValues.enabledMiscRecipes[TheMiscItems.PAPER_CONE.ordinal()])
|
if(ConfigValues.enabledMiscRecipes[TheMiscItems.PAPER_CONE.ordinal()])
|
||||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
|
||||||
"P P", " P ",
|
"P P", " P ",
|
||||||
'P', new ItemStack(Items.paper));
|
'P', new ItemStack(Items.paper));
|
||||||
|
|
||||||
Items.iron_sword.setContainerItem(Items.iron_sword);
|
//French Fry
|
||||||
if(ConfigValues.enabledFoodRecipes[TheFoods.FRENCH_FRY.ordinal()])
|
if(ConfigValues.enabledFoodRecipes[TheFoods.FRENCH_FRY.ordinal()])
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()),
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()),
|
||||||
new ItemStack(Items.baked_potato),
|
new ItemStack(Items.baked_potato),
|
||||||
new ItemStack(Items.iron_sword, 1, Util.WILDCARD));
|
new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD));
|
||||||
Items.iron_sword.setContainerItem(null);
|
|
||||||
|
|
||||||
|
//Knife Handle
|
||||||
|
if(ConfigValues.enabledMiscRecipes[TheMiscItems.KNIFE_HANDLE.ordinal()])
|
||||||
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()),
|
||||||
|
new ItemStack(Items.stick),
|
||||||
|
new ItemStack(Items.slime_ball));
|
||||||
|
|
||||||
|
//Knife Blade
|
||||||
|
if(ConfigValues.enabledMiscRecipes[TheMiscItems.KNIFE_BLADE.ordinal()])
|
||||||
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()),
|
||||||
|
new ItemStack(Items.iron_ingot),
|
||||||
|
new ItemStack(Items.slime_ball));
|
||||||
|
|
||||||
|
//Knife
|
||||||
|
if(ConfigValues.enableKnifeRecipe)
|
||||||
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemKnife),
|
||||||
|
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()),
|
||||||
|
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()));
|
||||||
|
|
||||||
|
//French Fries
|
||||||
if(ConfigValues.enabledFoodRecipes[TheFoods.FRENCH_FRIES.ordinal()])
|
if(ConfigValues.enabledFoodRecipes[TheFoods.FRENCH_FRIES.ordinal()])
|
||||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRIES.ordinal()),
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRIES.ordinal()),
|
||||||
"FFF", " P ",
|
"FFF", " P ",
|
||||||
'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
|
'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
|
||||||
'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()));
|
'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()));
|
||||||
|
|
||||||
|
//Fish N Chips
|
||||||
if(ConfigValues.enabledFoodRecipes[TheFoods.FISH_N_CHIPS.ordinal()])
|
if(ConfigValues.enabledFoodRecipes[TheFoods.FISH_N_CHIPS.ordinal()])
|
||||||
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FISH_N_CHIPS.ordinal()),
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FISH_N_CHIPS.ordinal()),
|
||||||
"FIF", " P ",
|
"FIF", " P ",
|
||||||
'I', new ItemStack(Items.cooked_fish, 1, Util.WILDCARD),
|
'I', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD),
|
||||||
'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
|
'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
|
||||||
'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()));
|
'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()));
|
||||||
|
|
||||||
|
//Compost
|
||||||
if(ConfigValues.enableCompostRecipe)
|
if(ConfigValues.enableCompostRecipe)
|
||||||
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockCompost),
|
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockCompost),
|
||||||
"W W", "WFW", "WWW",
|
"W W", "WFW", "WWW",
|
||||||
'W', new ItemStack(Blocks.planks, 1, Util.WILDCARD),
|
'W', new ItemStack(Blocks.planks, 1, Util.WILDCARD),
|
||||||
'F', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.MASHED_FOOD.ordinal()));
|
'F', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.MASHED_FOOD.ordinal()));
|
||||||
|
|
||||||
|
//Cheese
|
||||||
|
if(ConfigValues.enabledFoodRecipes[TheFoods.CHEESE.ordinal()])
|
||||||
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
|
||||||
|
new ItemStack(Items.milk_bucket));
|
||||||
|
|
||||||
|
//Pumpkin Stew
|
||||||
|
if(ConfigValues.enabledFoodRecipes[TheFoods.PUMPKIN_STEW.ordinal()])
|
||||||
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PUMPKIN_STEW.ordinal()),
|
||||||
|
"P", "B",
|
||||||
|
'P', new ItemStack(Blocks.pumpkin),
|
||||||
|
'B', new ItemStack(Items.bowl));
|
||||||
|
|
||||||
|
//Carrot Juice
|
||||||
|
if(ConfigValues.enabledFoodRecipes[TheFoods.CARROT_JUICE.ordinal()])
|
||||||
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()),
|
||||||
|
new ItemStack(Items.glass_bottle), new ItemStack(Items.carrot), new ItemStack(InitItems.itemKnife));
|
||||||
|
|
||||||
|
//Spaghetti
|
||||||
|
if(ConfigValues.enabledFoodRecipes[TheFoods.SPAGHETTI.ordinal()])
|
||||||
|
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SPAGHETTI.ordinal()),
|
||||||
|
"NNN", "B",
|
||||||
|
'N', new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
|
||||||
|
'B', new ItemStack(Items.bowl));
|
||||||
|
|
||||||
|
//Noodle
|
||||||
|
if(ConfigValues.enabledFoodRecipes[TheFoods.NOODLE.ordinal()])
|
||||||
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
|
||||||
|
new ItemStack(Items.wheat), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), new ItemStack(InitItems.itemKnife));
|
||||||
|
|
||||||
|
//Mashed Food
|
||||||
if(ConfigValues.enabledMiscRecipes[TheMiscItems.MASHED_FOOD.ordinal()])
|
if(ConfigValues.enabledMiscRecipes[TheMiscItems.MASHED_FOOD.ordinal()])
|
||||||
initMashedFoodRecipes();
|
initMashedFoodRecipes();
|
||||||
}
|
}
|
||||||
|
@ -98,7 +158,7 @@ public class InitCrafting {
|
||||||
for(Object nextIterator : Item.itemRegistry){
|
for(Object nextIterator : Item.itemRegistry){
|
||||||
if(nextIterator instanceof ItemFood){
|
if(nextIterator instanceof ItemFood){
|
||||||
ItemStack ingredient = new ItemStack((Item)nextIterator, 1, Util.WILDCARD);
|
ItemStack ingredient = new ItemStack((Item)nextIterator, 1, Util.WILDCARD);
|
||||||
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.MASHED_FOOD.ordinal()), ingredient, ingredient, ingredient, ingredient);
|
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.MASHED_FOOD.ordinal()), ingredient, ingredient, ingredient, ingredient, new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ public class CreativeTab extends CreativeTabs{
|
||||||
public static CreativeTab instance = new CreativeTab();
|
public static CreativeTab instance = new CreativeTab();
|
||||||
|
|
||||||
public CreativeTab(){
|
public CreativeTab(){
|
||||||
super(Util.MOD_ID);
|
super(Util.MOD_ID_LOWER);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Item getTabIconItem(){
|
public Item getTabIconItem(){
|
||||||
|
|
|
@ -1,20 +1,19 @@
|
||||||
package ellpeck.someprettyrandomstuff.gen;
|
package ellpeck.someprettyrandomstuff.gen;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.IWorldGenerator;
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.util.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.chunk.IChunkProvider;
|
import net.minecraft.world.chunk.IChunkProvider;
|
||||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||||
import net.minecraftforge.fml.common.IWorldGenerator;
|
|
||||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
public class OreGen implements IWorldGenerator{
|
public class OreGen implements IWorldGenerator{
|
||||||
|
|
||||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider){
|
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider){
|
||||||
switch (world.provider.getDimensionId()){
|
switch (world.provider.dimensionId){
|
||||||
case -1:
|
case -1:
|
||||||
generateNether(world, random, chunkX*16, chunkZ*16);
|
generateNether(world, random, chunkX*16, chunkZ*16);
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -38,13 +37,13 @@ public class OreGen implements IWorldGenerator{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addOreSpawn(IBlockState state, World world, Random random, int blockXPos, int blockZPos, int maxVeinSize, int chancesToSpawn, int minY, int maxY){
|
public void addOreSpawn(Block block, int meta, int x, int y, int z, Block blockIn, World world, Random random, int blockXPos, int blockZPos, int maxVeinSize, int chancesToSpawn, int minY, int maxY){
|
||||||
int yDiff = maxY - minY;
|
int yDiff = maxY - minY;
|
||||||
for(int i = 0; i < chancesToSpawn; i++){
|
for(int i = 0; i < chancesToSpawn; i++){
|
||||||
int posX = blockXPos + random.nextInt(16);
|
int posX = blockXPos + random.nextInt(16);
|
||||||
int posY = minY + random.nextInt(yDiff);
|
int posY = minY + random.nextInt(yDiff);
|
||||||
int posZ = blockZPos + random.nextInt(16);
|
int posZ = blockZPos + random.nextInt(16);
|
||||||
(new WorldGenMinable(state, maxVeinSize)).generate(world, random, new BlockPos(posX, posY, posZ));
|
(new WorldGenMinable(block, meta, maxVeinSize, blockIn)).generate(world, random, posX, posY, posZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,140 @@
|
||||||
|
package ellpeck.someprettyrandomstuff.inventory;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import ellpeck.someprettyrandomstuff.tile.TileEntityBase;
|
||||||
|
import ellpeck.someprettyrandomstuff.tile.TileEntityFeeder;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
import net.minecraft.inventory.Container;
|
||||||
|
import net.minecraft.inventory.ICrafting;
|
||||||
|
import net.minecraft.inventory.Slot;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
public class ContainerFeeder extends Container{
|
||||||
|
|
||||||
|
private TileEntityFeeder tileFeeder;
|
||||||
|
|
||||||
|
private int lastCurrentTimer;
|
||||||
|
private int lastCurrentAnimalAmount;
|
||||||
|
private int lastIsBred;
|
||||||
|
|
||||||
|
public ContainerFeeder(InventoryPlayer inventory, TileEntityBase tile){
|
||||||
|
this.tileFeeder = (TileEntityFeeder)tile;
|
||||||
|
this.addSlotToContainer(new Slot(this.tileFeeder, 0, 80, 45));
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; i++){
|
||||||
|
for (int j = 0; j < 9; j++){
|
||||||
|
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 74 + i * 18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int i = 0; i < 9; i++){
|
||||||
|
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 132));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addCraftingToCrafters(ICrafting iCraft){
|
||||||
|
super.addCraftingToCrafters(iCraft);
|
||||||
|
iCraft.sendProgressBarUpdate(this, 0, this.tileFeeder.currentTimer);
|
||||||
|
iCraft.sendProgressBarUpdate(this, 1, this.tileFeeder.currentAnimalAmount);
|
||||||
|
iCraft.sendProgressBarUpdate(this, 2, this.tileFeeder.isBred);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void detectAndSendChanges(){
|
||||||
|
super.detectAndSendChanges();
|
||||||
|
for(Object crafter : this.crafters){
|
||||||
|
ICrafting iCraft = (ICrafting)crafter;
|
||||||
|
|
||||||
|
if(this.lastCurrentTimer != this.tileFeeder.currentTimer) iCraft.sendProgressBarUpdate(this, 0, this.tileFeeder.currentTimer);
|
||||||
|
if(this.lastCurrentAnimalAmount != this.tileFeeder.currentAnimalAmount) iCraft.sendProgressBarUpdate(this, 1, this.tileFeeder.currentAnimalAmount);
|
||||||
|
if(this.lastIsBred != this.tileFeeder.isBred) iCraft.sendProgressBarUpdate(this, 2, this.tileFeeder.isBred);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.lastCurrentTimer = this.tileFeeder.currentTimer;
|
||||||
|
this.lastCurrentAnimalAmount = this.tileFeeder.currentAnimalAmount;
|
||||||
|
this.lastIsBred = this.tileFeeder.isBred;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void updateProgressBar(int par1, int par2){
|
||||||
|
if(par1 == 0) this.tileFeeder.currentTimer = par2;
|
||||||
|
if(par1 == 1) this.tileFeeder.currentAnimalAmount = par2;
|
||||||
|
if(par1 == 2) this.tileFeeder.isBred = par2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canInteractWith(EntityPlayer player){
|
||||||
|
return this.tileFeeder.isUseableByPlayer(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||||
|
/*ItemStack itemstack = null;
|
||||||
|
Slot slot = (Slot)this.inventorySlots.get(p_82846_2_);
|
||||||
|
|
||||||
|
if (slot != null && slot.getHasStack())
|
||||||
|
{
|
||||||
|
ItemStack itemstack1 = slot.getStack();
|
||||||
|
itemstack = itemstack1.copy();
|
||||||
|
|
||||||
|
if (p_82846_2_ == 2)
|
||||||
|
{
|
||||||
|
if (!this.mergeItemStack(itemstack1, 3, 39, true))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
slot.onSlotChange(itemstack1, itemstack);
|
||||||
|
}
|
||||||
|
else if (p_82846_2_ != 1 && p_82846_2_ != 0)
|
||||||
|
{
|
||||||
|
if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null)
|
||||||
|
{
|
||||||
|
if (!this.mergeItemStack(itemstack1, 0, 1, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (TileEntityFurnace.isItemFuel(itemstack1))
|
||||||
|
{
|
||||||
|
if (!this.mergeItemStack(itemstack1, 1, 2, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (p_82846_2_ >= 3 && p_82846_2_ < 30)
|
||||||
|
{
|
||||||
|
if (!this.mergeItemStack(itemstack1, 30, 39, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (p_82846_2_ >= 30 && p_82846_2_ < 39 && !this.mergeItemStack(itemstack1, 3, 30, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!this.mergeItemStack(itemstack1, 3, 39, false))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (itemstack1.stackSize == 0)
|
||||||
|
{
|
||||||
|
slot.putStack((ItemStack)null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
slot.onSlotChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (itemstack1.stackSize == itemstack.stackSize)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
slot.onPickupFromSlot(p_82846_1_, itemstack1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return itemstack;*/
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,57 @@
|
||||||
|
package ellpeck.someprettyrandomstuff.inventory;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import ellpeck.someprettyrandomstuff.tile.TileEntityBase;
|
||||||
|
import ellpeck.someprettyrandomstuff.tile.TileEntityFeeder;
|
||||||
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public class GuiFeeder extends GuiContainer{
|
||||||
|
|
||||||
|
private static final ResourceLocation resLoc = Util.getGuiLocation("guiFeeder");
|
||||||
|
private TileEntityFeeder tileFeeder;
|
||||||
|
|
||||||
|
public GuiFeeder(InventoryPlayer inventory, TileEntityBase tile){
|
||||||
|
super(new ContainerFeeder(inventory, tile));
|
||||||
|
this.tileFeeder = (TileEntityFeeder)tile;
|
||||||
|
|
||||||
|
this.xSize = 176;
|
||||||
|
this.ySize = 156;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawGuiContainerForegroundLayer(int x, int y){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawGuiContainerBackgroundLayer(float f, int x, int y){
|
||||||
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
this.mc.getTextureManager().bindTexture(resLoc);
|
||||||
|
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
|
||||||
|
|
||||||
|
if(this.tileFeeder.currentTimer > 0){
|
||||||
|
int i = this.tileFeeder.getCurrentTimerToScale(22);
|
||||||
|
this.drawTexturedModalRect(guiLeft+80, guiTop+42-i, 176, 16+22-i, 16, 22);
|
||||||
|
}
|
||||||
|
if(this.tileFeeder.isBred == 1) this.drawTexturedModalRect(guiLeft+76, guiTop+4, 176, 0, 25, 16);
|
||||||
|
|
||||||
|
if(this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < this.tileFeeder.animalThreshold) this.drawTexturedModalRect(guiLeft + 70, guiTop + 31, 192, 16, 8, 8);
|
||||||
|
|
||||||
|
if(this.tileFeeder.currentAnimalAmount >= this.tileFeeder.animalThreshold) this.drawTexturedModalRect(guiLeft + 70, guiTop + 31, 192, 24, 8, 8);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawScreen(int x, int y, float f){
|
||||||
|
super.drawScreen(x, y, f);
|
||||||
|
if(x >= guiLeft+69 && y >= guiTop+30 && x <= guiLeft+69+10 && y <= guiTop+30+10){
|
||||||
|
String[] array = new String[]{(this.tileFeeder.currentAnimalAmount + " " + StatCollector.translateToLocal("feeder.animal.desc") + (this.tileFeeder.currentAnimalAmount == 1 ? "" : StatCollector.translateToLocal("feeder.animalsSuffix.desc"))), ((this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < this.tileFeeder.animalThreshold) ? StatCollector.translateToLocal("feeder.enoughToBreed.desc") : (this.tileFeeder.currentAnimalAmount >= this.tileFeeder.animalThreshold ? StatCollector.translateToLocal("feeder.tooMany.desc") : StatCollector.translateToLocal("feeder.notEnough.desc")))};
|
||||||
|
this.func_146283_a(Arrays.asList(array), x, y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,32 +1,37 @@
|
||||||
package ellpeck.someprettyrandomstuff.inventory;
|
package ellpeck.someprettyrandomstuff.inventory;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.network.IGuiHandler;
|
||||||
|
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||||
import ellpeck.someprettyrandomstuff.SPRS;
|
import ellpeck.someprettyrandomstuff.SPRS;
|
||||||
import ellpeck.someprettyrandomstuff.tile.TileEntityBase;
|
import ellpeck.someprettyrandomstuff.tile.TileEntityBase;
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.fml.common.network.IGuiHandler;
|
|
||||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
|
||||||
|
|
||||||
public class GuiHandler implements IGuiHandler{
|
public class GuiHandler implements IGuiHandler{
|
||||||
|
|
||||||
public Object getServerGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z){
|
public Object getServerGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z){
|
||||||
TileEntityBase tile = (TileEntityBase)world.getTileEntity(new BlockPos(x, y, z));
|
TileEntityBase tile = (TileEntityBase)world.getTileEntity(x, y, z);
|
||||||
switch (id){
|
switch (id){
|
||||||
|
case FEEDER_ID:
|
||||||
|
return new ContainerFeeder(entityPlayer.inventory, tile);
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getClientGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z){
|
public Object getClientGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z){
|
||||||
TileEntityBase tile = (TileEntityBase)world.getTileEntity(new BlockPos(x, y, z));
|
TileEntityBase tile = (TileEntityBase)world.getTileEntity(x, y, z);
|
||||||
switch (id){
|
switch (id){
|
||||||
|
case FEEDER_ID:
|
||||||
|
return new GuiFeeder(entityPlayer.inventory, tile);
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final int FEEDER_ID = 0;
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Initializing GuiHandler...");
|
Util.logInfo("Initializing GuiHandler...");
|
||||||
NetworkRegistry.INSTANCE.registerGuiHandler(SPRS.instance, new GuiHandler());
|
NetworkRegistry.INSTANCE.registerGuiHandler(SPRS.instance, new GuiHandler());
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package ellpeck.someprettyrandomstuff.items;
|
package ellpeck.someprettyrandomstuff.items;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
import ellpeck.someprettyrandomstuff.items.tools.*;
|
||||||
|
import ellpeck.someprettyrandomstuff.material.InitItemMaterials;
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
|
||||||
|
|
||||||
public class InitItems{
|
public class InitItems{
|
||||||
|
|
||||||
|
@ -11,19 +13,46 @@ public class InitItems{
|
||||||
public static Item itemFoods;
|
public static Item itemFoods;
|
||||||
public static Item itemKnife;
|
public static Item itemKnife;
|
||||||
|
|
||||||
|
public static Item itemPickaxeEmerald;
|
||||||
|
public static Item itemAxeEmerald;
|
||||||
|
public static Item itemShovelEmerald;
|
||||||
|
public static Item itemSwordEmerald;
|
||||||
|
public static Item itemHoeEmerald;
|
||||||
|
|
||||||
|
public static Item itemPickaxeObsidian;
|
||||||
|
public static Item itemAxeObsidian;
|
||||||
|
public static Item itemShovelObsidian;
|
||||||
|
public static Item itemSwordObsidian;
|
||||||
|
public static Item itemHoeObsidian;
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Initializing Items...");
|
Util.logInfo("Initializing Items...");
|
||||||
|
|
||||||
itemFertilizer = new ItemFertilizer();
|
itemFertilizer = new ItemFertilizer();
|
||||||
GameRegistry.registerItem(itemFertilizer, itemFertilizer.getUnlocalizedName().substring(5));
|
GameRegistry.registerItem(itemFertilizer, Util.getSubbedUnlocalized(itemFertilizer));
|
||||||
|
|
||||||
itemMisc = new ItemMisc();
|
itemMisc = new ItemMisc();
|
||||||
GameRegistry.registerItem(itemMisc, itemMisc.getUnlocalizedName().substring(5));
|
GameRegistry.registerItem(itemMisc, Util.getSubbedUnlocalized(itemMisc));
|
||||||
|
|
||||||
itemFoods = new ItemFoods();
|
itemFoods = new ItemFoods();
|
||||||
GameRegistry.registerItem(itemFoods, itemFoods.getUnlocalizedName().substring(5));
|
GameRegistry.registerItem(itemFoods, Util.getSubbedUnlocalized(itemFoods));
|
||||||
|
|
||||||
itemKnife = new ItemKnife();
|
itemKnife = new ItemKnife();
|
||||||
GameRegistry.registerItem(itemKnife, itemKnife.getUnlocalizedName().substring(5));
|
GameRegistry.registerItem(itemKnife, Util.getSubbedUnlocalized(itemKnife));
|
||||||
|
|
||||||
|
itemPickaxeEmerald = new ItemPickaxeSPRS(InitItemMaterials.toolMaterialEmerald, "itemPickaxeEmerald");
|
||||||
|
itemAxeEmerald = new ItemAxeSPRS(InitItemMaterials.toolMaterialEmerald, "itemAxeEmerald");
|
||||||
|
itemShovelEmerald = new ItemShovelSPRS(InitItemMaterials.toolMaterialEmerald, "itemShovelEmerald");
|
||||||
|
itemSwordEmerald = new ItemSwordSPRS(InitItemMaterials.toolMaterialEmerald, "itemSwordEmerald");
|
||||||
|
itemHoeEmerald = new ItemHoeSPRS(InitItemMaterials.toolMaterialEmerald, "itemHoeEmerald");
|
||||||
|
Util.registerItems(new Item[]{itemPickaxeEmerald, itemAxeEmerald, itemShovelEmerald, itemSwordEmerald, itemHoeEmerald});
|
||||||
|
|
||||||
|
itemPickaxeObsidian = new ItemPickaxeSPRS(InitItemMaterials.toolMaterialObsidian, "itemPickaxeObsidian");
|
||||||
|
itemAxeObsidian = new ItemAxeSPRS(InitItemMaterials.toolMaterialObsidian, "itemAxeObsidian");
|
||||||
|
itemShovelObsidian = new ItemShovelSPRS(InitItemMaterials.toolMaterialObsidian, "itemShovelObsidian");
|
||||||
|
itemSwordObsidian = new ItemSwordSPRS(InitItemMaterials.toolMaterialObsidian, "itemSwordObsidian");
|
||||||
|
itemHoeObsidian = new ItemHoeSPRS(InitItemMaterials.toolMaterialObsidian, "itemHoeObsidian");
|
||||||
|
Util.registerItems(new Item[]{itemPickaxeObsidian, itemAxeObsidian, itemShovelObsidian, itemSwordObsidian, itemHoeObsidian});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
package ellpeck.someprettyrandomstuff.items;
|
package ellpeck.someprettyrandomstuff.items;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemDye;
|
import net.minecraft.item.ItemDye;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.EnumFacing;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -21,12 +21,12 @@ public class ItemFertilizer extends Item{
|
||||||
this.setCreativeTab(CreativeTab.instance);
|
this.setCreativeTab(CreativeTab.instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ) {
|
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10){
|
||||||
if(ItemDye.applyBonemeal(stack, world, blockPos, player)){
|
if(ItemDye.applyBonemeal(stack, world, x, y, z, player)){
|
||||||
if(!world.isRemote) world.playAuxSFX(2005, blockPos, 0);
|
if(!world.isRemote) world.playAuxSFX(2005, x, y, z, 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return super.onItemUse(stack, player, world, blockPos, side, hitX, hitY, hitZ);
|
return super.onItemUse(stack, player, world, x, y, z, par7, par8, par9, par10);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
@ -34,4 +34,13 @@ public class ItemFertilizer extends Item{
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
list.add(Util.addStandardInformation(this));
|
list.add(Util.addStandardInformation(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IIcon getIcon(ItemStack stack, int pass){
|
||||||
|
return this.itemIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerIcons(IIconRegister iconReg){
|
||||||
|
this.itemIcon = iconReg.registerIcon(Util.MOD_ID_LOWER + ":" + Util.getSubbedUnlocalized(this));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
package ellpeck.someprettyrandomstuff.items;
|
package ellpeck.someprettyrandomstuff.items;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
||||||
import ellpeck.someprettyrandomstuff.items.metalists.TheFoods;
|
import ellpeck.someprettyrandomstuff.items.metalists.TheFoods;
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
@ -10,16 +13,16 @@ import net.minecraft.item.EnumAction;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemFood;
|
import net.minecraft.item.ItemFood;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
import net.minecraft.util.StatCollector;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ItemFoods extends ItemFood{
|
public class ItemFoods extends ItemFood{
|
||||||
|
|
||||||
public static final TheFoods[] allFoods = TheFoods.values();
|
public static final TheFoods[] allFoods = TheFoods.values();
|
||||||
|
public IIcon[] textures = new IIcon[allFoods.length];
|
||||||
|
|
||||||
public ItemFoods(){
|
public ItemFoods(){
|
||||||
super(0, 0.0F, false);
|
super(0, 0.0F, false);
|
||||||
|
@ -31,16 +34,16 @@ public class ItemFoods extends ItemFood{
|
||||||
TheFoods.setReturnItems();
|
TheFoods.setReturnItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHealAmount(ItemStack stack){
|
public int func_150905_g(ItemStack stack){
|
||||||
return allFoods[stack.getItemDamage()].healAmount;
|
return allFoods[stack.getItemDamage()].healAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getSaturationModifier(ItemStack stack){
|
public float func_150906_h(ItemStack stack){
|
||||||
return allFoods[stack.getItemDamage()].saturation;
|
return allFoods[stack.getItemDamage()].saturation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EnumAction getItemUseAction(ItemStack stack){
|
public EnumAction getItemUseAction(ItemStack stack){
|
||||||
return allFoods[stack.getItemDamage()].getsDrunken ? EnumAction.DRINK : EnumAction.EAT;
|
return allFoods[stack.getItemDamage()].getsDrunken ? EnumAction.drink : EnumAction.eat;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxItemUseDuration(ItemStack stack){
|
public int getMaxItemUseDuration(ItemStack stack){
|
||||||
|
@ -63,14 +66,14 @@ public class ItemFoods extends ItemFood{
|
||||||
return this.getUnlocalizedName() + allFoods[stack.getItemDamage()].name;
|
return this.getUnlocalizedName() + allFoods[stack.getItemDamage()].name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack onItemUseFinish(ItemStack stack, World world, EntityPlayer player){
|
public ItemStack onEaten(ItemStack stack, World world, EntityPlayer player){
|
||||||
ItemStack stackToReturn = super.onItemUseFinish(stack, world, player);
|
ItemStack stackToReturn = super.onEaten(stack, world, player);
|
||||||
ItemStack returnItem = allFoods[stack.getItemDamage()].returnItem;
|
ItemStack returnItem = allFoods[stack.getItemDamage()].returnItem;
|
||||||
if (returnItem != null){
|
if (returnItem != null){
|
||||||
if(!player.inventory.addItemStackToInventory(returnItem.copy())){
|
if(!player.inventory.addItemStackToInventory(returnItem.copy())){
|
||||||
if(!world.isRemote){
|
if(!world.isRemote){
|
||||||
EntityItem entityItem = new EntityItem(player.worldObj, player.posX, player.posY, player.posZ, returnItem.copy());
|
EntityItem entityItem = new EntityItem(player.worldObj, player.posX, player.posY, player.posZ, returnItem.copy());
|
||||||
entityItem.setPickupDelay(0);
|
entityItem.delayBeforeCanPickup = 0;
|
||||||
player.worldObj.spawnEntityInWorld(entityItem);
|
player.worldObj.spawnEntityInWorld(entityItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,4 +91,15 @@ public class ItemFoods extends ItemFood{
|
||||||
}
|
}
|
||||||
else list.add(Util.shiftForInfo());
|
else list.add(Util.shiftForInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IIcon getIconFromDamage(int par1){
|
||||||
|
return textures[par1];
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerIcons(IIconRegister iconReg){
|
||||||
|
for(int i = 0; i < textures.length; i++){
|
||||||
|
textures[i] = iconReg.registerIcon(Util.MOD_ID_LOWER + ":" + Util.getSubbedUnlocalized(this) + allFoods[i].getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,11 +1,51 @@
|
||||||
package ellpeck.someprettyrandomstuff.items;
|
package ellpeck.someprettyrandomstuff.items;
|
||||||
|
|
||||||
import ellpeck.someprettyrandomstuff.items.tools.ItemSwordSPTS;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import ellpeck.someprettyrandomstuff.config.ConfigValues;
|
||||||
|
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
||||||
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
|
||||||
public class ItemKnife extends ItemSwordSPTS{
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ItemKnife extends Item{
|
||||||
|
|
||||||
public ItemKnife(){
|
public ItemKnife(){
|
||||||
super(ToolMaterial.STONE, "itemKnife");
|
this.setUnlocalizedName("itemKnife");
|
||||||
|
this.setMaxDamage(ConfigValues.itemKnifeMaxDamage);
|
||||||
|
this.setCreativeTab(CreativeTab.instance);
|
||||||
|
this.setMaxStackSize(1);
|
||||||
this.setContainerItem(this);
|
this.setContainerItem(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ItemStack getContainerItem(ItemStack stack){
|
||||||
|
ItemStack theStack = stack.copy();
|
||||||
|
theStack.setItemDamage(theStack.getItemDamage() + 1);
|
||||||
|
theStack.stackSize = 1;
|
||||||
|
return theStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
|
list.add(Util.addStandardInformation(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getShareTag(){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IIcon getIcon(ItemStack stack, int pass){
|
||||||
|
return this.itemIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerIcons(IIconRegister iconReg){
|
||||||
|
this.itemIcon = iconReg.registerIcon(Util.MOD_ID_LOWER + ":" + Util.getSubbedUnlocalized(this));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,24 @@
|
||||||
package ellpeck.someprettyrandomstuff.items;
|
package ellpeck.someprettyrandomstuff.items;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
||||||
import ellpeck.someprettyrandomstuff.items.metalists.TheMiscItems;
|
import ellpeck.someprettyrandomstuff.items.metalists.TheMiscItems;
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
import net.minecraft.util.StatCollector;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ItemMisc extends Item{
|
public class ItemMisc extends Item{
|
||||||
|
|
||||||
public static final TheMiscItems[] allMiscItems = TheMiscItems.values();
|
public static final TheMiscItems[] allMiscItems = TheMiscItems.values();
|
||||||
|
public IIcon[] textures = new IIcon[allMiscItems.length];
|
||||||
|
|
||||||
public ItemMisc(){
|
public ItemMisc(){
|
||||||
this.setUnlocalizedName("itemMisc");
|
this.setUnlocalizedName("itemMisc");
|
||||||
|
@ -45,4 +48,15 @@ public class ItemMisc extends Item{
|
||||||
if(Util.isShiftPressed()) list.add(StatCollector.translateToLocal("tooltip." + this.getUnlocalizedName(stack).substring(5) + ".desc"));
|
if(Util.isShiftPressed()) list.add(StatCollector.translateToLocal("tooltip." + this.getUnlocalizedName(stack).substring(5) + ".desc"));
|
||||||
else list.add(Util.shiftForInfo());
|
else list.add(Util.shiftForInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IIcon getIconFromDamage(int par1){
|
||||||
|
return textures[par1];
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerIcons(IIconRegister iconReg){
|
||||||
|
for(int i = 0; i < textures.length; i++){
|
||||||
|
textures[i] = iconReg.registerIcon(Util.MOD_ID_LOWER + ":" + Util.getSubbedUnlocalized(this) + allMiscItems[i].getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,8 @@ public enum TheMiscItems implements IItemEnum{
|
||||||
STEEL("Steel"),
|
STEEL("Steel"),
|
||||||
KNIFE_BLADE("KnifeBlade"),
|
KNIFE_BLADE("KnifeBlade"),
|
||||||
KNIFE_HANDLE("KnifeHandle"),
|
KNIFE_HANDLE("KnifeHandle"),
|
||||||
DOUGH("Dough");
|
DOUGH("Dough"),
|
||||||
|
QUARTZ("BlackQuartz");
|
||||||
|
|
||||||
public final String name;
|
public final String name;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
package ellpeck.someprettyrandomstuff.items.tools;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
||||||
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemAxe;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ItemAxeSPRS extends ItemAxe{
|
||||||
|
|
||||||
|
public ItemAxeSPRS(ToolMaterial toolMat, String unlocalizedName){
|
||||||
|
super(toolMat);
|
||||||
|
this.setUnlocalizedName(unlocalizedName);
|
||||||
|
this.setCreativeTab(CreativeTab.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
|
list.add(Util.addStandardInformation(this));
|
||||||
|
if(Util.isShiftPressed()){
|
||||||
|
list.add(StatCollector.translateToLocal("tooltip.durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IIcon getIcon(ItemStack stack, int pass){
|
||||||
|
return this.itemIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerIcons(IIconRegister iconReg){
|
||||||
|
this.itemIcon = iconReg.registerIcon(Util.MOD_ID_LOWER + ":" + Util.getSubbedUnlocalized(this));
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,26 +0,0 @@
|
||||||
package ellpeck.someprettyrandomstuff.items.tools;
|
|
||||||
|
|
||||||
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.ItemAxe;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class ItemAxeSPTS extends ItemAxe{
|
|
||||||
|
|
||||||
public ItemAxeSPTS(ToolMaterial toolMat, String unlocalizedName){
|
|
||||||
super(toolMat);
|
|
||||||
this.setUnlocalizedName(unlocalizedName);
|
|
||||||
this.setCreativeTab(CreativeTab.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
|
||||||
Util.addStandardInformation(this);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
package ellpeck.someprettyrandomstuff.items.tools;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
||||||
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemHoe;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ItemHoeSPRS extends ItemHoe{
|
||||||
|
|
||||||
|
public ItemHoeSPRS(ToolMaterial toolMat, String unlocalizedName){
|
||||||
|
super(toolMat);
|
||||||
|
this.setUnlocalizedName(unlocalizedName);
|
||||||
|
this.setCreativeTab(CreativeTab.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
||||||
|
list.add(Util.addStandardInformation(this));
|
||||||
|
if(Util.isShiftPressed()){
|
||||||
|
list.add(StatCollector.translateToLocal("tooltip.durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IIcon getIcon(ItemStack stack, int pass){
|
||||||
|
return this.itemIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerIcons(IIconRegister iconReg){
|
||||||
|
this.itemIcon = iconReg.registerIcon(Util.MOD_ID_LOWER + ":" + Util.getSubbedUnlocalized(this));
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,26 +0,0 @@
|
||||||
package ellpeck.someprettyrandomstuff.items.tools;
|
|
||||||
|
|
||||||
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.ItemHoe;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class ItemHoeSPTS extends ItemHoe{
|
|
||||||
|
|
||||||
public ItemHoeSPTS(ToolMaterial toolMat, String unlocalizedName){
|
|
||||||
super(toolMat);
|
|
||||||
this.setUnlocalizedName(unlocalizedName);
|
|
||||||
this.setCreativeTab(CreativeTab.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
|
||||||
Util.addStandardInformation(this);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
package ellpeck.someprettyrandomstuff.items.tools;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
||||||
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemPickaxe;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ItemPickaxeSPRS extends ItemPickaxe{
|
||||||
|
|
||||||
|
public ItemPickaxeSPRS(ToolMaterial toolMat, String unlocalizedName){
|
||||||
|
super(toolMat);
|
||||||
|
this.setUnlocalizedName(unlocalizedName);
|
||||||
|
this.setCreativeTab(CreativeTab.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
|
list.add(Util.addStandardInformation(this));
|
||||||
|
if(Util.isShiftPressed()){
|
||||||
|
list.add(StatCollector.translateToLocal("tooltip.durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IIcon getIcon(ItemStack stack, int pass){
|
||||||
|
return this.itemIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerIcons(IIconRegister iconReg){
|
||||||
|
this.itemIcon = iconReg.registerIcon(Util.MOD_ID_LOWER + ":" + Util.getSubbedUnlocalized(this));
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,26 +0,0 @@
|
||||||
package ellpeck.someprettyrandomstuff.items.tools;
|
|
||||||
|
|
||||||
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.ItemPickaxe;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class ItemPickaxeSPTS extends ItemPickaxe{
|
|
||||||
|
|
||||||
public ItemPickaxeSPTS(ToolMaterial toolMat, String unlocalizedName){
|
|
||||||
super(toolMat);
|
|
||||||
this.setUnlocalizedName(unlocalizedName);
|
|
||||||
this.setCreativeTab(CreativeTab.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
|
||||||
Util.addStandardInformation(this);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
package ellpeck.someprettyrandomstuff.items.tools;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
||||||
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemSpade;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ItemShovelSPRS extends ItemSpade{
|
||||||
|
|
||||||
|
public ItemShovelSPRS(ToolMaterial toolMat, String unlocalizedName){
|
||||||
|
super(toolMat);
|
||||||
|
this.setUnlocalizedName(unlocalizedName);
|
||||||
|
this.setCreativeTab(CreativeTab.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
||||||
|
list.add(Util.addStandardInformation(this));
|
||||||
|
if(Util.isShiftPressed()){
|
||||||
|
list.add(StatCollector.translateToLocal("tooltip.durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IIcon getIcon(ItemStack stack, int pass){
|
||||||
|
return this.itemIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerIcons(IIconRegister iconReg){
|
||||||
|
this.itemIcon = iconReg.registerIcon(Util.MOD_ID_LOWER + ":" + Util.getSubbedUnlocalized(this));
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,26 +0,0 @@
|
||||||
package ellpeck.someprettyrandomstuff.items.tools;
|
|
||||||
|
|
||||||
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.ItemSpade;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class ItemShovelSPTS extends ItemSpade{
|
|
||||||
|
|
||||||
public ItemShovelSPTS(ToolMaterial toolMat, String unlocalizedName){
|
|
||||||
super(toolMat);
|
|
||||||
this.setUnlocalizedName(unlocalizedName);
|
|
||||||
this.setCreativeTab(CreativeTab.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) {
|
|
||||||
Util.addStandardInformation(this);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
package ellpeck.someprettyrandomstuff.items.tools;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
||||||
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.ItemSword;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ItemSwordSPRS extends ItemSword{
|
||||||
|
|
||||||
|
public ItemSwordSPRS(ToolMaterial toolMat, String unlocalizedName){
|
||||||
|
super(toolMat);
|
||||||
|
this.setUnlocalizedName(unlocalizedName);
|
||||||
|
this.setCreativeTab(CreativeTab.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
||||||
|
list.add(Util.addStandardInformation(this));
|
||||||
|
if(Util.isShiftPressed()){
|
||||||
|
list.add(StatCollector.translateToLocal("tooltip.durability.desc") + ": " + (this.getMaxDamage()-this.getDamage(stack)) + "/" + this.getMaxDamage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IIcon getIcon(ItemStack stack, int pass){
|
||||||
|
return this.itemIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerIcons(IIconRegister iconReg){
|
||||||
|
this.itemIcon = iconReg.registerIcon(Util.MOD_ID_LOWER + ":" + Util.getSubbedUnlocalized(this));
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,26 +0,0 @@
|
||||||
package ellpeck.someprettyrandomstuff.items.tools;
|
|
||||||
|
|
||||||
import ellpeck.someprettyrandomstuff.creative.CreativeTab;
|
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.item.ItemSword;
|
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class ItemSwordSPTS extends ItemSword{
|
|
||||||
|
|
||||||
public ItemSwordSPTS(ToolMaterial toolMat, String unlocalizedName){
|
|
||||||
super(toolMat);
|
|
||||||
this.setUnlocalizedName(unlocalizedName);
|
|
||||||
this.setCreativeTab(CreativeTab.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
|
|
||||||
Util.addStandardInformation(this);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
package ellpeck.someprettyrandomstuff.material;
|
||||||
|
|
||||||
|
import ellpeck.someprettyrandomstuff.config.ConfigValues;
|
||||||
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
|
import net.minecraft.item.Item.ToolMaterial;
|
||||||
|
import net.minecraftforge.common.util.EnumHelper;
|
||||||
|
|
||||||
|
public class InitItemMaterials{
|
||||||
|
|
||||||
|
public static ToolMaterial toolMaterialEmerald;
|
||||||
|
public static ToolMaterial toolMaterialObsidian;
|
||||||
|
|
||||||
|
public static void init(){
|
||||||
|
Util.logInfo("Initializing Materials...");
|
||||||
|
|
||||||
|
toolMaterialEmerald = EnumHelper.addToolMaterial("toolMaterialEmerald", ConfigValues.toolEmeraldHarvestLevel, ConfigValues.toolEmeraldMaxUses, ConfigValues.toolEmeraldEfficiency, ConfigValues.toolEmeraldDamage, ConfigValues.toolEmeraldEnchantability);
|
||||||
|
toolMaterialObsidian = EnumHelper.addToolMaterial("toolMaterialObsidian", ConfigValues.toolObsidianHarvestLevel, ConfigValues.toolObsidianMaxUses, ConfigValues.toolObsidianEfficiency, ConfigValues.toolObsidianDamage, ConfigValues.toolObsidianEnchantability);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,31 +1,14 @@
|
||||||
package ellpeck.someprettyrandomstuff.proxy;
|
package ellpeck.someprettyrandomstuff.proxy;
|
||||||
|
|
||||||
import ellpeck.someprettyrandomstuff.blocks.InitBlocks;
|
|
||||||
import ellpeck.someprettyrandomstuff.items.InitItems;
|
|
||||||
import ellpeck.someprettyrandomstuff.items.ItemFoods;
|
|
||||||
import ellpeck.someprettyrandomstuff.items.ItemMisc;
|
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public class ClientProxy implements IProxy{
|
public class ClientProxy implements IProxy{
|
||||||
|
|
||||||
public void preInit(){
|
public void preInit(){
|
||||||
Util.logInfo("PreInitializing Textures...");
|
|
||||||
Util.preInitIcons(InitItems.itemMisc, ItemMisc.allMiscItems);
|
|
||||||
Util.preInitIcons(InitItems.itemFoods, ItemFoods.allFoods);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(){
|
public void init(){
|
||||||
Util.logInfo("Initializing Textures...");
|
|
||||||
Util.initIcons(InitItems.itemMisc, ItemMisc.allMiscItems);
|
|
||||||
Util.initIcons(InitItems.itemFoods, ItemFoods.allFoods);
|
|
||||||
|
|
||||||
Util.initIcons(InitItems.itemFertilizer);
|
|
||||||
Util.initIcons(Item.getItemFromBlock(InitBlocks.blockCompost));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void postInit(){
|
public void postInit(){
|
||||||
Util.logInfo("PostInitializing Textures...");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +1,35 @@
|
||||||
package ellpeck.someprettyrandomstuff.tile;
|
package ellpeck.someprettyrandomstuff.tile;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import ellpeck.someprettyrandomstuff.util.Util;
|
import ellpeck.someprettyrandomstuff.util.Util;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.network.NetworkManager;
|
import net.minecraft.network.NetworkManager;
|
||||||
import net.minecraft.network.Packet;
|
import net.minecraft.network.Packet;
|
||||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public abstract class TileEntityBase extends TileEntity{
|
public abstract class TileEntityBase extends TileEntity{
|
||||||
|
|
||||||
public Packet getDescriptionPacket(){
|
public Packet getDescriptionPacket(){
|
||||||
NBTTagCompound compound = new NBTTagCompound();
|
NBTTagCompound compound = new NBTTagCompound();
|
||||||
this.writeToNBT(compound);
|
this.writeToNBT(compound);
|
||||||
return new S35PacketUpdateTileEntity(this.getPos(), this.getBlockMetadata(), compound);
|
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, this.getBlockMetadata(), compound);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet){
|
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet){
|
||||||
super.onDataPacket(net, packet);
|
super.onDataPacket(net, packet);
|
||||||
this.readFromNBT(packet.getNbtCompound());
|
this.readFromNBT(packet.func_148857_g());
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean shouldRefresh(Block oldBlock, Block newBlock, int oldMeta, int newMeta, World world, int x, int y, int z){
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void init(){
|
public static void init(){
|
||||||
Util.logInfo("Registering TileEntities...");
|
Util.logInfo("Registering TileEntities...");
|
||||||
GameRegistry.registerTileEntity(TileEntityCompost.class, Util.MOD_ID + ":tileEntityCompost");
|
GameRegistry.registerTileEntity(TileEntityCompost.class, Util.MOD_ID_LOWER + ":tileEntityCompost");
|
||||||
|
GameRegistry.registerTileEntity(TileEntityFeeder.class, Util.MOD_ID_LOWER + ":tileEntityFeeder");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,13 +3,10 @@ package ellpeck.someprettyrandomstuff.tile;
|
||||||
import ellpeck.someprettyrandomstuff.config.ConfigValues;
|
import ellpeck.someprettyrandomstuff.config.ConfigValues;
|
||||||
import ellpeck.someprettyrandomstuff.items.InitItems;
|
import ellpeck.someprettyrandomstuff.items.InitItems;
|
||||||
import ellpeck.someprettyrandomstuff.items.ItemFertilizer;
|
import ellpeck.someprettyrandomstuff.items.ItemFertilizer;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.server.gui.IUpdatePlayerListBox;
|
|
||||||
import net.minecraft.util.IChatComponent;
|
|
||||||
|
|
||||||
public class TileEntityCompost extends TileEntityInventoryBase implements IUpdatePlayerListBox{
|
public class TileEntityCompost extends TileEntityInventoryBase{
|
||||||
|
|
||||||
public final int amountNeededToConvert = ConfigValues.tileEntityCompostAmountNeededToConvert;
|
public final int amountNeededToConvert = ConfigValues.tileEntityCompostAmountNeededToConvert;
|
||||||
public final int conversionTimeNeeded = ConfigValues.tileEntityCompostConversionTimeNeeded;
|
public final int conversionTimeNeeded = ConfigValues.tileEntityCompostConversionTimeNeeded;
|
||||||
|
@ -17,10 +14,10 @@ public class TileEntityCompost extends TileEntityInventoryBase implements IUpdat
|
||||||
public int conversionTime;
|
public int conversionTime;
|
||||||
|
|
||||||
public TileEntityCompost(){
|
public TileEntityCompost(){
|
||||||
this.slots = new ItemStack[1];
|
super(1, "tileEntityCompost");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update(){
|
public void updateEntity(){
|
||||||
if(!worldObj.isRemote){
|
if(!worldObj.isRemote){
|
||||||
if(this.slots[0] != null && !(this.slots[0].getItem() instanceof ItemFertilizer) && this.slots[0].stackSize >= this.amountNeededToConvert){
|
if(this.slots[0] != null && !(this.slots[0].getItem() instanceof ItemFertilizer) && this.slots[0].stackSize >= this.amountNeededToConvert){
|
||||||
this.conversionTime++;
|
this.conversionTime++;
|
||||||
|
@ -41,40 +38,4 @@ public class TileEntityCompost extends TileEntityInventoryBase implements IUpdat
|
||||||
super.readFromNBT(compound);
|
super.readFromNBT(compound);
|
||||||
this.conversionTime = compound.getInteger("ConversionTime");
|
this.conversionTime = compound.getInteger("ConversionTime");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openInventory(EntityPlayer player){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void closeInventory(EntityPlayer player){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getField(int id){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setField(int id, int value){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getFieldCount(){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void clear(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName(){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean hasCustomName(){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IChatComponent getDisplayName(){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,86 @@
|
||||||
|
package ellpeck.someprettyrandomstuff.tile;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import ellpeck.someprettyrandomstuff.config.ConfigValues;
|
||||||
|
import net.minecraft.entity.passive.EntityAnimal;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
public class TileEntityFeeder extends TileEntityInventoryBase{
|
||||||
|
|
||||||
|
public int reach = ConfigValues.tileEntityFeederReach;
|
||||||
|
public int timerGoal = ConfigValues.tileEntityFeederTimeNeeded;
|
||||||
|
public int animalThreshold = ConfigValues.tileEntityFeederThreshold;
|
||||||
|
|
||||||
|
public int currentTimer;
|
||||||
|
public int currentAnimalAmount;
|
||||||
|
//Is 0 or 1, gets sent to the GUI for display
|
||||||
|
public int isBred;
|
||||||
|
|
||||||
|
public TileEntityFeeder(){
|
||||||
|
super(1, "tileEntityFeeder");
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public void updateEntity(){
|
||||||
|
if(!worldObj.isRemote){
|
||||||
|
List<EntityAnimal> animals = worldObj.getEntitiesWithinAABB(EntityAnimal.class, AxisAlignedBB.getBoundingBox(this.xCoord - reach, this.yCoord - reach, this.zCoord - reach, this.xCoord + reach, this.yCoord + reach, this.zCoord + reach));
|
||||||
|
if(animals != null){
|
||||||
|
this.currentAnimalAmount = animals.size();
|
||||||
|
if(this.currentAnimalAmount >= 2 && this.slots[0] != null){
|
||||||
|
if(this.currentAnimalAmount < this.animalThreshold){
|
||||||
|
if(this.currentTimer >= this.timerGoal){
|
||||||
|
this.currentTimer = 0;
|
||||||
|
EntityAnimal randomAnimal = animals.get(new Random().nextInt(this.currentAnimalAmount));
|
||||||
|
if(!randomAnimal.isInLove() && randomAnimal.getGrowingAge() == 0 && randomAnimal.isBreedingItem(this.slots[0])){
|
||||||
|
randomAnimal.func_146082_f(null);
|
||||||
|
this.slots[0].stackSize--;
|
||||||
|
if(this.slots[0].stackSize == 0) this.slots[0] = this.slots[0].getItem().getContainerItem(this.slots[0]);
|
||||||
|
|
||||||
|
this.isBred = 1;
|
||||||
|
Random rand = new Random();
|
||||||
|
for(int i = 0; i < 7; i++){
|
||||||
|
double d = rand.nextGaussian() * 0.02D;
|
||||||
|
double d1 = rand.nextGaussian() * 0.02D;
|
||||||
|
double d2 = rand.nextGaussian() * 0.02D;
|
||||||
|
worldObj.spawnParticle("heart", (randomAnimal.posX + (double)(rand.nextFloat() * randomAnimal.width * 2.0F)) - randomAnimal.width, randomAnimal.posY + 0.5D + (double)(rand.nextFloat() * randomAnimal.height), (randomAnimal.posZ + (double)(rand.nextFloat() * randomAnimal.width * 2.0F)) - randomAnimal.width, d, d1, d2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(this.currentTimer == timerGoal/10) this.isBred = 0;
|
||||||
|
this.currentTimer++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.currentTimer = 0;
|
||||||
|
this.isBred = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.currentTimer = 0;
|
||||||
|
this.isBred = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public int getCurrentTimerToScale(int i){
|
||||||
|
return this.currentTimer * i / this.timerGoal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void writeToNBT(NBTTagCompound compound){
|
||||||
|
super.writeToNBT(compound);
|
||||||
|
compound.setInteger("Timer", this.currentTimer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void readFromNBT(NBTTagCompound compound){
|
||||||
|
super.readFromNBT(compound);
|
||||||
|
this.currentTimer = compound.getInteger("Timer");
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,6 +9,12 @@ import net.minecraft.nbt.NBTTagList;
|
||||||
public abstract class TileEntityInventoryBase extends TileEntityBase implements IInventory{
|
public abstract class TileEntityInventoryBase extends TileEntityBase implements IInventory{
|
||||||
|
|
||||||
public ItemStack slots[];
|
public ItemStack slots[];
|
||||||
|
public String name;
|
||||||
|
|
||||||
|
public TileEntityInventoryBase(int slots, String name){
|
||||||
|
this.initializeSlots(slots);
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
public void writeToNBT(NBTTagCompound compound){
|
public void writeToNBT(NBTTagCompound compound){
|
||||||
super.writeToNBT(compound);
|
super.writeToNBT(compound);
|
||||||
|
@ -41,7 +47,7 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isUseableByPlayer(EntityPlayer player){
|
public boolean isUseableByPlayer(EntityPlayer player){
|
||||||
return worldObj.getTileEntity(this.getPos()) == this && player.getDistanceSq(this.getPos().getX() + 0.5D, this.getPos().getY() + 0.5D, this.getPos().getZ() + 0.5D) <= 64;
|
return player.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isItemValidForSlot(int i, ItemStack stack){
|
public boolean isItemValidForSlot(int i, ItemStack stack){
|
||||||
|
@ -80,4 +86,24 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void initializeSlots(int itemAmount){
|
||||||
|
this.slots = new ItemStack[itemAmount];
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInventoryName(){
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasCustomInventoryName(){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void openInventory(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void closeInventory(){
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +1,51 @@
|
||||||
package ellpeck.someprettyrandomstuff.util;
|
package ellpeck.someprettyrandomstuff.util;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
import net.minecraft.client.resources.model.ModelBakery;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.StatCollector;
|
import net.minecraft.util.StatCollector;
|
||||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
import org.apache.logging.log4j.Level;
|
import org.apache.logging.log4j.Level;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
public class Util{
|
public class Util{
|
||||||
|
|
||||||
|
public static final String VERSION = "1.7.10-0.0.1";
|
||||||
|
|
||||||
public static final String MOD_ID = "SomePrettyRandomStuff";
|
public static final String MOD_ID = "SomePrettyRandomStuff";
|
||||||
public static final String NAME = "Some Pretty Random Stuff";
|
public static final String NAME = "Some Pretty Random Stuff";
|
||||||
public static final String VERSION = "1.8-0.0.1";
|
public static final String MOD_ID_LOWER = MOD_ID.toLowerCase();
|
||||||
|
|
||||||
public static final Logger SPRS_LOGGER = LogManager.getLogger(MOD_ID);
|
public static final Logger SPRS_LOGGER = LogManager.getLogger(MOD_ID);
|
||||||
|
|
||||||
public static final int WILDCARD = OreDictionary.WILDCARD_VALUE;
|
public static final int WILDCARD = OreDictionary.WILDCARD_VALUE;
|
||||||
|
|
||||||
|
public static final String BLACK = (char)167 + "0";
|
||||||
|
public static final String BLUE = (char)167 + "1";
|
||||||
|
public static final String GREEN = (char)167 + "2";
|
||||||
|
public static final String TEAL = (char)167 + "3";
|
||||||
|
public static final String RED = (char)167 + "4";
|
||||||
|
public static final String PURPLE = (char)167 + "5";
|
||||||
|
public static final String ORANGE = (char)167 + "6";
|
||||||
|
public static final String LIGHT_GRAY = (char)167 + "7";
|
||||||
|
public static final String GRAY = (char)167 + "8";
|
||||||
|
public static final String LIGHT_BLUE = (char)167 + "9";
|
||||||
|
public static final String BRIGHT_GREEN = (char)167 + "a";
|
||||||
|
public static final String BRIGHT_BLUE = (char)167 + "b";
|
||||||
|
public static final String LIGHT_RED = (char)167 + "c";
|
||||||
|
public static final String PINK = (char)167 + "d";
|
||||||
|
public static final String YELLOW = (char)167 + "e";
|
||||||
|
public static final String WHITE = (char)167 + "f";
|
||||||
|
public static final String BOLD = (char)167 + "l";
|
||||||
|
public static final String UNDERLINE = (char)167 + "n";
|
||||||
|
public static final String ITALIC = (char)167 + "o";
|
||||||
|
|
||||||
public static boolean isShiftPressed(){
|
public static boolean isShiftPressed(){
|
||||||
return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT);
|
return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT);
|
||||||
}
|
}
|
||||||
|
@ -33,32 +56,14 @@ public class Util{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String shiftForInfo(){
|
public static String shiftForInfo(){
|
||||||
return (char)167+"2" + (char)167+"o" + StatCollector.translateToLocal("tooltip.shiftForInfo.desc");
|
return GREEN + ITALIC + StatCollector.translateToLocal("tooltip.shiftForInfo.desc");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String addStandardInformation(Item item){
|
public static String addStandardInformation(Item item){
|
||||||
if(isShiftPressed()) return StatCollector.translateToLocal("tooltip." + item.getUnlocalizedName().substring(5) + ".desc");
|
if(isShiftPressed()) return StatCollector.translateToLocal("tooltip." + getSubbedUnlocalized(item) + ".desc");
|
||||||
else return shiftForInfo();
|
else return shiftForInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void preInitIcons(Item item, IItemEnum[] theArray){
|
|
||||||
String[] bakeryArray = new String[theArray.length];
|
|
||||||
for (int j = 0; j < theArray.length; j++){
|
|
||||||
bakeryArray[j] = Util.MOD_ID + ":" + item.getUnlocalizedName().substring(5) + theArray[j].getName();
|
|
||||||
}
|
|
||||||
ModelBakery.addVariantName(item, bakeryArray);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initIcons(Item item, IItemEnum[] theArray){
|
|
||||||
for(int j = 0; j < theArray.length; j++){
|
|
||||||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, j, new ModelResourceLocation(Util.MOD_ID + ":" + item.getUnlocalizedName().substring(5) + theArray[j].getName(), "inventory"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void initIcons(Item item){
|
|
||||||
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Util.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void logInfo(String text){
|
public static void logInfo(String text){
|
||||||
SPRS_LOGGER.log(Level.INFO, text);
|
SPRS_LOGGER.log(Level.INFO, text);
|
||||||
}
|
}
|
||||||
|
@ -66,4 +71,22 @@ public class Util{
|
||||||
public static boolean isClientSide(){
|
public static boolean isClientSide(){
|
||||||
return FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT;
|
return FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getSubbedUnlocalized(Item item){
|
||||||
|
return item.getUnlocalizedName().substring(5);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getSubbedUnlocalized(Block block){
|
||||||
|
return block.getUnlocalizedName().substring(5);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void registerItems(Item[] items){
|
||||||
|
for(Item item : items){
|
||||||
|
GameRegistry.registerItem(item, getSubbedUnlocalized(item));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ResourceLocation getGuiLocation(String file){
|
||||||
|
return new ResourceLocation(MOD_ID_LOWER, "textures/gui/" + file + ".png");
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"variants": {
|
|
||||||
"normal": { "model": "someprettyrandomstuff:blockCompost" }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +1,12 @@
|
||||||
itemGroup.SomePrettyRandomStuff=SomePrettyRandomStuff
|
itemGroup.someprettyrandomstuff=SomePrettyRandomStuff
|
||||||
achievement.page.SomePrettyRandomStuff=SomePrettyRandomStuff
|
achievement.page.someprettyrandomstuff=SomePrettyRandomStuff
|
||||||
|
|
||||||
tile.blockCompost.name=Compost
|
tile.blockCompost.name=Compost
|
||||||
|
tile.blockMiscOreBlackQuartz.name=Black Quartz Ore
|
||||||
|
tile.blockMiscBlackQuartz.name=Block of Black Quartz
|
||||||
|
tile.blockMiscBlackQuartzChiseled.name=Chiseled Block of Black Quartz
|
||||||
|
tile.blockMiscBlackQuartzPillar.name=Pillar of Black Quartz
|
||||||
|
tile.blockFeeder.name=Automatic Feeder
|
||||||
|
|
||||||
item.itemMiscMashedFood.name=Mashed Food
|
item.itemMiscMashedFood.name=Mashed Food
|
||||||
item.itemMiscRefinedIron.name=Refined Iron
|
item.itemMiscRefinedIron.name=Refined Iron
|
||||||
|
@ -11,6 +16,21 @@ item.itemMiscSteel.name=Steel
|
||||||
item.itemFertilizer.name=Fertilizer
|
item.itemFertilizer.name=Fertilizer
|
||||||
item.itemMiscDough.name=Dough
|
item.itemMiscDough.name=Dough
|
||||||
item.itemMiscPaperCone.name=Paper Cone
|
item.itemMiscPaperCone.name=Paper Cone
|
||||||
|
item.itemMiscKnifeBlade.name=Knife Blade
|
||||||
|
item.itemMiscKnifeHandle.name=Knife Handle
|
||||||
|
item.itemMiscBlackQuartz.name=Black Quartz
|
||||||
|
|
||||||
|
item.itemKnife.name=Knife
|
||||||
|
item.itemPickaxeEmerald.name=Emerald Pickaxe
|
||||||
|
item.itemAxeEmerald.name=Emerald Axe
|
||||||
|
item.itemShovelEmerald.name=Emerald Shovel
|
||||||
|
item.itemHoeEmerald.name=Emerald Hoe
|
||||||
|
item.itemSwordEmerald.name=Emerald Sword
|
||||||
|
item.itemPickaxeObsidian.name=Obsidian Pickaxe
|
||||||
|
item.itemAxeObsidian.name=Obsidian Axe
|
||||||
|
item.itemShovelObsidian.name=Obsidian Shovel
|
||||||
|
item.itemHoeObsidian.name=Obsidian Hoe
|
||||||
|
item.itemSwordObsidian.name=Obsidian Sword
|
||||||
|
|
||||||
item.itemFoodBaguette.name=Baguette
|
item.itemFoodBaguette.name=Baguette
|
||||||
item.itemFoodPizza.name=Pizza
|
item.itemFoodPizza.name=Pizza
|
||||||
|
@ -32,8 +52,14 @@ item.itemFoodCheese.name=Cheese
|
||||||
tooltip.shiftForInfo.desc=Press Shift for Info
|
tooltip.shiftForInfo.desc=Press Shift for Info
|
||||||
tooltip.hunger.desc=Fills
|
tooltip.hunger.desc=Fills
|
||||||
tooltip.saturation.desc=Saturation
|
tooltip.saturation.desc=Saturation
|
||||||
|
tooltip.durability.desc=Durability
|
||||||
|
|
||||||
tooltip.blockCompost.desc=Used to make Fertilizer with Mashed Food
|
tooltip.blockCompost.desc=Used to make Fertilizer with Mashed Food
|
||||||
|
tooltip.blockMiscOreBlackQuartz.desc=The darkest form of Quartz. Also: You had Silk Touch!
|
||||||
|
tooltip.blockMiscBlackQuartz.desc=Black, eerie Quartz! Nice for decorating.
|
||||||
|
tooltip.blockMiscBlackQuartzChiseled.desc=Black, eerie chiseled Quartz! Nice for decorating.
|
||||||
|
tooltip.blockMiscBlackQuartzPillar.desc=Kind of a pillar. Not really, though. It's fake! Fake I say!
|
||||||
|
tooltip.blockFeeder.desc=Feeds Animals on its own!
|
||||||
|
|
||||||
tooltip.itemMiscMashedFood.desc=Used to make Fertilizer
|
tooltip.itemMiscMashedFood.desc=Used to make Fertilizer
|
||||||
tooltip.itemMiscRefinedIron.desc=Iron, but better
|
tooltip.itemMiscRefinedIron.desc=Iron, but better
|
||||||
|
@ -43,13 +69,28 @@ tooltip.itemMiscSteel.desc=Like Iron, but stronger. Much stronger.
|
||||||
tooltip.itemFertilizer.desc=Om nom nom. Don't eat it.
|
tooltip.itemFertilizer.desc=Om nom nom. Don't eat it.
|
||||||
tooltip.itemMiscDough.desc=Used to make things that involve dough.
|
tooltip.itemMiscDough.desc=Used to make things that involve dough.
|
||||||
tooltip.itemMiscPaperCone.desc=Used to store foodstuffs!
|
tooltip.itemMiscPaperCone.desc=Used to store foodstuffs!
|
||||||
|
tooltip.itemMiscKnifeBlade.desc=Sharp like a tooth! A whale's tooth!
|
||||||
|
tooltip.itemMiscKnifeHandle.desc=Fits comfortably in your hand.
|
||||||
|
tooltip.itemMiscBlackQuartz.desc=Used in the Quartz Enchanter!
|
||||||
|
|
||||||
|
tooltip.itemKnife.desc=Cuts things! Only food though, don't think of stuff...
|
||||||
|
tooltip.itemPickaxeEmerald.desc=Mines Stone.
|
||||||
|
tooltip.itemAxeEmerald.desc=Mines Wood.
|
||||||
|
tooltip.itemShovelEmerald.desc=Mines Dirt.
|
||||||
|
tooltip.itemHoeEmerald.desc=Mines... uhm... yea.
|
||||||
|
tooltip.itemSwordEmerald.desc=Mines... mobs?
|
||||||
|
tooltip.itemPickaxeObsidian.desc=Mines Stone. Slooooowly.
|
||||||
|
tooltip.itemAxeObsidian.desc=Mines Wood. Slooooowly.
|
||||||
|
tooltip.itemShovelObsidian.desc=Mines Dirt. Slooooowly.
|
||||||
|
tooltip.itemHoeObsidian.desc=Mines... uhm... yea.
|
||||||
|
tooltip.itemSwordObsidian.desc=Mines... mobs?
|
||||||
|
|
||||||
tooltip.itemFoodBaguette.desc=It's french. It's noms.
|
tooltip.itemFoodBaguette.desc=It's french. It's noms.
|
||||||
tooltip.itemFoodPizza.desc=Who doesn't like it?
|
tooltip.itemFoodPizza.desc=Who doesn't like it?
|
||||||
tooltip.itemFoodHamburger.desc=It's from a german city!
|
tooltip.itemFoodHamburger.desc=It's from a german city!
|
||||||
tooltip.itemFoodBigCookie.desc=Do you know? The Subway Thing?
|
tooltip.itemFoodBigCookie.desc=Do you know? The Subway Thing?
|
||||||
tooltip.itemFoodSubmarineSandwich.desc=Do you know? The Subway and everything else Thing?
|
tooltip.itemFoodSubmarineSandwich.desc=Do you know? The Subway and everything else Thing?
|
||||||
tooltip.itemFoodToast.desc="GHOSTS! GHOSTS! TOAST!"
|
tooltip.itemFoodToast.desc="GHOSTS! GHOSTS! TOASTS!"
|
||||||
tooltip.itemFoodChocolate.desc=Lari likes.
|
tooltip.itemFoodChocolate.desc=Lari likes.
|
||||||
tooltip.itemFoodChocolateCake.desc=Looks delicious. With redberries. Or something.
|
tooltip.itemFoodChocolateCake.desc=Looks delicious. With redberries. Or something.
|
||||||
tooltip.itemFoodNoodle.desc=Just one. Like... that's not much.
|
tooltip.itemFoodNoodle.desc=Just one. Like... that's not much.
|
||||||
|
@ -81,3 +122,13 @@ achievement.craftFishNChips=It's Fish! It's Chips!
|
||||||
achievement.craftFishNChips.desc=Craft Fish 'N' Chips
|
achievement.craftFishNChips.desc=Craft Fish 'N' Chips
|
||||||
achievement.craftMashedFood=Munch munch munch!
|
achievement.craftMashedFood=Munch munch munch!
|
||||||
achievement.craftMashedFood.desc=Craft Mashed Food
|
achievement.craftMashedFood.desc=Craft Mashed Food
|
||||||
|
achievement.craftKnifeBlade=Sharp! So sharp!
|
||||||
|
achievement.craftKnifeBlade.desc=Craft a Knife Blade
|
||||||
|
achievement.craftKnife=Sharper! Even sharper!
|
||||||
|
achievement.craftKnife.desc=Craft a Knife
|
||||||
|
|
||||||
|
feeder.animal.desc=Animal
|
||||||
|
feeder.animalsSuffix.desc=s
|
||||||
|
feeder.enoughToBreed.desc=Enough to breed!
|
||||||
|
feeder.tooMany.desc=Too many to breed!
|
||||||
|
feeder.notEnough.desc=Not enough to breed!
|
|
@ -1,154 +0,0 @@
|
||||||
{
|
|
||||||
"textures": {
|
|
||||||
"particle": "someprettyrandomstuff:blocks/blockCompostInside",
|
|
||||||
"top": "someprettyrandomstuff:blocks/blockCompostTop",
|
|
||||||
"bottom": "someprettyrandomstuff:blocks/blockCompostBottom",
|
|
||||||
"side": "someprettyrandomstuff:blocks/blockCompostSide",
|
|
||||||
"inside": "someprettyrandomstuff:blocks/blockCompostInside"
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{ "from": [ 0, 3, 0 ],
|
|
||||||
"to": [ 2, 16, 16 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 0, 0, 2, 16 ], "texture": "#inside", "cullface": "down" },
|
|
||||||
"up": { "uv": [ 0, 0, 2, 16 ], "texture": "#top", "cullface": "up" },
|
|
||||||
"north": { "uv": [ 2, 0, 0, 13 ], "texture": "#side", "cullface": "north" },
|
|
||||||
"south": { "uv": [ 0, 0, 2, 13 ], "texture": "#side", "cullface": "south" },
|
|
||||||
"west": { "uv": [ 0, 0, 16, 13 ], "texture": "#side", "cullface": "west" },
|
|
||||||
"east": { "uv": [ 0, 0, 16, 13 ], "texture": "#side" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ "from": [ 2, 3, 2 ],
|
|
||||||
"to": [ 14, 4, 14 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 2, 14, 14 ], "texture": "#inside", "cullface": "down" },
|
|
||||||
"up": { "uv": [ 2, 2, 14, 14 ], "texture": "#inside", "cullface": "up" },
|
|
||||||
"north": { "uv": [ 2, 0, 0, 13 ], "texture": "#side", "cullface": "north" },
|
|
||||||
"south": { "uv": [ 0, 0, 2, 13 ], "texture": "#side", "cullface": "south" },
|
|
||||||
"west": { "uv": [ 0, 0, 16, 13 ], "texture": "#side", "cullface": "west" },
|
|
||||||
"east": { "uv": [ 0, 0, 16, 13 ], "texture": "#side", "cullface": "east" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ "from": [ 14, 3, 0 ],
|
|
||||||
"to": [ 16, 16, 16 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 14, 0, 16, 16 ], "texture": "#inside", "cullface": "down" },
|
|
||||||
"up": { "uv": [ 14, 0, 16, 16 ], "texture": "#top", "cullface": "up" },
|
|
||||||
"north": { "uv": [ 16, 0, 14, 13 ], "texture": "#side", "cullface": "north" },
|
|
||||||
"south": { "uv": [ 14, 0, 16, 13 ], "texture": "#side", "cullface": "south" },
|
|
||||||
"west": { "uv": [ 0, 0, 16, 13 ], "texture": "#side" },
|
|
||||||
"east": { "uv": [ 0, 0, 16, 13 ], "texture": "#side", "cullface": "east" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ "from": [ 2, 3, 0 ],
|
|
||||||
"to": [ 14, 16, 2 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 0, 14, 2 ], "texture": "#inside", "cullface": "down" },
|
|
||||||
"up": { "uv": [ 2, 0, 14, 2 ], "texture": "#top", "cullface": "up" },
|
|
||||||
"north": { "uv": [ 2, 0, 14, 13 ], "texture": "#side", "cullface": "north" },
|
|
||||||
"south": { "uv": [ 2, 0, 14, 13 ], "texture": "#side" },
|
|
||||||
"west": { "uv": [ 0, 0, 2, 13 ], "texture": "#side", "cullface": "west" },
|
|
||||||
"east": { "uv": [ 0, 0, 2, 13 ], "texture": "#side", "cullface": "east" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ "from": [ 2, 3, 14 ],
|
|
||||||
"to": [ 14, 16, 16 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 2, 14, 14, 16 ], "texture": "#inside", "cullface": "down" },
|
|
||||||
"up": { "uv": [ 2, 14, 14, 16 ], "texture": "#top", "cullface": "up" },
|
|
||||||
"north": { "uv": [ 2, 0, 14, 13 ], "texture": "#side" },
|
|
||||||
"south": { "uv": [ 2, 0, 14, 13 ], "texture": "#side", "cullface": "south" },
|
|
||||||
"west": { "uv": [ 14, 0, 16, 13 ], "texture": "#side", "cullface": "west" },
|
|
||||||
"east": { "uv": [ 14, 0, 16, 13 ], "texture": "#side", "cullface": "east" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ "from": [ 0, 0, 0 ],
|
|
||||||
"to": [ 4, 3, 2 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 0, 0, 4, 2 ], "texture": "#bottom", "cullface": "down" },
|
|
||||||
"up": { "uv": [ 0, 0, 2, 16 ], "texture": "#top", "cullface": "up" },
|
|
||||||
"north": { "uv": [ 4, 13, 0, 16 ], "texture": "#side", "cullface": "north" },
|
|
||||||
"south": { "uv": [ 0, 13, 4, 16 ], "texture": "#side", "cullface": "south" },
|
|
||||||
"west": { "uv": [ 0, 13, 2, 16 ], "texture": "#side", "cullface": "west" },
|
|
||||||
"east": { "uv": [ 0, 13, 2, 16 ], "texture": "#side", "cullface": "east" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ "from": [ 0, 0, 2 ],
|
|
||||||
"to": [ 2, 3, 4 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 0, 2, 2, 4 ], "texture": "#bottom", "cullface": "down" },
|
|
||||||
"up": { "uv": [ 0, 0, 2, 16 ], "texture": "#top", "cullface": "up" },
|
|
||||||
"north": { "uv": [ 2, 13, 0, 16 ], "texture": "#side", "cullface": "north" },
|
|
||||||
"south": { "uv": [ 0, 13, 2, 16 ], "texture": "#side", "cullface": "south" },
|
|
||||||
"west": { "uv": [ 2, 13, 4, 16 ], "texture": "#side", "cullface": "west" },
|
|
||||||
"east": { "uv": [ 2, 13, 4, 16 ], "texture": "#side", "cullface": "east" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ "from": [ 12, 0, 0 ],
|
|
||||||
"to": [ 16, 3, 2 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 12, 0, 16, 2 ], "texture": "#bottom", "cullface": "down" },
|
|
||||||
"up": { "uv": [ 0, 0, 2, 16 ], "texture": "#top", "cullface": "up" },
|
|
||||||
"north": { "uv": [ 16, 13, 12, 16 ], "texture": "#side", "cullface": "north" },
|
|
||||||
"south": { "uv": [ 12, 13, 16, 16 ], "texture": "#side", "cullface": "south" },
|
|
||||||
"west": { "uv": [ 0, 13, 2, 16 ], "texture": "#side", "cullface": "west" },
|
|
||||||
"east": { "uv": [ 0, 13, 2, 16 ], "texture": "#side", "cullface": "east" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ "from": [ 14, 0, 2 ],
|
|
||||||
"to": [ 16, 3, 4 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 14, 2, 16, 4 ], "texture": "#bottom" },
|
|
||||||
"up": { "uv": [ 0, 0, 2, 16 ], "texture": "#top" },
|
|
||||||
"north": { "uv": [ 16, 13, 14, 16 ], "texture": "#side" },
|
|
||||||
"south": { "uv": [ 14, 13, 16, 16 ], "texture": "#side" },
|
|
||||||
"west": { "uv": [ 4, 13, 2, 16 ], "texture": "#side" },
|
|
||||||
"east": { "uv": [ 4, 13, 2, 16 ], "texture": "#side" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ "from": [ 0, 0, 14 ],
|
|
||||||
"to": [ 4, 3, 16 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 14, 0, 16, 4 ], "texture": "#bottom" },
|
|
||||||
"up": { "uv": [ 14, 0, 16, 16 ], "texture": "#top" },
|
|
||||||
"north": { "uv": [ 4, 13, 0, 16 ], "texture": "#side" },
|
|
||||||
"south": { "uv": [ 0, 13, 4, 16 ], "texture": "#side" },
|
|
||||||
"west": { "uv": [ 14, 13, 16, 16 ], "texture": "#side" },
|
|
||||||
"east": { "uv": [ 14, 13, 16, 16 ], "texture": "#side" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ "from": [ 0, 0, 12 ],
|
|
||||||
"to": [ 2, 3, 14 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 12, 0, 14, 4 ], "texture": "#bottom" },
|
|
||||||
"up": { "uv": [ 14, 0, 16, 16 ], "texture": "#top" },
|
|
||||||
"north": { "uv": [ 2, 13, 0, 16 ], "texture": "#side" },
|
|
||||||
"south": { "uv": [ 0, 13, 2, 16 ], "texture": "#side" },
|
|
||||||
"west": { "uv": [ 12, 13, 14, 16 ], "texture": "#side" },
|
|
||||||
"east": { "uv": [ 12, 13, 14, 16 ], "texture": "#side" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ "from": [ 12, 0, 14 ],
|
|
||||||
"to": [ 16, 3, 16 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 14, 12, 16, 16 ], "texture": "#bottom" },
|
|
||||||
"up": { "uv": [ 14, 0, 16, 16 ], "texture": "#top" },
|
|
||||||
"north": { "uv": [ 16, 13, 12, 16 ], "texture": "#side" },
|
|
||||||
"south": { "uv": [ 12, 13, 16, 16 ], "texture": "#side" },
|
|
||||||
"west": { "uv": [ 14, 13, 16, 16 ], "texture": "#side" },
|
|
||||||
"east": { "uv": [ 14, 13, 16, 16 ], "texture": "#side" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ "from": [ 14, 0, 12 ],
|
|
||||||
"to": [ 16, 3, 14 ],
|
|
||||||
"faces": {
|
|
||||||
"down": { "uv": [ 14, 12, 16, 14 ], "texture": "#bottom" },
|
|
||||||
"up": { "uv": [ 14, 0, 16, 16 ], "texture": "#top" },
|
|
||||||
"north": { "uv": [ 16, 13, 14, 16 ], "texture": "#side" },
|
|
||||||
"south": { "uv": [ 14, 13, 16, 16 ], "texture": "#side" },
|
|
||||||
"west": { "uv": [ 14, 13, 12, 16 ], "texture": "#side" },
|
|
||||||
"east": { "uv": [ 14, 13, 12, 16 ], "texture": "#side" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/blockCompost"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFertilizer"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFoodBaguette"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFoodBigCookie"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFoodCarrotJuice"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFoodCheese"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFoodChocolate"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFoodChocolateCake"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFoodFishNChips"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFoodFrenchFries"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFoodFrenchFry"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFoodHamburger"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFoodNoodle"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFoodPizza"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFoodPumpkinStew"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFoodSpaghetti"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFoodSubmarineSandwich"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemFoodToast"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemMiscCompressedIron"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemMiscDough"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemMiscMashedFood"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemMiscPaperCone"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemMiscRefinedIron"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemMiscRefinedRedstone"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "builtin/generated",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "someprettyrandomstuff:items/itemMiscSteel"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"thirdperson": {
|
|
||||||
"rotation": [ -90, 0, 0 ],
|
|
||||||
"translation": [ 0, 1, -3 ],
|
|
||||||
"scale": [ 0.55, 0.55, 0.55 ]
|
|
||||||
},
|
|
||||||
"firstperson": {
|
|
||||||
"rotation": [ 0, -135, 25 ],
|
|
||||||
"translation": [ 0, 4, 2 ],
|
|
||||||
"scale": [ 1.7, 1.7, 1.7 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
After Width: | Height: | Size: 324 B |
After Width: | Height: | Size: 422 B |
After Width: | Height: | Size: 622 B |
After Width: | Height: | Size: 352 B |
After Width: | Height: | Size: 431 B |
After Width: | Height: | Size: 432 B |
After Width: | Height: | Size: 424 B |
After Width: | Height: | Size: 608 B |
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 353 B After Width: | Height: | Size: 375 B |
After Width: | Height: | Size: 255 B |
After Width: | Height: | Size: 254 B |
After Width: | Height: | Size: 227 B |
After Width: | Height: | Size: 228 B |
After Width: | Height: | Size: 267 B |
After Width: | Height: | Size: 549 B |
After Width: | Height: | Size: 237 B |
After Width: | Height: | Size: 249 B |
After Width: | Height: | Size: 271 B |
After Width: | Height: | Size: 272 B |
After Width: | Height: | Size: 230 B |
After Width: | Height: | Size: 231 B |
After Width: | Height: | Size: 277 B |
After Width: | Height: | Size: 276 B |
Before Width: | Height: | Size: 222 B |