From 7de922264a9021f71552656c2a306041d00ff402 Mon Sep 17 00:00:00 2001 From: Nedelosk Date: Mon, 24 Oct 2016 20:25:24 +0200 Subject: [PATCH] Adding new Models --- .../binnie/botany/gardening/BlockPlant.java | 97 +++++++++++------- .../binnie/botany/gardening/BlockSoil.java | 21 +++- .../binnie/botany/gardening/Gardening.java | 14 +-- .../binnie/botany/gardening/ItemSoil.java | 8 +- .../binnie/botany/gardening/ItemTrowel.java | 94 +++++++++++------ .../binnie/botany/gardening/ItemWeed.java | 16 ++- .../binnie/core/mod/parser/ItemParser.java | 3 +- .../binnie/core/proxy/BinnieModProxy.java | 6 +- .../java/binnie/core/proxy/IProxyCore.java | 6 ++ .../assets/botany/blockstates/plant.json | 9 ++ .../resources/assets/botany/lang/en_US.lang | 8 ++ .../botany/models/block/dead_flower.json | 6 ++ .../botany/models/block/decayin_flower.json | 6 ++ .../assets/botany/models/block/soil.json | 2 +- .../assets/botany/models/block/weeds.json | 6 ++ .../botany/models/block/weeds_long.json | 6 ++ .../botany/models/block/weeds_very_long.json | 6 ++ .../botany/models/item/dead_flower.json | 6 ++ .../botany/models/item/decaying_flower.json | 6 ++ .../models/item/tools/trowelDiamond.json | 6 ++ .../botany/models/item/tools/trowelGold.json | 6 ++ .../botany/models/item/tools/trowelIron.json | 6 ++ .../botany/models/item/tools/trowelStone.json | 6 ++ .../botany/models/item/tools/trowelWood.json | 6 ++ .../assets/botany/models/item/weeds.json | 6 ++ .../assets/botany/models/item/weeds_long.json | 6 ++ .../botany/models/item/weeds_very_long.json | 6 ++ .../{deadflower.png => dead_flower.png} | Bin ...decayingflower.png => decaying_flower.png} | Bin .../blocks/{weedslong.png => weeds_long.png} | Bin ...{weedsverylong.png => weeds_very_long.png} | Bin .../textures/items/tools/trowelDiamond.png | Bin 0 -> 239 bytes .../textures/items/tools/trowelGold.png | Bin 0 -> 239 bytes .../textures/items/tools/trowelIron.png | Bin 0 -> 238 bytes .../textures/items/tools/trowelStone.png | Bin 0 -> 239 bytes .../textures/items/tools/trowelWood.png | Bin 0 -> 239 bytes 36 files changed, 268 insertions(+), 106 deletions(-) create mode 100644 src/main/resources/assets/botany/blockstates/plant.json create mode 100644 src/main/resources/assets/botany/models/block/dead_flower.json create mode 100644 src/main/resources/assets/botany/models/block/decayin_flower.json create mode 100644 src/main/resources/assets/botany/models/block/weeds.json create mode 100644 src/main/resources/assets/botany/models/block/weeds_long.json create mode 100644 src/main/resources/assets/botany/models/block/weeds_very_long.json create mode 100644 src/main/resources/assets/botany/models/item/dead_flower.json create mode 100644 src/main/resources/assets/botany/models/item/decaying_flower.json create mode 100644 src/main/resources/assets/botany/models/item/tools/trowelDiamond.json create mode 100644 src/main/resources/assets/botany/models/item/tools/trowelGold.json create mode 100644 src/main/resources/assets/botany/models/item/tools/trowelIron.json create mode 100644 src/main/resources/assets/botany/models/item/tools/trowelStone.json create mode 100644 src/main/resources/assets/botany/models/item/tools/trowelWood.json create mode 100644 src/main/resources/assets/botany/models/item/weeds.json create mode 100644 src/main/resources/assets/botany/models/item/weeds_long.json create mode 100644 src/main/resources/assets/botany/models/item/weeds_very_long.json rename src/main/resources/assets/botany/textures/blocks/{deadflower.png => dead_flower.png} (100%) rename src/main/resources/assets/botany/textures/blocks/{decayingflower.png => decaying_flower.png} (100%) rename src/main/resources/assets/botany/textures/blocks/{weedslong.png => weeds_long.png} (100%) rename src/main/resources/assets/botany/textures/blocks/{weedsverylong.png => weeds_very_long.png} (100%) create mode 100644 src/main/resources/assets/botany/textures/items/tools/trowelDiamond.png create mode 100644 src/main/resources/assets/botany/textures/items/tools/trowelGold.png create mode 100644 src/main/resources/assets/botany/textures/items/tools/trowelIron.png create mode 100644 src/main/resources/assets/botany/textures/items/tools/trowelStone.png create mode 100644 src/main/resources/assets/botany/textures/items/tools/trowelWood.png diff --git a/src/main/java/binnie/botany/gardening/BlockPlant.java b/src/main/java/binnie/botany/gardening/BlockPlant.java index bd4ae0a2..431ba5f7 100644 --- a/src/main/java/binnie/botany/gardening/BlockPlant.java +++ b/src/main/java/binnie/botany/gardening/BlockPlant.java @@ -2,9 +2,14 @@ package binnie.botany.gardening; import binnie.botany.Botany; import binnie.botany.CreativeTabBotany; +import binnie.botany.api.EnumSoilType; +import binnie.botany.api.gardening.IBlockSoil; +import forestry.api.core.IItemModelRegister; +import forestry.api.core.IModelManager; import net.minecraft.block.Block; import net.minecraft.block.BlockBush; import net.minecraft.block.properties.PropertyEnum; +import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; @@ -20,23 +25,39 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; -public class BlockPlant extends BlockBush { +public class BlockPlant extends BlockBush implements IItemModelRegister { public static final PropertyEnum PLANT_TYPE = PropertyEnum.create("plant_type", Type.class); -// @Override -// @SideOnly(Side.CLIENT) -// public void registerBlockIcons(final IIconRegister p_149651_1_) { -// for (final Type t : Type.values()) { -// t.icon = Botany.proxy.getIcon(p_149651_1_, t.name().toLowerCase()); -// } -// } - public BlockPlant() { this.setRegistryName("plant"); this.setCreativeTab(CreativeTabBotany.instance); this.setTickRandomly(true); } + @Override + public void registerModel(Item item, IModelManager manager) { + int index = 0; + for (Type type : Type.values()) { + manager.registerItemModel(item, index, type.getName()); + index++; + } + } + + @Override + protected BlockStateContainer createBlockState() { + return new BlockStateContainer(this, PLANT_TYPE); + } + + @Override + public int getMetaFromState(IBlockState state) { + return state.getValue(PLANT_TYPE).ordinal(); + } + + @Override + public IBlockState getStateFromMeta(int meta) { + return getDefaultState().withProperty(PLANT_TYPE, Type.values()[meta]); + } + @Override public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) { return new ArrayList<>(); @@ -46,23 +67,17 @@ public class BlockPlant extends BlockBush { public boolean canPlaceBlockAt(World worldIn, BlockPos pos) { return super.canPlaceBlockAt(worldIn, pos) || Gardening.isSoil(worldIn.getBlockState(pos).getBlock()); } - -// @Override -// @SideOnly(Side.CLIENT) -// public IIcon getIcon(final int side, final int meta) { -// return Type.values()[meta % Type.values().length].icon; -// } - -// @Override -// public int damageDropped(final int p_149692_1_) { -// return p_149692_1_; -// } + + @Override + public int damageDropped(IBlockState state) { + return getMetaFromState(state); + } @Override @SideOnly(Side.CLIENT) - public void getSubBlocks(final Item p_149666_1_, final CreativeTabs p_149666_2_, final List p_149666_3_) { + public void getSubBlocks(final Item p_149666_1_, final CreativeTabs p_149666_2_, final List subBlocks) { for (final Type type : Type.values()) { - p_149666_3_.add(type.get()); + subBlocks.add(type.get()); } } @@ -92,16 +107,16 @@ public class BlockPlant extends BlockBush { } final Block below = world.getBlockState(pos.down()).getBlock(); if (Gardening.isSoil(below)) { -// final IBlockSoil soil = (IBlockSoil) below; -// if (world.rand.nextInt(3) == 0) { -// if (type == Type.Weeds || type == Type.WeedsLong || type == Type.WeedsVeryLong) { -// if (!soil.degrade(world, pos.down(), EnumSoilType.LOAM)) { -// soil.degrade(world, pos.down(), EnumSoilType.SOIL); -// } -// } else if (type == Type.DecayingFlower && !soil.fertilise(world, pos.down(), EnumSoilType.LOAM)) { -// soil.fertilise(world, pos.down(), EnumSoilType.FLOWERBED); -// } -// } + final IBlockSoil soil = (IBlockSoil) below; + if (world.rand.nextInt(3) == 0) { + if (type == Type.Weeds || type == Type.WeedsLong || type == Type.WeedsVeryLong) { + if (!soil.degrade(world, pos.down(), EnumSoilType.LOAM)) { + soil.degrade(world, pos.down(), EnumSoilType.SOIL); + } + } else if (type == Type.DecayingFlower && !soil.fertilise(world, pos.down(), EnumSoilType.LOAM)) { + soil.fertilise(world, pos.down(), EnumSoilType.FLOWERBED); + } + } } } @@ -117,15 +132,19 @@ public class BlockPlant extends BlockBush { final Type type = world.getBlockState(pos).getValue(PLANT_TYPE); return type == Type.Weeds || type == Type.WeedsLong || type == Type.WeedsVeryLong; } + + @Override + public EnumOffsetType getOffsetType() { + return EnumOffsetType.XZ; + } public enum Type implements IStringSerializable { - Weeds("Weeds"), - WeedsLong("Long Weeds"), - WeedsVeryLong("Very Long Weeds"), - DeadFlower("Dead Flower"), - DecayingFlower("Decaying Flower"); + Weeds("weeds"), + WeedsLong("weeds_long"), + WeedsVeryLong("weeds_very_long"), + DeadFlower("dead_flower"), + DecayingFlower("decaying_flower"); - // public IIcon icon; String name; Type(final String name) { @@ -142,7 +161,7 @@ public class BlockPlant extends BlockBush { @Override public String getName() { - return this.name; + return name; } } } diff --git a/src/main/java/binnie/botany/gardening/BlockSoil.java b/src/main/java/binnie/botany/gardening/BlockSoil.java index a2ca2d51..34978b7c 100644 --- a/src/main/java/binnie/botany/gardening/BlockSoil.java +++ b/src/main/java/binnie/botany/gardening/BlockSoil.java @@ -22,6 +22,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.TextFormatting; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.IPlantable; @@ -212,12 +213,24 @@ public class BlockSoil extends Block implements IBlockSoil, IItemModelRegister { } } - public static String getPH(ItemStack stack, boolean withColor) { - return EnumAcidity.values()[stack.getItemDamage() / 3].getTranslated(withColor); + public static String getPH(ItemStack stack, boolean withColor, boolean byNeutralNone) { + EnumAcidity ph = EnumAcidity.values()[stack.getItemDamage() / 3]; + if(byNeutralNone){ + if(ph == EnumAcidity.Neutral){ + return ""; + } + } + return TextFormatting.GRAY + Binnie.Language.localise("botany.ph") + ": " + ph.getTranslated(withColor); } - public static String getMoisture(ItemStack stack, boolean withColor) { - return EnumMoisture.values()[stack.getItemDamage() % 3].getTranslated(withColor); + public static String getMoisture(ItemStack stack, boolean withColor, boolean byNormalNone) { + EnumMoisture moisure = EnumMoisture.values()[stack.getItemDamage() % 3]; + if(byNormalNone){ + if(moisure == EnumMoisture.Normal){ + return ""; + } + } + return TextFormatting.GRAY + Binnie.Language.localise("botany.moisture") + ": " + moisure.getTranslated(withColor); } @Override diff --git a/src/main/java/binnie/botany/gardening/Gardening.java b/src/main/java/binnie/botany/gardening/Gardening.java index 5839616c..1def8aa8 100644 --- a/src/main/java/binnie/botany/gardening/Gardening.java +++ b/src/main/java/binnie/botany/gardening/Gardening.java @@ -27,9 +27,9 @@ import java.util.LinkedHashMap; import java.util.Map; public class Gardening { - public static Map fertiliserAcid; - public static Map fertiliserAlkaline; - public static Map fertiliserNutrient; + public static final Map fertiliserAcid = new LinkedHashMap<>(); + public static final Map fertiliserAlkaline = new LinkedHashMap<>(); + public static final Map fertiliserNutrient = new LinkedHashMap<>(); public static boolean isSoil(final Block block) { return block instanceof IBlockSoil; @@ -90,7 +90,7 @@ public class Gardening { return (float) (-3.0 * (R - 0.5) + 0.5 * (T - 0.699999988079071) * (T - 0.699999988079071) + 0.02f * (H - 64) - 0.15000000596046448); } - public static void createSoil(final World world, final BlockPos pos, final EnumSoilType soil, final EnumMoisture moisture, final EnumAcidity acidity) { + public static void plantSoil(final World world, final BlockPos pos, final EnumSoilType soil, final EnumMoisture moisture, final EnumAcidity acidity) { final int meta = moisture.ordinal() + acidity.ordinal() * 3; world.setBlockState(pos, getSoilBlock(soil).getStateFromMeta(meta), 2); } @@ -254,10 +254,4 @@ public class Gardening { } return done; } - - static { - Gardening.fertiliserAcid = new LinkedHashMap<>(); - Gardening.fertiliserAlkaline = new LinkedHashMap<>(); - Gardening.fertiliserNutrient = new LinkedHashMap<>(); - } } diff --git a/src/main/java/binnie/botany/gardening/ItemSoil.java b/src/main/java/binnie/botany/gardening/ItemSoil.java index 198ed498..60618e74 100644 --- a/src/main/java/binnie/botany/gardening/ItemSoil.java +++ b/src/main/java/binnie/botany/gardening/ItemSoil.java @@ -1,11 +1,7 @@ package binnie.botany.gardening; import binnie.Binnie; -import binnie.botany.api.EnumAcidity; -import binnie.botany.api.EnumMoisture; import binnie.botany.api.EnumSoilType; -import forestry.core.utils.Translator; -import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; @@ -30,11 +26,11 @@ public class ItemSoil extends ItemBlock { @SideOnly(Side.CLIENT) public void addInformation(final ItemStack stack, final EntityPlayer playerIn, final List tooltip, final boolean advanced) { String info = ""; - info+=BlockSoil.getMoisture(stack, true); + info+=BlockSoil.getMoisture(stack, true, true); if (info.length() > 0) { info += ", "; } - info+=BlockSoil.getPH(stack, true); + info+=BlockSoil.getPH(stack, true, true); if (info.length() > 0) { tooltip.add(info); } diff --git a/src/main/java/binnie/botany/gardening/ItemTrowel.java b/src/main/java/binnie/botany/gardening/ItemTrowel.java index f5dc45cd..aeb14bd6 100644 --- a/src/main/java/binnie/botany/gardening/ItemTrowel.java +++ b/src/main/java/binnie/botany/gardening/ItemTrowel.java @@ -1,15 +1,36 @@ package binnie.botany.gardening; +import binnie.Constants; +import binnie.botany.Botany; import binnie.botany.CreativeTabBotany; +import binnie.botany.api.EnumAcidity; +import binnie.botany.api.EnumMoisture; +import binnie.botany.api.EnumSoilType; +import forestry.api.core.IItemModelRegister; +import forestry.api.core.IModelManager; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.ItemMeshDefinition; +import net.minecraft.client.renderer.block.model.ModelBakery; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumActionResult; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -public class ItemTrowel extends Item { - protected Item.ToolMaterial theToolMaterial; - String locName; +public class ItemTrowel extends Item implements IItemModelRegister { + protected final ToolMaterial theToolMaterial; + protected final String locName; - public ItemTrowel(final Item.ToolMaterial p_i45343_1_, final String material) { + public ItemTrowel(ToolMaterial p_i45343_1_, final String material) { this.theToolMaterial = p_i45343_1_; this.maxStackSize = 1; this.setMaxDamage(p_i45343_1_.getMaxUses()); @@ -18,34 +39,35 @@ public class ItemTrowel extends Item { this.locName = "trowel" + material; setRegistryName("trowel" + material); } - -// @Override -// @SideOnly(Side.CLIENT) -// public void registerIcons(final IIconRegister p_94581_1_) { -// this.itemIcon = Botany.proxy.getIcon(p_94581_1_, "tools/" + this.locName); -// } -// -// @Override -// public boolean onItemUse(final ItemStack stack, final EntityPlayer player, final World world, final int x, final int y, final int z, final int p_77648_7_, final float p_77648_8_, final float p_77648_9_, final float p_77648_10_) { -// if (!player.canPlayerEdit(x, y, z, p_77648_7_, stack)) { -// return false; -// } -// final Block block = world.getBlock(x, y, z); -// if (p_77648_7_ == 0 || (!world.getBlock(x, y + 1, z).isAir(world, x, y + 1, z) && world.getBlock(x, y + 1, z) != Botany.flower) || (block != Blocks.grass && block != Blocks.dirt)) { -// return false; -// } -// final Block block2 = Botany.soil; -// world.playSoundEffect(x + 0.5f, y + 0.5f, z + 0.5f, block2.stepSound.getStepResourcePath(), (block2.stepSound.getVolume() + 1.0f) / 2.0f, block2.stepSound.getPitch() * 0.8f); -// if (world.isRemote) { -// return true; -// } -// final EnumMoisture moisture = Gardening.getNaturalMoisture(world, x, y, z); -// final EnumAcidity acidity = Gardening.getNaturalPH(world, x, y, z); -// Gardening.createSoil(world, x, y, z, EnumSoilType.SOIL, moisture, acidity); -// stack.damageItem(1, player); -// return true; -// } - + + @SideOnly(Side.CLIENT) + @Override + public void registerModel(Item item, IModelManager manager) { + manager.registerItemModel(item, new ItemTrowelMeshDefinition()); + ModelBakery.registerItemVariants(item, new ResourceLocation(Constants.BOTANY_MOD_ID + ":tools/"+ locName)); + } + + @Override + public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { + if (!player.canPlayerEdit(pos, facing, stack)) { + return EnumActionResult.FAIL; + } + Block block = world.getBlockState(pos).getBlock(); + if (facing == EnumFacing.DOWN || (!world.isAirBlock(pos.up()) && world.getBlockState(pos.up()).getBlock() != Botany.flower) || (block != Blocks.GRASS && block != Blocks.DIRT)) { + return EnumActionResult.PASS; + } + Block block2 = Botany.soil; + world.playSound(player, hitX + 0.5f, hitY + 0.5f, hitZ + 0.5f, block2.getSoundType().getStepSound(), SoundCategory.NEUTRAL, (block2.getSoundType().getVolume() + 1.0f) / 2.0f, block2.getSoundType().getPitch() * 0.8f); + if (world.isRemote) { + return EnumActionResult.SUCCESS; + } + EnumMoisture moisture = Gardening.getNaturalMoisture(world, pos); + EnumAcidity acidity = Gardening.getNaturalPH(world, pos); + Gardening.plantSoil(world, pos, EnumSoilType.SOIL, moisture, acidity); + stack.damageItem(1, player); + return EnumActionResult.SUCCESS; + } + @Override @SideOnly(Side.CLIENT) public boolean isFull3D() { @@ -55,4 +77,12 @@ public class ItemTrowel extends Item { public String getToolMaterialName() { return this.theToolMaterial.toString(); } + + @SideOnly(Side.CLIENT) + private class ItemTrowelMeshDefinition implements ItemMeshDefinition{ + @Override + public ModelResourceLocation getModelLocation(ItemStack stack) { + return new ModelResourceLocation(Constants.BOTANY_MOD_ID + ":tools/"+ locName, "inventory"); + } + } } diff --git a/src/main/java/binnie/botany/gardening/ItemWeed.java b/src/main/java/binnie/botany/gardening/ItemWeed.java index f3338a46..bb033779 100644 --- a/src/main/java/binnie/botany/gardening/ItemWeed.java +++ b/src/main/java/binnie/botany/gardening/ItemWeed.java @@ -1,29 +1,25 @@ package binnie.botany.gardening; +import binnie.Binnie; import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class ItemWeed extends ItemBlock { - public ItemWeed(final Block p_i45328_1_) { - super(p_i45328_1_); + public ItemWeed(Block block) { + super(block); this.setHasSubtypes(true); this.hasSubtypes = true; } @Override public String getItemStackDisplayName(final ItemStack stack) { - return BlockPlant.Type.values()[stack.getItemDamage()].getName(); + return Binnie.Language.localise("botany.plant." + BlockPlant.Type.values()[stack.getItemDamage()].getName()); } @Override - public int getMetadata(final int p_77647_1_) { - return p_77647_1_; + public int getMetadata(int damage) { + return damage; } -// @Override -// @SideOnly(Side.CLIENT) -// public IIcon getIconFromDamage(final int p_77617_1_) { -// return this.field_150939_a.getIcon(2, p_77617_1_); -// } } diff --git a/src/main/java/binnie/core/mod/parser/ItemParser.java b/src/main/java/binnie/core/mod/parser/ItemParser.java index 12a61761..7f6c7f0c 100644 --- a/src/main/java/binnie/core/mod/parser/ItemParser.java +++ b/src/main/java/binnie/core/mod/parser/ItemParser.java @@ -1,7 +1,6 @@ package binnie.core.mod.parser; import binnie.core.AbstractMod; -import binnie.core.BinnieCore; import net.minecraft.item.Item; import java.lang.reflect.Field; @@ -15,7 +14,7 @@ public class ItemParser extends FieldParser { public void preInit(final Field field, final AbstractMod mod) throws IllegalArgumentException, IllegalAccessException { final Item item = (Item) field.get(null); if (item != null) { - BinnieCore.proxy.registerItem(item); + mod.getProxy().registerItem(item); } } } diff --git a/src/main/java/binnie/core/proxy/BinnieModProxy.java b/src/main/java/binnie/core/proxy/BinnieModProxy.java index 2b6c8f24..9efafa5e 100644 --- a/src/main/java/binnie/core/proxy/BinnieModProxy.java +++ b/src/main/java/binnie/core/proxy/BinnieModProxy.java @@ -20,11 +20,13 @@ public class BinnieModProxy implements IBinnieModProxy { this.mod = mod; } - public Item registerItem(Item item){ + @Override + public Item registerItem(Item item){ return GameRegistry.register(item); } - public Block registerBlock(Block block){ + @Override + public Block registerBlock(Block block){ return GameRegistry.register(block); } diff --git a/src/main/java/binnie/core/proxy/IProxyCore.java b/src/main/java/binnie/core/proxy/IProxyCore.java index 14e188c7..8449e9cd 100644 --- a/src/main/java/binnie/core/proxy/IProxyCore.java +++ b/src/main/java/binnie/core/proxy/IProxyCore.java @@ -1,6 +1,12 @@ package binnie.core.proxy; import binnie.core.IInitializable; +import net.minecraft.block.Block; +import net.minecraft.item.Item; public interface IProxyCore extends IInitializable { + + Item registerItem(Item item); + + Block registerBlock(Block block); } diff --git a/src/main/resources/assets/botany/blockstates/plant.json b/src/main/resources/assets/botany/blockstates/plant.json new file mode 100644 index 00000000..0b990e01 --- /dev/null +++ b/src/main/resources/assets/botany/blockstates/plant.json @@ -0,0 +1,9 @@ +{ + "variants": { + "plant_type=weeds": { "model": "botany:weeds" }, + "plant_type=weeds_long": { "model": "botany:weeds_long" }, + "plant_type=weeds_very_long": { "model": "botany:weeds_very_long" }, + "plant_type=dead_flower": { "model": "botany:dead_flower" }, + "plant_type=decaying_flower": { "model": "botany:decaying_flower" } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/botany/lang/en_US.lang b/src/main/resources/assets/botany/lang/en_US.lang index 649b9356..391ff507 100644 --- a/src/main/resources/assets/botany/lang/en_US.lang +++ b/src/main/resources/assets/botany/lang/en_US.lang @@ -1,9 +1,11 @@ botany.tab.botany=Botany +botany.ph=PH botany.ph.acid=Acidic botany.ph.neutral=Neutral botany.ph.alkaline=Alkaline +botany.moisture=M botany.moisture.dry=Dry botany.moisture.normal=Normal botany.moisture.damp=Damp @@ -14,6 +16,12 @@ botany.soil.soil=Soil botany.soil.loam=Loam botany.soil.flowerbed=Flowerbed +botany.plant.weeds=Weed +botany.plant.weeds_long=Weed Long +botany.plant.weeds_very_long=Weed Very Long +botany.plant.dead_flower=Dead Flower +botany.plant.decaying_flower=Decaying Flower + item.trowelWood.name=Wooden Trowel item.trowelStone.name=Stone Trowel item.trowelIron.name=Iron Trowel diff --git a/src/main/resources/assets/botany/models/block/dead_flower.json b/src/main/resources/assets/botany/models/block/dead_flower.json new file mode 100644 index 00000000..e751454f --- /dev/null +++ b/src/main/resources/assets/botany/models/block/dead_flower.json @@ -0,0 +1,6 @@ +{ + "parent": "block/tinted_cross", + "textures": { + "cross": "botany:blocks/dead_flower" + } +} diff --git a/src/main/resources/assets/botany/models/block/decayin_flower.json b/src/main/resources/assets/botany/models/block/decayin_flower.json new file mode 100644 index 00000000..c296011e --- /dev/null +++ b/src/main/resources/assets/botany/models/block/decayin_flower.json @@ -0,0 +1,6 @@ +{ + "parent": "block/tinted_cross", + "textures": { + "cross": "botany:blocks/decaying_flower" + } +} diff --git a/src/main/resources/assets/botany/models/block/soil.json b/src/main/resources/assets/botany/models/block/soil.json index 4fe5561a..d9f44554 100644 --- a/src/main/resources/assets/botany/models/block/soil.json +++ b/src/main/resources/assets/botany/models/block/soil.json @@ -1,7 +1,7 @@ { "parent": "block/block", "textures":{ "particle": "blocks/dirt", - "down": "blocks/dirt" + "bottom": "blocks/dirt" }, "elements": [ { "from": [ 0, 0, 0 ], diff --git a/src/main/resources/assets/botany/models/block/weeds.json b/src/main/resources/assets/botany/models/block/weeds.json new file mode 100644 index 00000000..24635c75 --- /dev/null +++ b/src/main/resources/assets/botany/models/block/weeds.json @@ -0,0 +1,6 @@ +{ + "parent": "block/tinted_cross", + "textures": { + "cross": "botany:blocks/weeds" + } +} diff --git a/src/main/resources/assets/botany/models/block/weeds_long.json b/src/main/resources/assets/botany/models/block/weeds_long.json new file mode 100644 index 00000000..50e4ed85 --- /dev/null +++ b/src/main/resources/assets/botany/models/block/weeds_long.json @@ -0,0 +1,6 @@ +{ + "parent": "block/tinted_cross", + "textures": { + "cross": "botany:blocks/weeds_long" + } +} diff --git a/src/main/resources/assets/botany/models/block/weeds_very_long.json b/src/main/resources/assets/botany/models/block/weeds_very_long.json new file mode 100644 index 00000000..1e23cee4 --- /dev/null +++ b/src/main/resources/assets/botany/models/block/weeds_very_long.json @@ -0,0 +1,6 @@ +{ + "parent": "block/tinted_cross", + "textures": { + "cross": "botany:blocks/weeds_very_long" + } +} diff --git a/src/main/resources/assets/botany/models/item/dead_flower.json b/src/main/resources/assets/botany/models/item/dead_flower.json new file mode 100644 index 00000000..9cfc98ee --- /dev/null +++ b/src/main/resources/assets/botany/models/item/dead_flower.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "botany:blocks/dead_flower" + } +} diff --git a/src/main/resources/assets/botany/models/item/decaying_flower.json b/src/main/resources/assets/botany/models/item/decaying_flower.json new file mode 100644 index 00000000..0539ea33 --- /dev/null +++ b/src/main/resources/assets/botany/models/item/decaying_flower.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "botany:blocks/decaying_flower" + } +} diff --git a/src/main/resources/assets/botany/models/item/tools/trowelDiamond.json b/src/main/resources/assets/botany/models/item/tools/trowelDiamond.json new file mode 100644 index 00000000..81bc6a6c --- /dev/null +++ b/src/main/resources/assets/botany/models/item/tools/trowelDiamond.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "botany:items/tools/trowelDiamond" + } +} diff --git a/src/main/resources/assets/botany/models/item/tools/trowelGold.json b/src/main/resources/assets/botany/models/item/tools/trowelGold.json new file mode 100644 index 00000000..7b93e879 --- /dev/null +++ b/src/main/resources/assets/botany/models/item/tools/trowelGold.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "botany:items/tools/trowelGold" + } +} diff --git a/src/main/resources/assets/botany/models/item/tools/trowelIron.json b/src/main/resources/assets/botany/models/item/tools/trowelIron.json new file mode 100644 index 00000000..5a7aed05 --- /dev/null +++ b/src/main/resources/assets/botany/models/item/tools/trowelIron.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "botany:items/tools/trowelIron" + } +} diff --git a/src/main/resources/assets/botany/models/item/tools/trowelStone.json b/src/main/resources/assets/botany/models/item/tools/trowelStone.json new file mode 100644 index 00000000..61a0c068 --- /dev/null +++ b/src/main/resources/assets/botany/models/item/tools/trowelStone.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "botany:items/tools/trowelStone" + } +} diff --git a/src/main/resources/assets/botany/models/item/tools/trowelWood.json b/src/main/resources/assets/botany/models/item/tools/trowelWood.json new file mode 100644 index 00000000..e2d254b8 --- /dev/null +++ b/src/main/resources/assets/botany/models/item/tools/trowelWood.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "botany:items/tools/trowelWood" + } +} diff --git a/src/main/resources/assets/botany/models/item/weeds.json b/src/main/resources/assets/botany/models/item/weeds.json new file mode 100644 index 00000000..b3ab219e --- /dev/null +++ b/src/main/resources/assets/botany/models/item/weeds.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "botany:blocks/weeds" + } +} diff --git a/src/main/resources/assets/botany/models/item/weeds_long.json b/src/main/resources/assets/botany/models/item/weeds_long.json new file mode 100644 index 00000000..ad6e4cf9 --- /dev/null +++ b/src/main/resources/assets/botany/models/item/weeds_long.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "botany:blocks/weeds_long" + } +} diff --git a/src/main/resources/assets/botany/models/item/weeds_very_long.json b/src/main/resources/assets/botany/models/item/weeds_very_long.json new file mode 100644 index 00000000..d9d0be61 --- /dev/null +++ b/src/main/resources/assets/botany/models/item/weeds_very_long.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "botany:blocks/weeds_very_long" + } +} diff --git a/src/main/resources/assets/botany/textures/blocks/deadflower.png b/src/main/resources/assets/botany/textures/blocks/dead_flower.png similarity index 100% rename from src/main/resources/assets/botany/textures/blocks/deadflower.png rename to src/main/resources/assets/botany/textures/blocks/dead_flower.png diff --git a/src/main/resources/assets/botany/textures/blocks/decayingflower.png b/src/main/resources/assets/botany/textures/blocks/decaying_flower.png similarity index 100% rename from src/main/resources/assets/botany/textures/blocks/decayingflower.png rename to src/main/resources/assets/botany/textures/blocks/decaying_flower.png diff --git a/src/main/resources/assets/botany/textures/blocks/weedslong.png b/src/main/resources/assets/botany/textures/blocks/weeds_long.png similarity index 100% rename from src/main/resources/assets/botany/textures/blocks/weedslong.png rename to src/main/resources/assets/botany/textures/blocks/weeds_long.png diff --git a/src/main/resources/assets/botany/textures/blocks/weedsverylong.png b/src/main/resources/assets/botany/textures/blocks/weeds_very_long.png similarity index 100% rename from src/main/resources/assets/botany/textures/blocks/weedsverylong.png rename to src/main/resources/assets/botany/textures/blocks/weeds_very_long.png diff --git a/src/main/resources/assets/botany/textures/items/tools/trowelDiamond.png b/src/main/resources/assets/botany/textures/items/tools/trowelDiamond.png new file mode 100644 index 0000000000000000000000000000000000000000..a51ee0c80b3ada5f28785ef68a10c2b88f726280 GIT binary patch literal 239 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL9r6oh?3y^w370~qEv>0#LT=By}Z;C1rt33 z>la@$fhv+bT^vI!{F5aT8_wT*W6$Bd^9b_{x5w9)|6iRy%XOBbLGP{O*BeZmZ@5S| ztdn#JUNTeVw&Q`zK2wa&&VBjnzv+`5Coj)=sLp0#LT=By}Z;C1rt33 z>la@$fhv+bT^vI!{F5aT4_pg-YR}=k^9b{dW8v=){eOS+z4t6dgWhy~mIl-28!plf z>m*%*m&{bT?Rem_&lIDxb6>vtZ~A1%$;)#ds#%ebjG+u<$HHU>{uKbLh*2~7Y^5mNpD literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/botany/textures/items/tools/trowelIron.png b/src/main/resources/assets/botany/textures/items/tools/trowelIron.png new file mode 100644 index 0000000000000000000000000000000000000000..aa137f7b399b612e73e5de07b2a6437b52ed79e4 GIT binary patch literal 238 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL9r6oh?3y^w370~qEv>0#LT=By}Z;C1rt33 z>la@$fhrO`T^vI!{F5aT4;(%E)Skn6=Mm-^ZUPn+9~3g%4w&5AQOLYTlBL6pA=bEK znTIilKrRDE#jMVtWjl>y|L$*-F|V9u{O8GmS&lV}Oq)#NMV@E b$jr>Z_PzX?ww!M-&@u*3S3j3^P60#LT=By}Z;C1rt33 z>la@$fhv+bT^vI!{F5aT4_v!8OP3@^V^UnFgt_! zf@yO`m&xQ5YmSOpok7cX8prh&=!!w eFqe^;nPFL7>XFucD`x<0WAJqKb6Mw<&;$VEyHKS7 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/botany/textures/items/tools/trowelWood.png b/src/main/resources/assets/botany/textures/items/tools/trowelWood.png new file mode 100644 index 0000000000000000000000000000000000000000..fdfb0f79baa0ce0d69427c84e1cb567a94a2851b GIT binary patch literal 239 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL9r6oh?3y^w370~qEv>0#LT=By}Z;C1rt33 z>la@$fhv+bT^vI!{F5aT55xpNu;*~zd4ze!v27t+|KDu