From 666a6d742b3d62aec9ad1624bccf48442420140c Mon Sep 17 00:00:00 2001 From: GirafiStudios Date: Sat, 6 Feb 2016 23:25:26 +0100 Subject: [PATCH] Intial work on BoP Farmland --- .../biomesoplenty/api/block/BOPBlocks.java | 1 + .../common/block/BlockBOPDirt.java | 48 +++-- .../common/block/BlockBOPFarmland.java | 185 ++++++++++++++++++ .../common/block/BlockBOPGrass.java | 3 - .../common/handler/UseHoeEventHandler.java | 60 ++++++ .../biomesoplenty/common/init/ModBlocks.java | 41 +--- .../common/init/ModHandlers.java | 1 + .../biomesoplenty/blockstates/farmland.json | 28 +++ .../blockstates/loamy_farmland.json | 11 ++ .../blockstates/sandy_farmland.json | 11 ++ .../blockstates/silty_farmland.json | 11 ++ .../assets/biomesoplenty/lang/en_US.lang | 3 + .../models/block/loamy_farmland_dry.json | 8 + .../models/block/loamy_farmland_moist.json | 8 + .../models/block/sandy_farmland_dry.json | 8 + .../models/block/sandy_farmland_moist.json | 8 + .../models/block/silty_farmland_dry.json | 8 + .../models/block/silty_farmland_moist.json | 8 + .../textures/blocks/farmland_dry_loamy.png | Bin 0 -> 332 bytes .../textures/blocks/farmland_dry_sandy.png | Bin 0 -> 336 bytes .../textures/blocks/farmland_dry_silty.png | Bin 0 -> 335 bytes .../textures/blocks/farmland_moist_loamy.png | Bin 0 -> 567 bytes .../textures/blocks/farmland_moist_sandy.png | Bin 0 -> 649 bytes .../textures/blocks/farmland_moist_silty.png | Bin 0 -> 617 bytes 24 files changed, 385 insertions(+), 66 deletions(-) create mode 100644 src/main/java/biomesoplenty/common/block/BlockBOPFarmland.java create mode 100644 src/main/java/biomesoplenty/common/handler/UseHoeEventHandler.java create mode 100644 src/main/resources/assets/biomesoplenty/blockstates/farmland.json create mode 100644 src/main/resources/assets/biomesoplenty/blockstates/loamy_farmland.json create mode 100644 src/main/resources/assets/biomesoplenty/blockstates/sandy_farmland.json create mode 100644 src/main/resources/assets/biomesoplenty/blockstates/silty_farmland.json create mode 100644 src/main/resources/assets/biomesoplenty/models/block/loamy_farmland_dry.json create mode 100644 src/main/resources/assets/biomesoplenty/models/block/loamy_farmland_moist.json create mode 100644 src/main/resources/assets/biomesoplenty/models/block/sandy_farmland_dry.json create mode 100644 src/main/resources/assets/biomesoplenty/models/block/sandy_farmland_moist.json create mode 100644 src/main/resources/assets/biomesoplenty/models/block/silty_farmland_dry.json create mode 100644 src/main/resources/assets/biomesoplenty/models/block/silty_farmland_moist.json create mode 100644 src/main/resources/assets/biomesoplenty/textures/blocks/farmland_dry_loamy.png create mode 100644 src/main/resources/assets/biomesoplenty/textures/blocks/farmland_dry_sandy.png create mode 100644 src/main/resources/assets/biomesoplenty/textures/blocks/farmland_dry_silty.png create mode 100644 src/main/resources/assets/biomesoplenty/textures/blocks/farmland_moist_loamy.png create mode 100644 src/main/resources/assets/biomesoplenty/textures/blocks/farmland_moist_sandy.png create mode 100644 src/main/resources/assets/biomesoplenty/textures/blocks/farmland_moist_silty.png diff --git a/src/main/java/biomesoplenty/api/block/BOPBlocks.java b/src/main/java/biomesoplenty/api/block/BOPBlocks.java index 39c1f242f..1d7c00b0c 100644 --- a/src/main/java/biomesoplenty/api/block/BOPBlocks.java +++ b/src/main/java/biomesoplenty/api/block/BOPBlocks.java @@ -112,6 +112,7 @@ public class BOPBlocks public static Block grass; public static Block waterlily; public static Block dirt; + public static Block farmland; public static Block stone_formations; public static Block hard_ice; public static Block dried_sand; diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPDirt.java b/src/main/java/biomesoplenty/common/block/BlockBOPDirt.java index f368ccbe8..ce98a463c 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPDirt.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPDirt.java @@ -1,8 +1,8 @@ /******************************************************************************* * Copyright 2014-2016, the Biomes O' Plenty Team - * + * * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License. - * + * * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. ******************************************************************************/ @@ -34,8 +34,6 @@ import biomesoplenty.common.item.ItemBOPBlock; public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType { - // TODO: make it ploughable into farmland - // add properties public static enum BOPDirtType implements IStringSerializable { @@ -55,7 +53,7 @@ public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType public static final PropertyBool COARSE = PropertyBool.create("coarse"); @Override protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { COARSE, VARIANT });} - + // implement IBOPBlock @Override public Class getItemClass() { return ItemBOPBlock.class; } @@ -71,20 +69,20 @@ public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType return (Boolean.TRUE.equals(state.getValue(COARSE)) ? "coarse_" : "") + ((BOPDirtType) state.getValue(VARIANT)).getName() + "_dirt"; } - + public BlockBOPDirt() { - + super(Material.ground); - + // set some defaults this.setTickRandomly(true); this.setHardness(0.5F); this.setHarvestLevel("shovel", 0); - this.setStepSound(Block.soundTypeGravel); + this.setStepSound(Block.soundTypeGravel); this.setDefaultState( this.blockState.getBaseState().withProperty(COARSE, Boolean.valueOf(false)).withProperty(VARIANT, BOPDirtType.LOAMY) ); - + } - + @Override public IBlockState getStateFromMeta(int meta) { @@ -98,17 +96,17 @@ public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType // both variant and coarseness saved in meta, first bit coarseness, other bits variant return (Boolean.TRUE.equals(state.getValue(COARSE)) ? 8 : 0) | ((BOPDirtType) state.getValue(VARIANT)).ordinal(); } - + // our blocks usually drop their current state as opposed to a single 'default' state @Override public int damageDropped(IBlockState state) { return this.getMetaFromState(state); } - + @Override public boolean canSustainPlantType(IBlockAccess world, BlockPos pos, EnumPlantType plantType) - { + { switch (plantType) { // support desert, plains and cave plants @@ -127,13 +125,13 @@ public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType return false; } } - + @Override public boolean canSustainPlant(IBlockAccess world, BlockPos pos, EnumFacing direction, net.minecraftforge.common.IPlantable plantable) { return this.canSustainPlantType(world, pos, plantable.getPlantType(world, pos.offset(direction))); } - + @Override @SideOnly(Side.CLIENT) public void updateTick(World world, BlockPos pos, IBlockState state, Random rand) { @@ -143,14 +141,14 @@ public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType pullGrassFromNeighbors(world, pos, grassState, rand, 4, 1, 3, 1); } } - + // BOPGrass variants spread randomly to BOPDirt on the grass's updateTick // However, vanilla grass does not. This function fixes this by 'pulling' grass from nearby vanilla grass blocks at the same rate as it would spread to vanilla dirt public void pullGrassFromNeighbors(World world, BlockPos pos, IBlockState grassState, Random rand, int tries, int xzSpread, int downSpread, int upSpread) { // if there's not enough light then there's no chance of this block becoming grassy if (world.getLightFromNeighbors(pos.up()) < 4 || world.getBlockState(pos.up()).getBlock().getLightOpacity(world, pos.up()) > 2) {return;} - + int numNearbyGrassSpreadingBlocks = 0; BlockPos pos1; for (int dy = -downSpread; dy <= upSpread; dy++) @@ -169,7 +167,7 @@ public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType } } if (numNearbyGrassSpreadingBlocks == 0) {return;} - + // each grass block gets 4 tries to spread grass, chance of this block being chosen each time is 1 / volume of blocks close enough // overall chance of spread = 1 - chance of not spreading int vol = (xzSpread * 2 + 1) * (xzSpread * 2 + 1) * (upSpread + downSpread + 1); @@ -179,8 +177,8 @@ public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType world.setBlockState(pos, grassState); } } - - + + // get the blockstate which corresponds to the type of grass which grows on this dirt public static IBlockState getGrassBlockState(IBlockState state) { @@ -190,7 +188,7 @@ public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType return null; } switch ((BOPDirtType) state.getValue(VARIANT)) - { + { case LOAMY: return BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.LOAMY); case SANDY: @@ -202,15 +200,15 @@ public class BlockBOPDirt extends Block implements IBOPBlock, ISustainsPlantType return Blocks.grass.getDefaultState(); } } - + public Block getGrassBlock(IBlockState state) { return getGrassBlockState(state).getBlock(); } - + public int getGrassBlockMeta(IBlockState state) { return this.getGrassBlock(state).getMetaFromState(getGrassBlockState(state)); } - + } diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPFarmland.java b/src/main/java/biomesoplenty/common/block/BlockBOPFarmland.java new file mode 100644 index 000000000..858fbf2db --- /dev/null +++ b/src/main/java/biomesoplenty/common/block/BlockBOPFarmland.java @@ -0,0 +1,185 @@ +package biomesoplenty.common.block; + +import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.api.block.IBOPBlock; +import biomesoplenty.common.item.ItemBOPBlock; +import net.minecraft.block.Block; +import net.minecraft.block.BlockFarmland; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.IProperty; +import net.minecraft.block.properties.PropertyEnum; +import net.minecraft.block.state.BlockState; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.IStringSerializable; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.EnumPlantType; +import net.minecraftforge.common.IPlantable; + +import java.util.ArrayList; +import java.util.Random; + +public class BlockBOPFarmland extends BlockFarmland implements IBOPBlock +{ + public static enum BOPFarmlandType implements IStringSerializable + { + LOAMY, SANDY, SILTY; + @Override + public String getName() + { + return this.name().toLowerCase(); + } + @Override + public String toString() + { + return this.getName(); + } + } + + public static final PropertyEnum VARIANT = PropertyEnum.create("variant", BOPFarmlandType.class); + @Override + protected BlockState createBlockState() {return new BlockState(this, new IProperty[] { MOISTURE, VARIANT });} + + @Override + public Class getItemClass() { return ItemBOPBlock.class; } + + @Override + public int getItemRenderColor(IBlockState state, int tintIndex) { return this.getRenderColor(state); } + + @Override + public IProperty[] getPresetProperties() { return new IProperty[] { VARIANT }; } + + @Override + public IProperty[] getNonRenderingProperties() { return null; } + + @Override + public String getStateName(IBlockState state) { + BOPFarmlandType farmlandType = (BOPFarmlandType)state.getValue(VARIANT); + + return farmlandType + "_farmland"; + } + + public BlockBOPFarmland() + { + super(); + this.setHardness(0.6F); + this.setHarvestLevel("shovel", 0); + this.setStepSound(soundTypeGravel); + this.setDefaultState(this.blockState.getBaseState().withProperty(MOISTURE, Integer.valueOf(0)).withProperty(VARIANT, BOPFarmlandType.LOAMY)); + } + + public IBlockState getStateFromMeta(int meta) + { + return this.getDefaultState().withProperty(MOISTURE, Integer.valueOf(meta & 7)).withProperty(VARIANT, BOPFarmlandType.values()[Math.min(2, meta & 7)]); + } + + public int getMetaFromState(IBlockState state) + { + return ((BOPFarmlandType) state.getValue(VARIANT)).ordinal(); + } + + @Override + public void updateTick(World world, BlockPos pos, IBlockState state, Random random) + { + int i = (state.getValue(MOISTURE)).intValue(); + + if (!this.hasWater(world, pos) && !world.canLightningStrike(pos.up())) + { + if (i > 0) + { + world.setBlockState(pos, state.withProperty(MOISTURE, Integer.valueOf(i - 1)), 2); + } + else if (!this.hasCrops(world, pos)) + { + world.setBlockState(pos, BOPBlocks.dirt.getDefaultState()); + } + } + else if (i < 7) + { + world.setBlockState(pos, state.withProperty(MOISTURE, Integer.valueOf(0)), 2); + } + } + + private boolean hasWater(World world, BlockPos pos) + { + for (BlockPos.MutableBlockPos mutableblockpos : BlockPos.getAllInBoxMutable(pos.add(-4, 0, -4), pos.add(4, 1, 4))) + { + if (world.getBlockState(mutableblockpos).getBlock().getMaterial() == Material.water) + { + return true; + } + } + + return false; + } + + private boolean hasCrops(World world, BlockPos pos) + { + Block block = world.getBlockState(pos.up()).getBlock(); + return block instanceof IPlantable && canSustainPlant(world, pos, EnumFacing.UP, (IPlantable)block); + } + + @Override + public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock) + { + super.onNeighborBlockChange(world, pos, state, neighborBlock); + + if (world.getBlockState(pos.up()).getBlock().getMaterial().isSolid()) + { + world.setBlockState(pos, BOPBlocks.dirt.getDefaultState()); + } + } + + @Override + public void onFallenUpon(World world, BlockPos pos, Entity entity, float fallDistance) + { + if (entity instanceof EntityLivingBase) + { + if (!world.isRemote && world.rand.nextFloat() < fallDistance - 0.5F) + { + if (!(entity instanceof EntityPlayer) && !world.getGameRules().getBoolean("mobGriefing")) + { + return; + } + + world.setBlockState(pos, BOPBlocks.dirt.getDefaultState()); //TODO Check, was setBlock(pos, BOPBlocks.dirt, (world.getBlockMetadata(pos) / 2) * 2, 2); + } + } + } + + @Override + public ArrayList getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) + { + ArrayList ret = new ArrayList(); + ret.add(new ItemStack(BOPBlocks.dirt, 1, (state.getBlock().getMetaFromState(state) / 2) * 2)); //TODO Check + return ret; + } + + @Override + public ItemStack getPickBlock(MovingObjectPosition target, World world, BlockPos pos, EntityPlayer player) + { + return new ItemStack(BOPBlocks.dirt, 1, this.getMetaFromState(world.getBlockState(pos))); + } + + @Override + public boolean canSustainPlant(IBlockAccess world, BlockPos pos, EnumFacing direction, IPlantable plantable) + { + EnumPlantType plantType = plantable.getPlantType(world, pos.up()); + + switch (plantType) + { + case Crop: + return true; + default: + return super.canSustainPlant(world, pos, direction, plantable); + } + } +} \ No newline at end of file diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPGrass.java b/src/main/java/biomesoplenty/common/block/BlockBOPGrass.java index 090e142ae..59c82e317 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPGrass.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPGrass.java @@ -45,9 +45,6 @@ import net.minecraftforge.fml.relauncher.SideOnly; public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPlantType { - - // TODO: make it ploughable into farmland - // add properties (note we also inherit the SNOWY property from BlockGrass) public static enum BOPGrassType implements IStringSerializable { diff --git a/src/main/java/biomesoplenty/common/handler/UseHoeEventHandler.java b/src/main/java/biomesoplenty/common/handler/UseHoeEventHandler.java new file mode 100644 index 000000000..f940ed8ac --- /dev/null +++ b/src/main/java/biomesoplenty/common/handler/UseHoeEventHandler.java @@ -0,0 +1,60 @@ +package biomesoplenty.common.handler; + +import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.common.block.BlockBOPDirt; +import biomesoplenty.common.block.BlockBOPGrass; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; +import net.minecraft.util.BlockPos; +import net.minecraftforge.event.entity.player.UseHoeEvent; +import net.minecraftforge.fml.common.eventhandler.Event; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +public class UseHoeEventHandler { + + @SubscribeEvent + public void useHoe(UseHoeEvent event) + { + if (event.getResult() != Event.Result.DEFAULT || event.isCanceled()) + { + return; + } + + BlockPos pos = event.pos; + IBlockState state = event.world.getBlockState(pos); + Block block = state.getBlock(); + boolean result = false; + + if (block instanceof BlockBOPDirt || block instanceof BlockBOPGrass) + { + result = true; + if (!(block instanceof BlockBOPGrass)) + { + if ((state.getBlock().getMetaFromState(state) & 1) == 1) + { + event.world.setBlockState(pos, state.getBlock().getStateFromMeta(state.getBlock().getMetaFromState(state) - 1), 2); + } + else + { + event.world.setBlockState(pos, BOPBlocks.farmland.getDefaultState(), 2); + } + } + else + { + + event.world.setBlockState(pos, Blocks.farmland.getDefaultState()); + } + } + + if (result) + { + if (!event.entityPlayer.capabilities.isCreativeMode) + { + event.current.damageItem(1, event.entityLiving); + } + event.world.playSoundEffect((double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), block.stepSound.getStepSound(), (state.getBlock().stepSound.getVolume() + 1.0F) / 2.0F, state.getBlock().stepSound.getFrequency() * 0.8F); + event.entityPlayer.swingItem(); + } + } +} diff --git a/src/main/java/biomesoplenty/common/init/ModBlocks.java b/src/main/java/biomesoplenty/common/init/ModBlocks.java index dc34c7bcb..c0f896791 100644 --- a/src/main/java/biomesoplenty/common/init/ModBlocks.java +++ b/src/main/java/biomesoplenty/common/init/ModBlocks.java @@ -13,6 +13,8 @@ import static biomesoplenty.api.item.BOPItems.blood_bucket; import static biomesoplenty.api.item.BOPItems.honey_bucket; import static biomesoplenty.api.item.BOPItems.poison_bucket; import static biomesoplenty.api.item.BOPItems.hot_spring_water_bucket; + +import biomesoplenty.common.block.*; import net.minecraft.block.Block; import net.minecraft.block.BlockSlab; import net.minecraft.block.BlockStairs; @@ -32,44 +34,6 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fml.common.registry.GameRegistry; import biomesoplenty.api.block.IBOPBlock; import biomesoplenty.api.item.BOPItems; -import biomesoplenty.common.block.BlockBOPAsh; -import biomesoplenty.common.block.BlockBOPBamboo; -import biomesoplenty.common.block.BlockBOPBiomeBlock; -import biomesoplenty.common.block.BlockBOPBones; -import biomesoplenty.common.block.BlockBOPCoral; -import biomesoplenty.common.block.BlockBOPCrystal; -import biomesoplenty.common.block.BlockBOPDirt; -import biomesoplenty.common.block.BlockBOPDoor; -import biomesoplenty.common.block.BlockBOPDoubleOtherSlab; -import biomesoplenty.common.block.BlockBOPDoublePlant; -import biomesoplenty.common.block.BlockBOPDoubleWoodSlab; -import biomesoplenty.common.block.BlockBOPFence; -import biomesoplenty.common.block.BlockBOPFenceGate; -import biomesoplenty.common.block.BlockBOPFlesh; -import biomesoplenty.common.block.BlockBOPFlower; -import biomesoplenty.common.block.BlockBOPGem; -import biomesoplenty.common.block.BlockBOPGemOre; -import biomesoplenty.common.block.BlockBOPGeneric; -import biomesoplenty.common.block.BlockBOPGrass; -import biomesoplenty.common.block.BlockBOPHalfOtherSlab; -import biomesoplenty.common.block.BlockBOPHalfWoodSlab; -import biomesoplenty.common.block.BlockBOPHive; -import biomesoplenty.common.block.BlockBOPHoney; -import biomesoplenty.common.block.BlockBOPLeaves; -import biomesoplenty.common.block.BlockBOPLilypad; -import biomesoplenty.common.block.BlockBOPLog; -import biomesoplenty.common.block.BlockBOPMud; -import biomesoplenty.common.block.BlockBOPMushroom; -import biomesoplenty.common.block.BlockBOPPlanks; -import biomesoplenty.common.block.BlockBOPPlant; -import biomesoplenty.common.block.BlockBOPSand; -import biomesoplenty.common.block.BlockBOPSapling; -import biomesoplenty.common.block.BlockBOPSeaweed; -import biomesoplenty.common.block.BlockBOPStone; -import biomesoplenty.common.block.BlockBOPTerrarium; -import biomesoplenty.common.block.BlockBOPTurnip; -import biomesoplenty.common.block.BlockBOPVine; -import biomesoplenty.common.block.BlockBOPWoodStairs; import biomesoplenty.common.command.BOPCommand; import biomesoplenty.common.enums.BOPWoods; import biomesoplenty.common.fluids.BloodFluid; @@ -115,6 +79,7 @@ public class ModBlocks grass = registerBlock( new BlockBOPGrass(), "grass" ); waterlily = registerBlock( new BlockBOPLilypad(), "waterlily" ); dirt = registerBlock( new BlockBOPDirt(), "dirt" ); + farmland = registerBlock( new BlockBOPFarmland(), "farmland" ); crystal = registerBlock( new BlockBOPCrystal(), "crystal" ); biome_block = registerBlock( new BlockBOPBiomeBlock(), "biome_block" ); diff --git a/src/main/java/biomesoplenty/common/init/ModHandlers.java b/src/main/java/biomesoplenty/common/init/ModHandlers.java index c49628c42..3e50d3180 100644 --- a/src/main/java/biomesoplenty/common/init/ModHandlers.java +++ b/src/main/java/biomesoplenty/common/init/ModHandlers.java @@ -34,6 +34,7 @@ public class ModHandlers MinecraftForge.EVENT_BUS.register(new PotionParalysisEventHandler()); MinecraftForge.EVENT_BUS.register(new PotionPossessionEventHandler()); MinecraftForge.EVENT_BUS.register(new ItemEventHandler()); + MinecraftForge.EVENT_BUS.register(new UseHoeEventHandler()); FMLCommonHandler.instance().bus().register(new AchievementEventHandler()); if (FMLCommonHandler.instance().getSide() == Side.CLIENT) diff --git a/src/main/resources/assets/biomesoplenty/blockstates/farmland.json b/src/main/resources/assets/biomesoplenty/blockstates/farmland.json new file mode 100644 index 000000000..6402da0e3 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/blockstates/farmland.json @@ -0,0 +1,28 @@ +{ + "variants": { + "moisture=0,variant=loamy": { "model": "biomesoplenty:loamy_farmland_dry" }, + "moisture=1,variant=loamy": { "model": "biomesoplenty:loamy_farmland_dry" }, + "moisture=2,variant=loamy": { "model": "biomesoplenty:loamy_farmland_dry" }, + "moisture=3,variant=loamy": { "model": "biomesoplenty:loamy_farmland_dry" }, + "moisture=4,variant=loamy": { "model": "biomesoplenty:loamy_farmland_dry" }, + "moisture=5,variant=loamy": { "model": "biomesoplenty:loamy_farmland_dry" }, + "moisture=6,variant=loamy": { "model": "biomesoplenty:loamy_farmland_dry" }, + "moisture=7,variant=loamy": { "model": "biomesoplenty:loamy_farmland_moist" }, + "moisture=0,variant=sandy": { "model": "biomesoplenty:sandy_farmland_dry" }, + "moisture=1,variant=sandy": { "model": "biomesoplenty:sandy_farmland_dry" }, + "moisture=2,variant=sandy": { "model": "biomesoplenty:sandy_farmland_dry" }, + "moisture=3,variant=sandy": { "model": "biomesoplenty:sandy_farmland_dry" }, + "moisture=4,variant=sandy": { "model": "biomesoplenty:sandy_farmland_dry" }, + "moisture=5,variant=sandy": { "model": "biomesoplenty:sandy_farmland_dry" }, + "moisture=6,variant=sandy": { "model": "biomesoplenty:sandy_farmland_dry" }, + "moisture=7,variant=sandy": { "model": "biomesoplenty:sandy_farmland_moist" }, + "moisture=0,variant=silty": { "model": "biomesoplenty:silty_farmland_dry" }, + "moisture=1,variant=silty": { "model": "biomesoplenty:silty_farmland_dry" }, + "moisture=2,variant=silty": { "model": "biomesoplenty:silty_farmland_dry" }, + "moisture=3,variant=silty": { "model": "biomesoplenty:silty_farmland_dry" }, + "moisture=4,variant=silty": { "model": "biomesoplenty:silty_farmland_dry" }, + "moisture=5,variant=silty": { "model": "biomesoplenty:silty_farmland_dry" }, + "moisture=6,variant=silty": { "model": "biomesoplenty:silty_farmland_dry" }, + "moisture=7,variant=silty": { "model": "biomesoplenty:silty_farmland_moist" } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/blockstates/loamy_farmland.json b/src/main/resources/assets/biomesoplenty/blockstates/loamy_farmland.json new file mode 100644 index 000000000..e528e6ad1 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/blockstates/loamy_farmland.json @@ -0,0 +1,11 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "biomesoplenty:loamy_farmland_dry" + }, + "variants": { + "inventory": [{ + "transform": "forge:default-block" + }] + } +} diff --git a/src/main/resources/assets/biomesoplenty/blockstates/sandy_farmland.json b/src/main/resources/assets/biomesoplenty/blockstates/sandy_farmland.json new file mode 100644 index 000000000..7a54cf92b --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/blockstates/sandy_farmland.json @@ -0,0 +1,11 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "biomesoplenty:sandy_farmland_dry" + }, + "variants": { + "inventory": [{ + "transform": "forge:default-block" + }] + } +} diff --git a/src/main/resources/assets/biomesoplenty/blockstates/silty_farmland.json b/src/main/resources/assets/biomesoplenty/blockstates/silty_farmland.json new file mode 100644 index 000000000..6de03a07b --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/blockstates/silty_farmland.json @@ -0,0 +1,11 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "biomesoplenty:silty_farmland_dry" + }, + "variants": { + "inventory": [{ + "transform": "forge:default-block" + }] + } +} diff --git a/src/main/resources/assets/biomesoplenty/lang/en_US.lang b/src/main/resources/assets/biomesoplenty/lang/en_US.lang index f0e33131c..00079ae9b 100644 --- a/src/main/resources/assets/biomesoplenty/lang/en_US.lang +++ b/src/main/resources/assets/biomesoplenty/lang/en_US.lang @@ -206,6 +206,9 @@ tile.ethereal_fence.name=Ethereal Fence tile.ethereal_fence_gate.name=Ethereal Fence Gate tile.ethereal_wood_slab.name=Ethereal Wood Slab tile.ethereal_stairs.name=Ethereal Wood Stairs +tile.farmland.loamy_farmland.name=Loamy Farmland +tile.farmland.sandy_farmland.name=Sandy Farmland +tile.farmland.silty_farmland.name=Silty Farmland tile.fir_fence.name=Fir Fence tile.fir_fence_gate.name=Fir Fence Gate tile.fir_wood_slab.name=Fir Wood Slab diff --git a/src/main/resources/assets/biomesoplenty/models/block/loamy_farmland_dry.json b/src/main/resources/assets/biomesoplenty/models/block/loamy_farmland_dry.json new file mode 100644 index 000000000..3772b0dbe --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/block/loamy_farmland_dry.json @@ -0,0 +1,8 @@ +{ + "parent": "block/farmland", + "textures": { + "particle": "biomesoplenty:blocks/dirt_loamy", + "dirt": "biomesoplenty:blocks/dirt_loamy", + "top": "biomesoplenty:blocks/farmland_dry_loamy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/block/loamy_farmland_moist.json b/src/main/resources/assets/biomesoplenty/models/block/loamy_farmland_moist.json new file mode 100644 index 000000000..3765f4580 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/block/loamy_farmland_moist.json @@ -0,0 +1,8 @@ +{ + "parent": "block/farmland", + "textures": { + "particle": "biomesoplenty:blocks/dirt_loamy", + "dirt": "biomesoplenty:blocks/dirt_loamy", + "top": "biomesoplenty:blocks/farmland_moist_loamy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/block/sandy_farmland_dry.json b/src/main/resources/assets/biomesoplenty/models/block/sandy_farmland_dry.json new file mode 100644 index 000000000..afc2d8245 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/block/sandy_farmland_dry.json @@ -0,0 +1,8 @@ +{ + "parent": "block/farmland", + "textures": { + "particle": "biomesoplenty:blocks/dirt_sandy", + "dirt": "biomesoplenty:blocks/dirt_sandy", + "top": "biomesoplenty:blocks/farmland_dry_sandy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/block/sandy_farmland_moist.json b/src/main/resources/assets/biomesoplenty/models/block/sandy_farmland_moist.json new file mode 100644 index 000000000..2cd32aac3 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/block/sandy_farmland_moist.json @@ -0,0 +1,8 @@ +{ + "parent": "block/farmland", + "textures": { + "particle": "biomesoplenty:blocks/dirt_sandy", + "dirt": "biomesoplenty:blocks/dirt_sandy", + "top": "biomesoplenty:blocks/farmland_moist_sandy" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/block/silty_farmland_dry.json b/src/main/resources/assets/biomesoplenty/models/block/silty_farmland_dry.json new file mode 100644 index 000000000..276fb4b25 --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/block/silty_farmland_dry.json @@ -0,0 +1,8 @@ +{ + "parent": "block/farmland", + "textures": { + "particle": "biomesoplenty:blocks/dirt_silty", + "dirt": "biomesoplenty:blocks/dirt_silty", + "top": "biomesoplenty:blocks/farmland_dry_silty" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/models/block/silty_farmland_moist.json b/src/main/resources/assets/biomesoplenty/models/block/silty_farmland_moist.json new file mode 100644 index 000000000..d43c6e4db --- /dev/null +++ b/src/main/resources/assets/biomesoplenty/models/block/silty_farmland_moist.json @@ -0,0 +1,8 @@ +{ + "parent": "block/farmland", + "textures": { + "particle": "biomesoplenty:blocks/dirt_silty", + "dirt": "biomesoplenty:blocks/dirt_silty", + "top": "biomesoplenty:blocks/farmland_moist_silty" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/textures/blocks/farmland_dry_loamy.png b/src/main/resources/assets/biomesoplenty/textures/blocks/farmland_dry_loamy.png new file mode 100644 index 0000000000000000000000000000000000000000..f49a8ce1dc04daa8f1749ba95465b97e3710e10a GIT binary patch literal 332 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DjSK$uZf!>a)(C{f}XQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QBXWa8_dH_((DNh&2 z5DWj%e~Zowikl0+0H+9FkhFVdQ&MBb@0Gbnbxc~qF literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/biomesoplenty/textures/blocks/farmland_dry_sandy.png b/src/main/resources/assets/biomesoplenty/textures/blocks/farmland_dry_sandy.png new file mode 100644 index 0000000000000000000000000000000000000000..e615a784a0e2dfd8ea37aa5d5c24807960d1e5cc GIT binary patch literal 336 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DjSK$uZf!>a)(C{f}XQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QBXWa8_dH_((IZqeI z5DWj;7am^>Urx$F^&WNy(H-C#kqYzh`8uIr~!O_^jynznolt*S>%M zyjAbZo->m-)aNnnwRG52HQy>>rM$UE2vgf+A4M}?o@=F3ZKW2tuaUO-&U|-DpUx@= zA1Ahpd)@7rZ05Y(_1J(@o#9GCXoB#j- literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/biomesoplenty/textures/blocks/farmland_dry_silty.png b/src/main/resources/assets/biomesoplenty/textures/blocks/farmland_dry_silty.png new file mode 100644 index 0000000000000000000000000000000000000000..7982ebddd4b83b038e543b954ac284dcf00ca0c1 GIT binary patch literal 335 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DjSK$uZf!>a)(C{f}XQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`QBXWa8_dH_((Sx*$^m<{lwTZIgWz&3t*P-fwbe{?bv}{Je0%>`N0}MLRrC zDD3)vqPn4db8NYc+C!FxUl#*;6;563XE>i}z{V2k%xV-+I&;A~_K!c-81B@`Y1_9> zJAiSi!Gr5E%q4wauLoG=ZWRe!W4pkm{@(goa~NATvo3fw^^Vl!nZXQ8nL^I>r6!~# c%v^4NzsQN2bZe?^J zG%heMGmPe!Pyhe{wMj%lR5(vflIwDUFc5|Fzm}^+AP@o(MJ&`>d%sOPeg9|bm*Oza z#Btd@XZP$y{EqEjufB)%*NyE8*(v$HtKYhMtCAw}u<;zNBH9=7XKcldPIVmI+v3=$ zL!EQvTsrp2EBIl3^bJ`FgUds2&?yh&c~jxp7Acl$ulh5eWy4;nLmj(-LW6Z=ULhrq=#SVQc zLG=0`-K?V2UmR*xC83ca?LwmtQ7{M*R3Xd(WojdhQ8i78+}Mm5r;82)$nzesUOO{SmM)p*w2G%zGgG2qSh46!_Xp>4 z(}18Ml1CP{MwDydqTDS}1OePqt5T#BMlKIB=fqCQUB*7*L5io1=32Qw*o@f4A|Kjx zu-G&@U*2P@#mlyWQ^f(_Bp?mDhsk`vVUq|y%DHWmgnxS&U-l!j1vCHv002ovPDHLk FV1gWV{9XV6 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/biomesoplenty/textures/blocks/farmland_moist_sandy.png b/src/main/resources/assets/biomesoplenty/textures/blocks/farmland_moist_sandy.png new file mode 100644 index 0000000000000000000000000000000000000000..260311eb10647b96efa9e7e9440bd24b67d7d904 GIT binary patch literal 649 zcmV;40(Sk0P)N2bZe?^J zG%heMGmPe!Pyhe|2T4RhR5(vfl8bBFU=+pkAIut?HP&d_`W)Cc*oWEbr$)51Ce`#| zi7Q%kt8;8n*1gz+!3Kr>*ZX}$LLr39{mwb}-gB?=?`>(+S^qOD{GR47n)-QD|31!r zyUzMT7u#`SGV?)(*DFVVm=~2-opr}j7lX`gKQnU;U#uOKu5E1 zRdkiVvjWl2Ngh?6y`!i0vz6=P6d%FI;TD+z93eRiKcl=mGl?iIgcx^IJzG1mwfE;6 zK|6I=S{bz^GvtVE_17e?&k!D(?UI1U_#F{C2O5N%6CNIJCnVn2J0EFt1P3OP9WmviIQ_w#Jm9OK1~gG5zrBc^=5+9@yoVQ8wBG zQ{ra0io4+^p7IK&v8yUUJISWuJl-@Qm^ee9w9eLeN2bZe?^J zG%heMGmPe!Pyhe{=Sf6CR5(vfl6z0$P!PrM=UClHEgm-Q#xwR!YITf#>Wbet6Rh{EgsOz2 zo@UqfevMi@j8)#p6HA?jV3tQxTphbuv<|~?mN>&sZP2M*pZL?EZB~E67G!~OG=;hX zGO#=ww@;IHk-a=}(|&_zRCcjF&nqx6e7hWp^`O4_bRLG?I@y6!)yumKBki)=tSmBV zR@Qxpk^>Pz7s5*@|6T0sv0IegauM=QbSJ75+&Fs|?aNL&K| ze%NjRXpG)lfZwVD;JfXB2S1A8M5})QP1(+n4H{mvLLRk?8JG$`0CMJOccaqtJi0#{ z(1aLM7AjF28;RjVG|zJ~H+x{0PZ$69z?7(2tm5u8KvSaRbPPpIhYdCj=KH2e0trbT z)Y%$Q