From 53d29b737095b95fc08710653bdc59e547a0f83c Mon Sep 17 00:00:00 2001 From: bruberu <80226372+bruberu@users.noreply.github.com> Date: Fri, 20 Oct 2023 06:38:38 -0500 Subject: [PATCH] Berries (#60) * Preliminary berry items and texture files * Berry medley recipes & berry item textures * 1.9.4.1; fixes #55 * Some more work on berry crops * Fix up efficiency calculation and placement rules * 10 minutes of copy-pasting * Refactor world generation a lot for trees and berries * Blueberry spawning * Full berry bush model and main texture :lets: * Set temperature/rainfall for berries * Texture time! * Configuration * Thorns + more lang * AgriCraft + EIO integration + berry metas --- .../java/gregtechfoodoption/CommonProxy.java | 11 +- .../java/gregtechfoodoption/GTFOConfig.java | 15 +- .../gregtechfoodoption/GTFOEventHandler.java | 20 ++ .../GTFOMaterialHandler.java | 24 ++- .../block/GTFOBerryBush.java | 189 ++++++++++++++++++ .../gregtechfoodoption/block/GTFOCrop.java | 8 +- .../gregtechfoodoption/block/GTFOCrops.java | 12 ++ .../block/GTFOMetaBlocks.java | 4 + .../block/tree/GTFOBlockLeaves.java | 4 +- .../block/tree/GTFOBlockLog.java | 2 +- .../block/tree/GTFOBlockPlanks.java | 2 +- .../block/tree/GTFOBlockSapling.java | 2 +- .../integration/agricraft/GTFOAgriPlant.java | 16 +- .../integration/enderio/GTFOBerryFarmer.java | 76 +++++++ .../item/GTFOBerrySeedBehaviour.java | 70 +++++++ .../item/GTFOCropSeedBehaviour.java | 2 +- .../gregtechfoodoption/item/GTFOMetaItem.java | 59 +++++- .../machines/farmer/FarmerModeRegistry.java | 3 +- .../machines/farmer/GTFOBerryFarmerMode.java | 26 +++ .../recipe/GTFORecipeAddition.java | 3 +- .../recipe/chain/BerryChain.java | 95 +++++++++ .../recipe/chain/CoreChain.java | 11 +- .../recipe/chain/SeedsChain.java | 2 +- .../worldgen/GTFOFeature.java | 66 ++++++ .../worldgen/GTFOFeatureGen.java | 88 ++++++++ .../worldgen/GTFOWorldGenerator.java | 10 +- .../worldgen/berries/GTFOBerries.java | 32 +++ .../worldgen/berries/GTFOBerry.java | 59 ++++++ .../worldgen/berries/GTFOBerryGen.java | 26 +++ .../{trees => }/condition/BiomeCondition.java | 4 +- .../FeatureCondition.java} | 8 +- .../TemperatureRainfallCondition.java | 4 +- .../worldgen/trees/ApricotTree.java | 7 +- .../worldgen/trees/BananaTree.java | 7 +- .../{block => worldgen/trees}/GTFOTree.java | 58 ++---- .../worldgen/trees/GTFOTreeGen.java | 80 +------- .../{block => worldgen/trees}/GTFOTrees.java | 2 +- .../worldgen/trees/LemonTree.java | 7 +- .../worldgen/trees/LimeTree.java | 7 +- .../worldgen/trees/MangoTree.java | 7 +- .../worldgen/trees/NutmegTree.java | 7 +- .../worldgen/trees/OliveTree.java | 7 +- .../worldgen/trees/OrangeTree.java | 7 +- .../worldgen/trees/RainbowwoodTree.java | 7 +- .../metaitems/food/berry/black_currant.json | 6 + .../item/metaitems/food/berry/blackberry.json | 6 + .../item/metaitems/food/berry/blueberry.json | 6 + .../item/metaitems/food/berry/cranberry.json | 6 + .../item/metaitems/food/berry/elderberry.json | 6 + .../metaitems/food/berry/lingonberry.json | 6 + .../item/metaitems/food/berry/raspberry.json | 6 + .../metaitems/food/berry/red_currant.json | 6 + .../item/metaitems/food/berry/strawberry.json | 6 + .../metaitems/food/berry/white_currant.json | 6 + .../item/metaitems/food/berry_medley.json | 6 + .../item/metaitems/food/etirps_cranberry.json | 6 + .../metaitems/food/berry/black_currant.png | Bin 0 -> 488 bytes .../items/metaitems/food/berry/blackberry.png | Bin 0 -> 439 bytes .../items/metaitems/food/berry/blueberry.png | Bin 0 -> 457 bytes .../items/metaitems/food/berry/cranberry.png | Bin 0 -> 245 bytes .../items/metaitems/food/berry/elderberry.png | Bin 0 -> 393 bytes .../metaitems/food/berry/lingonberry.png | Bin 0 -> 242 bytes .../items/metaitems/food/berry/raspberry.png | Bin 0 -> 482 bytes .../metaitems/food/berry/red_currant.png | Bin 0 -> 455 bytes .../items/metaitems/food/berry/strawberry.png | Bin 0 -> 401 bytes .../metaitems/food/berry/white_currant.png | Bin 0 -> 489 bytes .../items/metaitems/food/berry_medley.png | Bin 0 -> 315 bytes .../items/metaitems/food/etirps_cranberry.png | Bin 0 -> 575 bytes .../blockstates/crop_black_currant.json | 34 ++++ .../blockstates/crop_blackberry.json | 34 ++++ .../blockstates/crop_blueberry.json | 34 ++++ .../blockstates/crop_cranberry.json | 34 ++++ .../blockstates/crop_elderberry.json | 34 ++++ .../blockstates/crop_lingonberry.json | 34 ++++ .../blockstates/crop_raspberry.json | 34 ++++ .../blockstates/crop_red_currant.json | 34 ++++ .../blockstates/crop_strawberry.json | 34 ++++ .../blockstates/crop_white_currant.json | 34 ++++ .../assets/gregtechfoodoption/lang/en_us.lang | 34 +++- .../models/block/large_berry_bush.json | 62 ++++++ .../models/block/small_berry_bush.json | 62 ++++++ .../blocks/berry/black_currant_ripe.png | Bin 0 -> 4710 bytes .../textures/blocks/berry/blackberry_ripe.png | Bin 0 -> 4695 bytes .../textures/blocks/berry/blueberry_ripe.png | Bin 0 -> 4714 bytes .../textures/blocks/berry/bush_block.png | Bin 0 -> 670 bytes .../textures/blocks/berry/cranberry_ripe.png | Bin 0 -> 4731 bytes .../textures/blocks/berry/elderberry_ripe.png | Bin 0 -> 4733 bytes .../blocks/berry/lingonberry_ripe.png | Bin 0 -> 4732 bytes .../textures/blocks/berry/raspberry_ripe.png | Bin 0 -> 4705 bytes .../blocks/berry/red_currant_ripe.png | Bin 0 -> 4741 bytes .../textures/blocks/berry/strawberry_ripe.png | Bin 0 -> 4716 bytes .../textures/blocks/berry/ungrown.png | Bin 0 -> 592 bytes .../blocks/berry/white_currant_ripe.png | Bin 0 -> 4742 bytes 93 files changed, 1529 insertions(+), 197 deletions(-) create mode 100644 src/main/java/gregtechfoodoption/block/GTFOBerryBush.java create mode 100644 src/main/java/gregtechfoodoption/integration/enderio/GTFOBerryFarmer.java create mode 100644 src/main/java/gregtechfoodoption/item/GTFOBerrySeedBehaviour.java create mode 100644 src/main/java/gregtechfoodoption/machines/farmer/GTFOBerryFarmerMode.java create mode 100644 src/main/java/gregtechfoodoption/recipe/chain/BerryChain.java create mode 100644 src/main/java/gregtechfoodoption/worldgen/GTFOFeature.java create mode 100644 src/main/java/gregtechfoodoption/worldgen/GTFOFeatureGen.java create mode 100644 src/main/java/gregtechfoodoption/worldgen/berries/GTFOBerries.java create mode 100644 src/main/java/gregtechfoodoption/worldgen/berries/GTFOBerry.java create mode 100644 src/main/java/gregtechfoodoption/worldgen/berries/GTFOBerryGen.java rename src/main/java/gregtechfoodoption/worldgen/{trees => }/condition/BiomeCondition.java (86%) rename src/main/java/gregtechfoodoption/worldgen/{trees/condition/TreeCondition.java => condition/FeatureCondition.java} (70%) rename src/main/java/gregtechfoodoption/worldgen/{trees => }/condition/TemperatureRainfallCondition.java (88%) rename src/main/java/gregtechfoodoption/{block => worldgen/trees}/GTFOTree.java (86%) rename src/main/java/gregtechfoodoption/{block => worldgen/trees}/GTFOTrees.java (95%) create mode 100644 src/main/resources/assets/gregtech/models/item/metaitems/food/berry/black_currant.json create mode 100644 src/main/resources/assets/gregtech/models/item/metaitems/food/berry/blackberry.json create mode 100644 src/main/resources/assets/gregtech/models/item/metaitems/food/berry/blueberry.json create mode 100644 src/main/resources/assets/gregtech/models/item/metaitems/food/berry/cranberry.json create mode 100644 src/main/resources/assets/gregtech/models/item/metaitems/food/berry/elderberry.json create mode 100644 src/main/resources/assets/gregtech/models/item/metaitems/food/berry/lingonberry.json create mode 100644 src/main/resources/assets/gregtech/models/item/metaitems/food/berry/raspberry.json create mode 100644 src/main/resources/assets/gregtech/models/item/metaitems/food/berry/red_currant.json create mode 100644 src/main/resources/assets/gregtech/models/item/metaitems/food/berry/strawberry.json create mode 100644 src/main/resources/assets/gregtech/models/item/metaitems/food/berry/white_currant.json create mode 100644 src/main/resources/assets/gregtech/models/item/metaitems/food/berry_medley.json create mode 100644 src/main/resources/assets/gregtech/models/item/metaitems/food/etirps_cranberry.json create mode 100644 src/main/resources/assets/gregtech/textures/items/metaitems/food/berry/black_currant.png create mode 100644 src/main/resources/assets/gregtech/textures/items/metaitems/food/berry/blackberry.png create mode 100644 src/main/resources/assets/gregtech/textures/items/metaitems/food/berry/blueberry.png create mode 100644 src/main/resources/assets/gregtech/textures/items/metaitems/food/berry/cranberry.png create mode 100644 src/main/resources/assets/gregtech/textures/items/metaitems/food/berry/elderberry.png create mode 100644 src/main/resources/assets/gregtech/textures/items/metaitems/food/berry/lingonberry.png create mode 100644 src/main/resources/assets/gregtech/textures/items/metaitems/food/berry/raspberry.png create mode 100644 src/main/resources/assets/gregtech/textures/items/metaitems/food/berry/red_currant.png create mode 100644 src/main/resources/assets/gregtech/textures/items/metaitems/food/berry/strawberry.png create mode 100644 src/main/resources/assets/gregtech/textures/items/metaitems/food/berry/white_currant.png create mode 100644 src/main/resources/assets/gregtech/textures/items/metaitems/food/berry_medley.png create mode 100644 src/main/resources/assets/gregtech/textures/items/metaitems/food/etirps_cranberry.png create mode 100644 src/main/resources/assets/gregtechfoodoption/blockstates/crop_black_currant.json create mode 100644 src/main/resources/assets/gregtechfoodoption/blockstates/crop_blackberry.json create mode 100644 src/main/resources/assets/gregtechfoodoption/blockstates/crop_blueberry.json create mode 100644 src/main/resources/assets/gregtechfoodoption/blockstates/crop_cranberry.json create mode 100644 src/main/resources/assets/gregtechfoodoption/blockstates/crop_elderberry.json create mode 100644 src/main/resources/assets/gregtechfoodoption/blockstates/crop_lingonberry.json create mode 100644 src/main/resources/assets/gregtechfoodoption/blockstates/crop_raspberry.json create mode 100644 src/main/resources/assets/gregtechfoodoption/blockstates/crop_red_currant.json create mode 100644 src/main/resources/assets/gregtechfoodoption/blockstates/crop_strawberry.json create mode 100644 src/main/resources/assets/gregtechfoodoption/blockstates/crop_white_currant.json create mode 100644 src/main/resources/assets/gregtechfoodoption/models/block/large_berry_bush.json create mode 100644 src/main/resources/assets/gregtechfoodoption/models/block/small_berry_bush.json create mode 100644 src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/black_currant_ripe.png create mode 100644 src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/blackberry_ripe.png create mode 100644 src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/blueberry_ripe.png create mode 100644 src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/bush_block.png create mode 100644 src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/cranberry_ripe.png create mode 100644 src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/elderberry_ripe.png create mode 100644 src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/lingonberry_ripe.png create mode 100644 src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/raspberry_ripe.png create mode 100644 src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/red_currant_ripe.png create mode 100644 src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/strawberry_ripe.png create mode 100644 src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/ungrown.png create mode 100644 src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/white_currant_ripe.png diff --git a/src/main/java/gregtechfoodoption/CommonProxy.java b/src/main/java/gregtechfoodoption/CommonProxy.java index 1bbdba21..36f7e0b0 100644 --- a/src/main/java/gregtechfoodoption/CommonProxy.java +++ b/src/main/java/gregtechfoodoption/CommonProxy.java @@ -2,11 +2,14 @@ import crazypants.enderio.api.farm.IFarmerJoe; import crazypants.enderio.base.farming.farmers.CustomSeedFarmer; +import crazypants.enderio.base.integration.natura.NaturaBerryFarmer; import gregtech.api.block.VariantItemBlock; import gregtech.api.recipes.RecipeMaps; +import gregtechfoodoption.block.GTFOBerryBush; import gregtechfoodoption.block.GTFOCrop; import gregtechfoodoption.block.GTFOMetaBlocks; import gregtechfoodoption.block.GTFORootCrop; +import gregtechfoodoption.integration.enderio.GTFOBerryFarmer; import gregtechfoodoption.integration.enderio.GTFORootCropFarmer; import gregtechfoodoption.item.GTFOMetaItem; import gregtechfoodoption.item.GTFOMetaItems; @@ -158,7 +161,13 @@ public static void registerEIOFarmerJoes(@Nonnull RegistryEvent.Register drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune) { + int age = this.getAge(state); + int efficiency = this.getEfficiency(state); + Random rand = world instanceof World ? ((World) world).rand : new Random(); + + if (age >= this.getMaxAge()) { + drops.add(this.crop.copy()); + for (int i = 0; i < 2 + efficiency; ++i) { + if (rand.nextInt(2) == 0) { + drops.add(this.crop.copy()); + } + } + } + + } + + public int getEfficiency(IBlockState state) { + return state.getProperties().get(EFFICIENCY_GTFO) != null ? state.getValue(EFFICIENCY_GTFO).intValue() : -1; + } + + @Override + public void grow(World worldIn, BlockPos pos, IBlockState state) { + if (worldIn.rand.nextInt(Math.max(2, getGrowthSlowdown(worldIn, pos, state) / 8)) != 0) { + return; + } + int i = this.getAge(state) + this.getBonemealAgeIncrease(worldIn); + int j = this.getMaxAge(); + + if (i > j) + { + i = j; + } + + worldIn.setBlockState(pos, withEfficiency(this.withAge(i), getEfficiency(worldIn, pos, state)), 3); + } + + public int getEfficiency(World worldIn, BlockPos pos, IBlockState state) { + int[] efficiencies = new int[EFFICIENCY_GTFO.getAllowedValues().stream().max(Integer::compare).get() + 1]; + BlockPos.getAllInBox(pos.east().north(), pos.west().south()).forEach((blockpos) -> { + if (!blockpos.equals(pos)) + efficiencies[getEfficiency(worldIn.getBlockState(blockpos)) + 1]++; + }); + for (int i = efficiencies.length - 1; i >= 0; --i) { + if (efficiencies[i] > 2) { + return i; + } + } + return 0; + } + + protected int getBonemealAgeIncrease(World worldIn) { + return 1; + } + + public IBlockState withEfficiency(IBlockState state, int efficiency) { + if (efficiency > 4) { + efficiency = 4; + GTFOLog.logger.warn("Somehow, you managed to get your berry's efficiency higher than 4, which is really cool (or the result of a hacked mod/bug), but it's currently not available in GTFO. Please report this to the mod author, along with a screenshot of how great your berry setup is."); + } + return state.withProperty(EFFICIENCY_GTFO, Integer.valueOf(efficiency)); + } + + public int getGrowthSlowdown(World world, BlockPos pos, IBlockState state) { + if (getAge(state) == 0) { + return 4; // Usual value for growing crops + } + int growthSlowdown = 320 << getEfficiency(state); + if (!world.isDaytime()) { + growthSlowdown *= 2; + } + if (world.isRaining()) { + growthSlowdown = growthSlowdown * 2 / 3; + } + + return growthSlowdown; + } + + @Override + public EnumPlantType getPlantType(IBlockAccess world, BlockPos pos) { + return EnumPlantType.Plains; + } + + @Override + public void onEntityCollision(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) { + if (isThorny) + entityIn.attackEntityFrom(DamageSource.CACTUS, 1.0F); + } + + public GTFOBerryBush setThorny(boolean thorny) { + isThorny = thorny; + return this; + } + + @Nullable + @Override + public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos) { + return this.getBoundingBox(blockState, worldIn, pos); + } + + @Override + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { + return this.getAge(state) == 0 ? SMALL_AABB : LARGE_AABB; + } + + public int getMaxAge() { + return 2; + } + + @Override + public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { + if (this.isMaxAge(state)) { + int berries = 1; + for (int i = 0; i < 2 + getEfficiency(state); ++i) { + if (worldIn.rand.nextInt(2) == 0) { + berries++; + } + } + + ItemStack berryStack = this.getCropStack().copy(); + berryStack.setCount(berries); + if (!playerIn.addItemStackToInventory(berryStack)) { + playerIn.dropItem(this.getCropStack(), false); + } + worldIn.setBlockState(pos, state.withProperty(AGE_GTFO, Integer.valueOf(this.getMaxAge() - 1)), 3); + return true; + } + return false; + } + + @Override + public IBlockState getStateFromMeta(int meta) { + return this.withAge(meta % 3).withProperty(EFFICIENCY_GTFO, Integer.valueOf(meta / 3)); + } + + @Override + public int getMetaFromState(IBlockState state) { + return this.getEfficiency(state) * 3 + this.getAge(state); + } +} diff --git a/src/main/java/gregtechfoodoption/block/GTFOCrop.java b/src/main/java/gregtechfoodoption/block/GTFOCrop.java index d50c9e1a..69831b77 100644 --- a/src/main/java/gregtechfoodoption/block/GTFOCrop.java +++ b/src/main/java/gregtechfoodoption/block/GTFOCrop.java @@ -45,7 +45,7 @@ public static GTFOCrop create(String name) { return new GTFOCrop(name); } - public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { return CROPS_AABB; } @@ -60,7 +60,7 @@ public int getMaxAge() { public void getDrops(NonNullList drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune) { int age = this.getAge(state); - Random rand = world instanceof World ? ((World)world).rand : new Random(); + Random rand = world instanceof World ? ((World) world).rand : new Random(); if (age >= this.getMaxAge()) { if (!seed.isEmpty()) { @@ -69,9 +69,8 @@ public void getDrops(NonNullList drops, IBlockAccess world, BlockPos drops.add(seed.copy()); } } - int k = 3 + fortune; - for(int i = 0; i < 3 + fortune; ++i) { + for (int i = 0; i < 3 + fortune; ++i) { if (rand.nextInt(2 * this.getMaxAge()) <= age) { drops.add(this.crop.copy()); } @@ -118,6 +117,7 @@ public ItemStack getSeedStack() { protected PropertyInteger getAgeProperty() { return AGE_GTFO == null ? AGE_TEMP : AGE_GTFO; } + protected BlockStateContainer createBlockState() { return AGE_GTFO == null ? new BlockStateContainer(this, AGE_TEMP) : new BlockStateContainer(this, AGE_GTFO); } diff --git a/src/main/java/gregtechfoodoption/block/GTFOCrops.java b/src/main/java/gregtechfoodoption/block/GTFOCrops.java index 76adb66b..edda7c97 100644 --- a/src/main/java/gregtechfoodoption/block/GTFOCrops.java +++ b/src/main/java/gregtechfoodoption/block/GTFOCrops.java @@ -20,6 +20,18 @@ public class GTFOCrops { public static GTFOCrop CROP_RICE = GTFOCrop.create("rice"); public static GTFOCrop CROP_WHITE_GRAPE = GTFOCrop.create("white_grape"); + public static GTFOBerryBush BUSH_BLUEBERRY = GTFOBerryBush.create("blueberry"); + public static GTFOBerryBush BUSH_BLACKBERRY = GTFOBerryBush.create("blackberry").setThorny(true); + public static GTFOBerryBush BUSH_RASPBERRY = GTFOBerryBush.create("raspberry").setThorny(true); + public static GTFOBerryBush BUSH_STRAWBERRY = GTFOBerryBush.create("strawberry"); + public static GTFOBerryBush BUSH_RED_CURRANT = GTFOBerryBush.create("red_currant"); + public static GTFOBerryBush BUSH_BLACK_CURRANT = GTFOBerryBush.create("black_currant"); + public static GTFOBerryBush BUSH_WHITE_CURRANT = GTFOBerryBush.create("white_currant"); + public static GTFOBerryBush BUSH_LINGONBERRY = GTFOBerryBush.create("lingonberry"); + public static GTFOBerryBush BUSH_ELDERBERRY = GTFOBerryBush.create("elderberry"); + public static GTFOBerryBush BUSH_CRANBERRY = GTFOBerryBush.create("cranberry"); + + //public static GTFOCrop CROP_HOPS = GTFOCrop.create("hops"); public static void init() { diff --git a/src/main/java/gregtechfoodoption/block/GTFOMetaBlocks.java b/src/main/java/gregtechfoodoption/block/GTFOMetaBlocks.java index b904e9e7..b98012dc 100644 --- a/src/main/java/gregtechfoodoption/block/GTFOMetaBlocks.java +++ b/src/main/java/gregtechfoodoption/block/GTFOMetaBlocks.java @@ -12,6 +12,9 @@ import gregtechfoodoption.block.tree.GTFOBlockLog; import gregtechfoodoption.block.tree.GTFOBlockPlanks; import gregtechfoodoption.block.tree.GTFOBlockSapling; +import gregtechfoodoption.worldgen.berries.GTFOBerries; +import gregtechfoodoption.worldgen.trees.GTFOTree; +import gregtechfoodoption.worldgen.trees.GTFOTrees; import net.minecraft.block.Block; import net.minecraft.block.BlockLog; import net.minecraft.block.properties.IProperty; @@ -49,6 +52,7 @@ public static void init() { GTFO_GLASS_CASING.setRegistryName("gtfo_glass_casing"); GTFOTrees.init(); + GTFOBerries.init(); for (int i = 0; i <= (GTFOTree.TREES.size() - 1) / 4; i++) { GTFOBlockLeaves leaves = new GTFOBlockLeaves(i); leaves.setRegistryName("gtfo_leaves_" + i); diff --git a/src/main/java/gregtechfoodoption/block/tree/GTFOBlockLeaves.java b/src/main/java/gregtechfoodoption/block/tree/GTFOBlockLeaves.java index 442bdf6c..ce80d723 100644 --- a/src/main/java/gregtechfoodoption/block/tree/GTFOBlockLeaves.java +++ b/src/main/java/gregtechfoodoption/block/tree/GTFOBlockLeaves.java @@ -4,8 +4,8 @@ import gregtech.core.CoreModule; import gregtechfoodoption.GTFOValues; import gregtechfoodoption.block.GTFOMetaBlocks; -import gregtechfoodoption.block.GTFOTree; -import gregtechfoodoption.block.GTFOTrees; +import gregtechfoodoption.worldgen.trees.GTFOTree; +import gregtechfoodoption.worldgen.trees.GTFOTrees; import gregtechfoodoption.block.IVariantNamed; import net.minecraft.block.BlockLeaves; import net.minecraft.block.BlockPlanks; diff --git a/src/main/java/gregtechfoodoption/block/tree/GTFOBlockLog.java b/src/main/java/gregtechfoodoption/block/tree/GTFOBlockLog.java index 9e200d6c..6f17edcb 100644 --- a/src/main/java/gregtechfoodoption/block/tree/GTFOBlockLog.java +++ b/src/main/java/gregtechfoodoption/block/tree/GTFOBlockLog.java @@ -2,7 +2,7 @@ import gregtechfoodoption.GTFOValues; import gregtechfoodoption.block.GTFOMetaBlocks; -import gregtechfoodoption.block.GTFOTree; +import gregtechfoodoption.worldgen.trees.GTFOTree; import gregtechfoodoption.block.IVariantNamed; import net.minecraft.block.BlockLog; import net.minecraft.block.properties.PropertyInteger; diff --git a/src/main/java/gregtechfoodoption/block/tree/GTFOBlockPlanks.java b/src/main/java/gregtechfoodoption/block/tree/GTFOBlockPlanks.java index 4dcf89ba..3cf81d04 100644 --- a/src/main/java/gregtechfoodoption/block/tree/GTFOBlockPlanks.java +++ b/src/main/java/gregtechfoodoption/block/tree/GTFOBlockPlanks.java @@ -2,7 +2,7 @@ import gregtechfoodoption.GTFOValues; import gregtechfoodoption.block.GTFOMetaBlocks; -import gregtechfoodoption.block.GTFOTree; +import gregtechfoodoption.worldgen.trees.GTFOTree; import gregtechfoodoption.block.IVariantNamed; import net.minecraft.block.Block; import net.minecraft.block.material.Material; diff --git a/src/main/java/gregtechfoodoption/block/tree/GTFOBlockSapling.java b/src/main/java/gregtechfoodoption/block/tree/GTFOBlockSapling.java index e32d5307..48ddbf24 100644 --- a/src/main/java/gregtechfoodoption/block/tree/GTFOBlockSapling.java +++ b/src/main/java/gregtechfoodoption/block/tree/GTFOBlockSapling.java @@ -2,7 +2,7 @@ import gregtechfoodoption.GTFOValues; import gregtechfoodoption.block.GTFOMetaBlocks; -import gregtechfoodoption.block.GTFOTree; +import gregtechfoodoption.worldgen.trees.GTFOTree; import gregtechfoodoption.block.IVariantNamed; import net.minecraft.block.BlockBush; import net.minecraft.block.IGrowable; diff --git a/src/main/java/gregtechfoodoption/integration/agricraft/GTFOAgriPlant.java b/src/main/java/gregtechfoodoption/integration/agricraft/GTFOAgriPlant.java index 3c7c41bf..6f94b700 100644 --- a/src/main/java/gregtechfoodoption/integration/agricraft/GTFOAgriPlant.java +++ b/src/main/java/gregtechfoodoption/integration/agricraft/GTFOAgriPlant.java @@ -12,6 +12,7 @@ import com.infinityraider.agricraft.renderers.PlantRenderer; import com.infinityraider.infinitylib.render.tessellation.ITessellator; import gregtechfoodoption.GTFOValues; +import gregtechfoodoption.block.GTFOBerryBush; import gregtechfoodoption.block.GTFOCrop; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.texture.TextureAtlasSprite; @@ -86,7 +87,7 @@ public double getSpawnChance() { @Override public double getGrowthChanceBase() { - return 0.9; + return wrap instanceof GTFOBerryBush ? 0.05 : 0.9; } @Override @@ -111,7 +112,7 @@ public double getGrassDropChance() { @Override public int getGrowthStages() { - return 6; + return wrap instanceof GTFOBerryBush ? 3 : 6; } @Override @@ -136,6 +137,9 @@ public ItemStack getSeed() { @Override public IGrowthRequirement getGrowthRequirement() { IGrowthReqBuilder builder = new GrowthReqBuilder(); + if (wrap instanceof GTFOBerryBush) { + builder.addSoil(AgriApi.getSoilRegistry().get(Blocks.GRASS.getDefaultState()).get()); + } builder.addSoil(AgriApi.getSoilRegistry().get(Blocks.FARMLAND.getDefaultState()).get()); // How could this go wrong??? :troll: return builder.build(); } @@ -177,8 +181,12 @@ public RenderMethod getRenderMethod() { @Nullable @Override public ResourceLocation getPrimaryPlantTexture(int i) { - int possibleAge = Math.min(i, wrap.getMaxAge()); // Required for clippings to render correctly (they assume all crops have 7 stages... the fools) - return new ResourceLocation(GTFOValues.MODID, "crop/crop_" + this.wrap.getName() + "/stage" + possibleAge); + if (wrap instanceof GTFOBerryBush) { + return i < 3 ? new ResourceLocation(GTFOValues.MODID, "blocks/berry/ungrown") : new ResourceLocation(GTFOValues.MODID, "blocks/berry/" + this.wrap.getName() + "_ripe"); + } else { + int possibleAge = Math.min(i, wrap.getMaxAge()); // Required for clippings to render correctly (they assume all crops have 7 stages... the fools) + return new ResourceLocation(GTFOValues.MODID, "crop/crop_" + this.wrap.getName() + "/stage" + possibleAge); + } } @Nullable diff --git a/src/main/java/gregtechfoodoption/integration/enderio/GTFOBerryFarmer.java b/src/main/java/gregtechfoodoption/integration/enderio/GTFOBerryFarmer.java new file mode 100644 index 00000000..cbfe201e --- /dev/null +++ b/src/main/java/gregtechfoodoption/integration/enderio/GTFOBerryFarmer.java @@ -0,0 +1,76 @@ +package gregtechfoodoption.integration.enderio; + +import com.enderio.core.common.util.NNList; +import crazypants.enderio.api.farm.FarmNotification; +import crazypants.enderio.api.farm.FarmingAction; +import crazypants.enderio.api.farm.IFarmer; +import crazypants.enderio.api.farm.IHarvestResult; +import crazypants.enderio.base.farming.FarmingTool; +import crazypants.enderio.base.farming.farmers.CustomSeedFarmer; +import crazypants.enderio.base.farming.farmers.HarvestResult; +import crazypants.enderio.util.Prep; +import gregtechfoodoption.block.GTFOBerryBush; +import gregtechfoodoption.block.GTFOCrop; +import gregtechfoodoption.block.GTFORootCrop; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.event.ForgeEventFactory; +import org.jetbrains.annotations.NotNull; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +public class GTFOBerryFarmer extends CustomSeedFarmer { + public GTFOBerryFarmer(@NotNull Block plantedBlock, @NotNull ItemStack seeds) { + super(plantedBlock, seeds); + } + + @Nullable + @Override + public IHarvestResult harvestBlock(@Nonnull IFarmer farm, @Nonnull BlockPos pos, @Nonnull IBlockState state) { + if (!canHarvest(farm, pos, state) || !farm.checkAction(FarmingAction.HARVEST, getHarvestTool())) { + return null; + } + if (!farm.hasTool(getHarvestTool())) { + farm.setNotification(getNoHarvestToolNotification()); + return null; + } + + final World world = farm.getWorld(); + final EntityPlayerMP joe = farm.startUsingItem(getHarvestTool()); + final int fortune = farm.getLootingValue(getHarvestTool()); + final IHarvestResult res = new HarvestResult(pos); + GTFOCrop crop = (GTFOCrop) state.getBlock(); + + NNList drops = new NNList<>(); + state.getBlock().getDrops(drops, world, pos, state, fortune); + float chance = ForgeEventFactory.fireBlockHarvesting(drops, joe.world, pos, state, fortune, 1.0F, false, joe); + farm.registerAction(FarmingAction.HARVEST, getHarvestTool(), state, pos); + for (ItemStack stack : drops) { + if (world.rand.nextFloat() <= chance) { + res.addDrop(pos, stack.copy()); + } + } + + NNList.wrap(farm.endUsingItem(getHarvestTool())).apply(drop -> { + res.addDrop(pos, drop.copy()); + }); + + world.setBlockState(pos, state.withProperty(crop.AGE_GTFO, Integer.valueOf(crop.getMaxAge() - 1)), 3); + return res; + } + + @Override + public boolean canPlant(@NotNull ItemStack stack) { + return false; + } + + @Override + public boolean canHarvest(@Nonnull IFarmer farm, @Nonnull BlockPos bc, @Nonnull IBlockState state) { + return state.getBlock() instanceof GTFOCrop crop && crop == getPlantedBlock() && crop.isMaxAge(state); + } +} diff --git a/src/main/java/gregtechfoodoption/item/GTFOBerrySeedBehaviour.java b/src/main/java/gregtechfoodoption/item/GTFOBerrySeedBehaviour.java new file mode 100644 index 00000000..a6fb08b1 --- /dev/null +++ b/src/main/java/gregtechfoodoption/item/GTFOBerrySeedBehaviour.java @@ -0,0 +1,70 @@ +package gregtechfoodoption.item; + +import gregtechfoodoption.block.GTFOBerryBush; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; +import net.minecraft.util.EnumActionResult; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.TextComponentTranslation; +import net.minecraft.world.World; + +import java.util.List; +import java.util.concurrent.atomic.AtomicBoolean; + +// bri'ish class +public class GTFOBerrySeedBehaviour extends GTFOCropSeedBehaviour { + + public GTFOBerrySeedBehaviour(GTFOBerryBush cropBlock, ItemStack seed, ItemStack crop) { + super(cropBlock, seed, crop); + } + + public GTFOBerrySeedBehaviour(Block block) { + this(block.getDefaultState()); + } + + public GTFOBerrySeedBehaviour(IBlockState state) { + super(state); + } + + @Override + public ActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { + if (!isBlocked(world, pos, player)) { + return super.onItemUse(player, world, pos, hand, facing, hitX, hitY, hitZ); + } + return new ActionResult<>(EnumActionResult.FAIL, player.getHeldItem(hand)); + } + + private boolean isBlocked(World world, BlockPos pos, EntityPlayer player) { + AtomicBoolean areAnyBlocked = new AtomicBoolean(false); + BlockPos.getAllInBox(pos.up().east().north(), pos.up().west().south()).forEach((crop) -> { + if (world.getBlockState(crop).getBlock() instanceof GTFOBerryBush) { + AtomicBoolean isBlocked = new AtomicBoolean(true); + BlockPos.getAllInBox(crop.east().north(), crop.west().south()).forEach((blockpos) -> { + if (!blockpos.equals(pos.up()) && world.getBlockState(blockpos).getBlock().isAir(world.getBlockState(blockpos), world, blockpos)) { + isBlocked.set(false); + } + }); + if (isBlocked.get()) { + if (world.isRemote) + player.sendMessage(new TextComponentTranslation("gregtechfoodoption.blocked", crop)); + areAnyBlocked.set(true); + } + } + }); + return areAnyBlocked.get(); + } + + @Override + public void addInformation(ItemStack itemStack, List lines) { + super.addInformation(itemStack, lines); + for (int i = 0; i < 4; i++) { + lines.add(I18n.format("gregtechfoodoption.berry.description." + i)); + } + } +} diff --git a/src/main/java/gregtechfoodoption/item/GTFOCropSeedBehaviour.java b/src/main/java/gregtechfoodoption/item/GTFOCropSeedBehaviour.java index 80062407..ad55eabe 100644 --- a/src/main/java/gregtechfoodoption/item/GTFOCropSeedBehaviour.java +++ b/src/main/java/gregtechfoodoption/item/GTFOCropSeedBehaviour.java @@ -15,7 +15,7 @@ // bri'ish class public class GTFOCropSeedBehaviour implements IItemBehaviour { - private final IBlockState placeState; + protected final IBlockState placeState; public GTFOCropSeedBehaviour(GTFOCrop cropBlock, ItemStack seed, ItemStack crop) { cropBlock.setSeed(seed); diff --git a/src/main/java/gregtechfoodoption/item/GTFOMetaItem.java b/src/main/java/gregtechfoodoption/item/GTFOMetaItem.java index 1ac7e821..55326f98 100644 --- a/src/main/java/gregtechfoodoption/item/GTFOMetaItem.java +++ b/src/main/java/gregtechfoodoption/item/GTFOMetaItem.java @@ -376,6 +376,21 @@ public class GTFOMetaItem extends MetaItem imple public static MetaItem.MetaValueItem EMERGENCY_RATIONS; + public static MetaItem.MetaValueItem BLUEBERRY; + public static MetaItem.MetaValueItem BLACKBERRY; + public static MetaItem.MetaValueItem RASPBERRY; + public static MetaItem.MetaValueItem STRAWBERRY; + public static MetaItem.MetaValueItem RED_CURRANT; + public static MetaItem.MetaValueItem BLACK_CURRANT; + public static MetaItem.MetaValueItem WHITE_CURRANT; + public static MetaItem.MetaValueItem LINGONBERRY; + public static MetaItem.MetaValueItem ELDERBERRY; + public static MetaItem.MetaValueItem CRANBERRY; + + public static MetaItem.MetaValueItem BERRY_MEDLEY; + public static MetaItem.MetaValueItem ETIRPS_CRANBERRY; + + public static MetaItem.MetaValueItem UNCOOKED_PELMENI; public static MetaItem.MetaValueItem UNCOOKED_SEASONED_PELMENI; public static MetaItem.MetaValueItem PELMENI; @@ -429,10 +444,10 @@ public void registerSubItems() { FRIED_POTATO_STRIP = addItem(35, "component.potato.fried_strip"); USED_PAPER_BAG = addItem(36, "component.bag_used"); - MUD_BRICK = addItem(43, "brick.adobe").addComponents(new GTFOFoodStats(0, 0,false,true).setEatingDuration(100) + MUD_BRICK = addItem(43, "brick.adobe").addComponents(new GTFOFoodStats(0, 0, false, true).setEatingDuration(100) .setPotionEffects(new RandomPotionEffect(MobEffects.POISON, 400, 0, 100 - 50))); ADOBE_BRICK = addItem(44, "brick.adobe_fired") - .addComponents(new GTFOFoodStats(0, 0,false,true).setEatingDuration(400)); + .addComponents(new GTFOFoodStats(0, 0, false, true).setEatingDuration(400)); WOODEN_FORM_BREAD = addItem(45, "wooden_form.bread").addComponents(selfContainerItemProvider); WOODEN_FORM_BAGUETTE = addItem(46, "wooden_form.baguette").addComponents(selfContainerItemProvider); @@ -606,7 +621,7 @@ public void registerSubItems() { .addOreDict("cropLemon").addOreDict("listAllfruit").addComponents(); LIME = addItem(18, "food.lime").addComponents(new GTFOFoodStats(GTFOConfig.gtfoFoodConfig.limeHunger, GTFOConfig.gtfoFoodConfig.limeSaturation)) .addOreDict("cropLime").addOreDict("listAllfruit"); - ETIRPS = addItem(19, "food.etirps").addComponents(new GTFOFoodStats(GTFOConfig.gtfoFoodConfig.etirpsHunger, GTFOConfig.gtfoFoodConfig.etirpsSaturation, true, false, PLASTIC_BOTTLE.getStackForm(), + ETIRPS = addItem(19, "food.etirps").addComponents(new GTFOFoodStats(GTFOConfig.gtfoFoodConfig.etirpsHunger, GTFOConfig.gtfoFoodConfig.etirpsSaturation, true, true, PLASTIC_BOTTLE.getStackForm(), new RandomPotionEffect(MobEffects.SPEED, 1200, 2, 0))); MetaItems.BOTTLE_PURPLE_DRINK.addComponents(new GTFOFoodStats(3, 0.2F, true, true, new ItemStack(Items.GLASS_BOTTLE), @@ -873,6 +888,44 @@ public void registerSubItems() { EMERGENCY_RATIONS = addItem(325, "food.emergency_rations").addComponents(new GTFOFoodStats(5, 1.0f, false, true) .setPotionEffects(new RandomPotionEffect(MobEffects.NAUSEA, 400, 0, 100 - 10)).setEatingDuration(60)); + BLUEBERRY = addItem(326, "food.berry.blueberry").addComponents(new GTFOFoodStats(1, 0.5f)) + .addOreDict("cropBlueberry").addOreDict("listAllfruit").addOreDict("listAllberry").addOreDict("listAllberrysweet"); + BLUEBERRY.addComponents(new GTFOBerrySeedBehaviour(GTFOCrops.BUSH_BLUEBERRY, BLUEBERRY.getStackForm(), BLUEBERRY.getStackForm())); + BLACKBERRY = addItem(327, "food.berry.blackberry").addComponents(new GTFOFoodStats(1, 0.5f)) + .addOreDict("cropBlackberry").addOreDict("listAllfruit").addOreDict("listAllberry").addOreDict("listAllberrytart"); + BLACKBERRY.addComponents(new GTFOBerrySeedBehaviour(GTFOCrops.BUSH_BLACKBERRY, BLACKBERRY.getStackForm(), BLACKBERRY.getStackForm())); + RASPBERRY = addItem(328, "food.berry.raspberry").addComponents(new GTFOFoodStats(1, 0.5f)) + .addOreDict("cropRaspberry").addOreDict("listAllfruit").addOreDict("listAllberry").addOreDict("listAllberrysweet"); + RASPBERRY.addComponents(new GTFOBerrySeedBehaviour(GTFOCrops.BUSH_RASPBERRY, RASPBERRY.getStackForm(), RASPBERRY.getStackForm())); + STRAWBERRY = addItem(329, "food.berry.strawberry").addComponents(new GTFOFoodStats(1, 0.5f)) + .addOreDict("cropStrawberry").addOreDict("listAllfruit").addOreDict("listAllberry").addOreDict("listAllberrysweet"); + STRAWBERRY.addComponents(new GTFOBerrySeedBehaviour(GTFOCrops.BUSH_STRAWBERRY, STRAWBERRY.getStackForm(), STRAWBERRY.getStackForm())); + RED_CURRANT = addItem(330, "food.berry.red_currant").addComponents(new GTFOFoodStats(1, 0.5f)) + .addOreDict("cropRedCurrant").addOreDict("listAllfruit").addOreDict("listAllberry").addOreDict("listAllberrytart"); + RED_CURRANT.addComponents(new GTFOBerrySeedBehaviour(GTFOCrops.BUSH_RED_CURRANT, RED_CURRANT.getStackForm(), RED_CURRANT.getStackForm())); + BLACK_CURRANT = addItem(331, "food.berry.black_currant").addComponents(new GTFOFoodStats(1, 0.5f)) + .addOreDict("cropBlackCurrant").addOreDict("listAllfruit").addOreDict("listAllberry").addOreDict("listAllberrytart"); + BLACK_CURRANT.addComponents(new GTFOBerrySeedBehaviour(GTFOCrops.BUSH_BLACK_CURRANT, BLACK_CURRANT.getStackForm(), BLACK_CURRANT.getStackForm())); + WHITE_CURRANT = addItem(332, "food.berry.white_currant").addComponents(new GTFOFoodStats(1, 0.5f)) + .addOreDict("cropWhiteCurrant").addOreDict("listAllfruit").addOreDict("listAllberry").addOreDict("listAllberrytart"); + WHITE_CURRANT.addComponents(new GTFOBerrySeedBehaviour(GTFOCrops.BUSH_WHITE_CURRANT, WHITE_CURRANT.getStackForm(), WHITE_CURRANT.getStackForm())); + LINGONBERRY = addItem(333, "food.berry.lingonberry").addComponents(new GTFOFoodStats(1, 0.5f)) + .addOreDict("cropLingonberry").addOreDict("listAllfruit").addOreDict("listAllberry").addOreDict("listAllberrytart"); + LINGONBERRY.addComponents(new GTFOBerrySeedBehaviour(GTFOCrops.BUSH_LINGONBERRY, LINGONBERRY.getStackForm(), LINGONBERRY.getStackForm())); + ELDERBERRY = addItem(334, "food.berry.elderberry").addComponents(new GTFOFoodStats(1, 0.5f).setPotionEffects( + new RandomPotionEffect(MobEffects.NAUSEA, 400, 0, 100 - 4), + new RandomPotionEffect(MobEffects.POISON, 200, 0, 100 - 1))) + .addOreDict("cropElderberry").addOreDict("listAllfruit").addOreDict("listAllberry"); + ELDERBERRY.addComponents(new GTFOBerrySeedBehaviour(GTFOCrops.BUSH_ELDERBERRY, ELDERBERRY.getStackForm(), ELDERBERRY.getStackForm())); + CRANBERRY = addItem(335, "food.berry.cranberry").addComponents(new GTFOFoodStats(1, 0.5f)) + .addOreDict("cropCranberry").addOreDict("listAllfruit").addOreDict("listAllberry").addOreDict("listAllberrysweet"); + CRANBERRY.addComponents(new GTFOBerrySeedBehaviour(GTFOCrops.BUSH_CRANBERRY, CRANBERRY.getStackForm(), CRANBERRY.getStackForm())); + + BERRY_MEDLEY = addItem(336, "food.berry_medley").addComponents(new GTFOFoodStats(5, 0.5f, false, false, new ItemStack(Items.BOWL))); + ETIRPS_CRANBERRY = addItem(337, "food.etirps_cranberry").addComponents(new GTFOFoodStats(GTFOConfig.gtfoFoodConfig.etirpsHunger + 3, GTFOConfig.gtfoFoodConfig.etirpsSaturation + 0.3f, true, true, PLASTIC_BOTTLE.getStackForm(), + new RandomPotionEffect(MobEffects.SPEED, 1200, 2, 0), + new RandomPotionEffect(MobEffects.REGENERATION, 200, 1, 100 - 80))); + PELMENI = addItem(340, "food.pelmeni").addComponents(new GTFOFoodStats(5, 0.5f)); SEASONED_PELMENI = addItem(341, "food.pelmeni_seasoned").addComponents(new GTFOFoodStats(7, 1f).setEatingDuration(24)); diff --git a/src/main/java/gregtechfoodoption/machines/farmer/FarmerModeRegistry.java b/src/main/java/gregtechfoodoption/machines/farmer/FarmerModeRegistry.java index c4a773c1..1fc0ee67 100644 --- a/src/main/java/gregtechfoodoption/machines/farmer/FarmerModeRegistry.java +++ b/src/main/java/gregtechfoodoption/machines/farmer/FarmerModeRegistry.java @@ -76,8 +76,9 @@ public static void registerDefaultModes() { registerFarmerMode(new GroundClearingFarmerMode(Blocks.BROWN_MUSHROOM)); registerFarmerMode(new GroundClearingFarmerMode(Blocks.SNOW_LAYER)); registerFarmerMode(new GroundClearingFarmerMode(Blocks.DOUBLE_PLANT)); - registerFarmerMode(new GTFOCropFarmerMode()); registerFarmerMode(new GTFORootCropFarmerMode()); + registerFarmerMode(new GTFOBerryFarmerMode()); + registerFarmerMode(new GTFOCropFarmerMode()); if (Loader.isModLoaded(MODID_AC)) registerFarmerMode(new GTFOAgriCraftFarmerMode()); } diff --git a/src/main/java/gregtechfoodoption/machines/farmer/GTFOBerryFarmerMode.java b/src/main/java/gregtechfoodoption/machines/farmer/GTFOBerryFarmerMode.java new file mode 100644 index 00000000..2e2253d9 --- /dev/null +++ b/src/main/java/gregtechfoodoption/machines/farmer/GTFOBerryFarmerMode.java @@ -0,0 +1,26 @@ +package gregtechfoodoption.machines.farmer; + +import gregtechfoodoption.block.GTFOBerryBush; +import gregtechfoodoption.block.GTFOCrop; +import net.minecraft.block.state.IBlockState; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class GTFOBerryFarmerMode implements FarmerMode { + @Override + public boolean canOperate(IBlockState state, MetaTileEntityFarmer farmer, BlockPos pos, World world) { + return state.getBlock() instanceof GTFOBerryBush && ((GTFOBerryBush) state.getBlock()).isMaxAge(state); + } + + @Override + public boolean canPlaceItem(ItemStack stack) { + return false; + } + + @Override + public void harvest(IBlockState state, World world, BlockPos.MutableBlockPos pos, MetaTileEntityFarmer farmer) { + GTFOCrop crop = (GTFOCrop) state.getBlock(); + world.setBlockState(pos, state.withProperty(crop.AGE_GTFO, Integer.valueOf(crop.getMaxAge() - 1)), 3); + } +} diff --git a/src/main/java/gregtechfoodoption/recipe/GTFORecipeAddition.java b/src/main/java/gregtechfoodoption/recipe/GTFORecipeAddition.java index cea317ba..564bdf52 100644 --- a/src/main/java/gregtechfoodoption/recipe/GTFORecipeAddition.java +++ b/src/main/java/gregtechfoodoption/recipe/GTFORecipeAddition.java @@ -2,7 +2,7 @@ import gregtechfoodoption.GTFOConfig; import gregtechfoodoption.GTFOValues; -import gregtechfoodoption.block.GTFOTree; +import gregtechfoodoption.worldgen.trees.GTFOTree; import gregtechfoodoption.recipe.chain.*; import gregtechfoodoption.tools.GTFOToolItems; import net.minecraftforge.fml.common.Loader; @@ -34,6 +34,7 @@ public static void init() { PastaChain.init(); PlateChain.init(); LithiumChain.init(); + BerryChain.init(); RussianChain.init(); if (Loader.isModLoaded(GTFOValues.MODID_GCYS)) { diff --git a/src/main/java/gregtechfoodoption/recipe/chain/BerryChain.java b/src/main/java/gregtechfoodoption/recipe/chain/BerryChain.java new file mode 100644 index 00000000..a6ce010f --- /dev/null +++ b/src/main/java/gregtechfoodoption/recipe/chain/BerryChain.java @@ -0,0 +1,95 @@ +package gregtechfoodoption.recipe.chain; + +import gregtech.api.recipes.ModHandler; +import gregtech.api.recipes.RecipeMaps; +import gregtech.api.unification.OreDictUnifier; +import gregtechfoodoption.GTFOValues; +import gregtechfoodoption.recipe.GTFORecipeMaps; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +import static gregtech.api.recipes.RecipeMaps.*; +import static gregtechfoodoption.GTFOMaterialHandler.*; +import static gregtechfoodoption.GTFOMaterialHandler.LemonLimeSludge; +import static gregtechfoodoption.item.GTFOMetaItem.*; + +public class BerryChain { + public static void init() { + MIXER_RECIPES.recipeBuilder() + .fluidInputs(CranberrySludge.getFluid(500)) + .input(Items.SUGAR, 6) + .fluidOutputs(CranberrySodaSyrup.getFluid(500)) + .EUt(60) + .duration(40) + .buildAndRegister(); + CENTRIFUGE_RECIPES.recipeBuilder() + .fluidInputs(CranberryExtract.getFluid(1500)) + .fluidOutputs(CranberrySludge.getFluid(1000)) + .EUt(30) + .duration(140) + .buildAndRegister(); + + MIXER_RECIPES.recipeBuilder() + .fluidInputs(CarbonatedWater.getFluid(1000), CranberrySodaSyrup.getFluid(1000)) + .fluidOutputs(EtirpsCranberry.getFluid(2000)) + .EUt(60) + .duration(20) + .buildAndRegister(); + + CANNER_RECIPES.recipeBuilder() + .fluidInputs(EtirpsCranberry.getFluid(500)) + .inputs(PLASTIC_BOTTLE.getStackForm()) + .outputs(ETIRPS_CRANBERRY.getStackForm()) + .EUt(30) + .duration(20) + .buildAndRegister(); + + ModHandler.addShapelessRecipe("gtfo_berry_medley_1x_a", BERRY_MEDLEY.getStackForm(), + BLUEBERRY.getStackForm(), BLACKBERRY.getStackForm(), LINGONBERRY.getStackForm(), new ItemStack(Items.BOWL)); + ModHandler.addShapelessRecipe("gtfo_berry_medley_1x_b", BERRY_MEDLEY.getStackForm(), + RASPBERRY.getStackForm(), STRAWBERRY.getStackForm(), BLACK_CURRANT.getStackForm(), new ItemStack(Items.BOWL)); + ModHandler.addShapelessRecipe("gtfo_berry_medley_1x_c", BERRY_MEDLEY.getStackForm(), + CRANBERRY.getStackForm(), RED_CURRANT.getStackForm(), WHITE_CURRANT.getStackForm(), new ItemStack(Items.BOWL)); + + ModHandler.addShapelessRecipe("gtfo_berry_medley_2x_a", BERRY_MEDLEY.getStackForm(2), + BLUEBERRY.getStackForm(), RASPBERRY.getStackForm(), WHITE_CURRANT.getStackForm(), LINGONBERRY.getStackForm(), new ItemStack(Items.BOWL), new ItemStack(Items.BOWL)); + ModHandler.addShapelessRecipe("gtfo_berry_medley_2x_b", BERRY_MEDLEY.getStackForm(2), + STRAWBERRY.getStackForm(), CRANBERRY.getStackForm(), BLACK_CURRANT.getStackForm(), BLACKBERRY.getStackForm(), new ItemStack(Items.BOWL), new ItemStack(Items.BOWL)); + ModHandler.addShapelessRecipe("gtfo_berry_medley_2x_c", BERRY_MEDLEY.getStackForm(2), + RASPBERRY.getStackForm(), CRANBERRY.getStackForm(), RED_CURRANT.getStackForm(), LINGONBERRY.getStackForm(), new ItemStack(Items.BOWL), new ItemStack(Items.BOWL)); + + GTFORecipeMaps.MULTICOOKER_RECIPES.recipeBuilder() + .EUt(16).duration(240) + .input("cropElderberry") + .input(Items.SUGAR) + .fluidInputs(LemonExtract.getFluid(150)) + .fluidOutputs(ElderberryJam.getFluid(1000)) + .buildAndRegister(); + + GTFORecipeMaps.MULTICOOKER_RECIPES.recipeBuilder() + .EUt(16).duration(240) + .input("cropLingonberry") + .input(Items.SUGAR) + .fluidOutputs(LingonberryJam.getFluid(1000)) + .buildAndRegister(); + + GTFORecipeMaps.CUISINE_ASSEMBLER_RECIPES.recipeBuilder() + .EUt(8).duration(20) + .fluidInputs(LingonberryJam.getFluid(100)) + .input("listAllberrytart", 1) + .input("listAllberrysweet", 1) + .input(Items.BOWL) + .outputs(BERRY_MEDLEY.getStackForm()) + .buildAndRegister(); + + GTFORecipeMaps.CUISINE_ASSEMBLER_RECIPES.recipeBuilder() + .EUt(8).duration(20) + .fluidInputs(ElderberryJam.getFluid(50)) + .input("listAllberrytart", 1) + .input("listAllberrysweet", 1) + .input(Items.BOWL) + .outputs(BERRY_MEDLEY.getStackForm()) + .buildAndRegister(); + } +} diff --git a/src/main/java/gregtechfoodoption/recipe/chain/CoreChain.java b/src/main/java/gregtechfoodoption/recipe/chain/CoreChain.java index a7726a13..2c7b09f7 100644 --- a/src/main/java/gregtechfoodoption/recipe/chain/CoreChain.java +++ b/src/main/java/gregtechfoodoption/recipe/chain/CoreChain.java @@ -1,6 +1,6 @@ package gregtechfoodoption.recipe.chain; -//Used for cross-chain materials. +//Used for cross-chain materials, as well as smaller chains. import gregtech.api.items.metaitem.MetaItem; import gregtech.api.recipes.ModHandler; @@ -156,7 +156,7 @@ public static void liquidFoodExtracts() { .buildAndRegister(); EXTRACTOR_RECIPES.recipeBuilder().EUt(2).duration(10) - .inputs(TOMATO_SLICE.getStackForm(4)) + .inputs(TOMATO_SLICE.getStackForm()) .fluidOutputs(GTFOMaterialHandler.TomatoSauce.getFluid(100)) .buildAndRegister(); @@ -166,7 +166,7 @@ public static void liquidFoodExtracts() { .buildAndRegister(); EXTRACTOR_RECIPES.recipeBuilder().EUt(2).duration(10) - .inputs(APPLE_SLICE.getStackForm(4)) + .inputs(APPLE_SLICE.getStackForm()) .fluidOutputs(AppleExtract.getFluid(100)) .buildAndRegister(); @@ -175,6 +175,11 @@ public static void liquidFoodExtracts() { .fluidOutputs(MelonExtract.getFluid(100)) .buildAndRegister(); + EXTRACTOR_RECIPES.recipeBuilder().EUt(2).duration(10) + .inputs(CRANBERRY.getStackForm()) + .fluidOutputs(CranberryExtract.getFluid(25)) + .buildAndRegister(); + CANNER_RECIPES.recipeBuilder() .inputs(APPLE_JUICE.getStackForm()) .fluidOutputs(AppleExtract.getFluid(100)) diff --git a/src/main/java/gregtechfoodoption/recipe/chain/SeedsChain.java b/src/main/java/gregtechfoodoption/recipe/chain/SeedsChain.java index 8dfdd26c..2956eadc 100644 --- a/src/main/java/gregtechfoodoption/recipe/chain/SeedsChain.java +++ b/src/main/java/gregtechfoodoption/recipe/chain/SeedsChain.java @@ -7,7 +7,7 @@ import gregtech.common.items.MetaItems; import gregtechfoodoption.GTFOConfig; import gregtechfoodoption.block.GTFOCrop; -import gregtechfoodoption.block.GTFOTrees; +import gregtechfoodoption.worldgen.trees.GTFOTrees; import gregtechfoodoption.item.GTFOMetaItem; import gregtechfoodoption.recipe.GTFORecipeMaps; import net.minecraft.item.ItemStack; diff --git a/src/main/java/gregtechfoodoption/worldgen/GTFOFeature.java b/src/main/java/gregtechfoodoption/worldgen/GTFOFeature.java new file mode 100644 index 00000000..a4ce6431 --- /dev/null +++ b/src/main/java/gregtechfoodoption/worldgen/GTFOFeature.java @@ -0,0 +1,66 @@ +package gregtechfoodoption.worldgen; + +import gregtech.api.util.function.TriConsumer; +import gregtechfoodoption.utils.GTFOLog; +import gregtechfoodoption.worldgen.condition.FeatureCondition; +import gregtechfoodoption.worldgen.trees.GTFOTree; +import gregtechfoodoption.worldgen.trees.GTFOTreeGen; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.gen.NoiseGeneratorSimplex; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +public abstract class GTFOFeature { + + private NoiseGeneratorSimplex generatorSimplex; + private final int seed; + public final List featureConditions = new ArrayList<>(); + public static final List FEATURES = new ArrayList<>(); + protected GTFOFeatureGen FEATURE_GROW_INSTANCE; + protected GTFOFeatureGen WORLD_GEN_INSTANCE; + + private int totalChunksChecked; + private int totalChunksPlaced; + public GTFOFeature(int seed) { + this.seed = seed; + FEATURES.add(this); + } + + public void setWorld(World world) { + generatorSimplex = new NoiseGeneratorSimplex(new Random(world.getSeed() + seed)); + } + + public double getRandomStrength(int chunkX, int chunkZ) { + return generatorSimplex.getValue(chunkX * getPerlinScale(), chunkZ * getPerlinScale()); + } + + public double getPerlinScale() { + return 0.04; + } + + // For testing purposes only. + public void updatePlacePercentage(boolean didSucceed) { + totalChunksChecked++; + if (didSucceed) { + totalChunksPlaced++; + } + if (totalChunksChecked % 1000 == 0) { + GTFOLog.logger.info("Feature " + this + " has been placed successfully in chunks " + ((double) totalChunksPlaced / (totalChunksChecked / 100)) + " percent of the time out of " + totalChunksChecked + " chunks checked"); + } + } + + public abstract boolean generate(World world, BlockPos.MutableBlockPos pos, Random random, TriConsumer notifier); + + public GTFOFeatureGen getWorldGenInstance() { + return WORLD_GEN_INSTANCE; + } + + public GTFOFeature addCondition(FeatureCondition condition) { + featureConditions.add(condition); + return this; + } +} diff --git a/src/main/java/gregtechfoodoption/worldgen/GTFOFeatureGen.java b/src/main/java/gregtechfoodoption/worldgen/GTFOFeatureGen.java new file mode 100644 index 00000000..248014f0 --- /dev/null +++ b/src/main/java/gregtechfoodoption/worldgen/GTFOFeatureGen.java @@ -0,0 +1,88 @@ +package gregtechfoodoption.worldgen; + +import gregtech.common.ConfigHolder; +import gregtechfoodoption.worldgen.condition.FeatureCondition; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.chunk.Chunk; +import net.minecraft.world.gen.feature.WorldGenerator; + +import javax.annotation.Nonnull; +import java.util.List; +import java.util.Optional; +import java.util.Random; + +public abstract class GTFOFeatureGen extends WorldGenerator { + public final GTFOFeature feature; + + protected GTFOFeatureGen(boolean notify, GTFOFeature feature) { + super(notify); + this.feature = feature; + } + + @Override + public boolean generate(@Nonnull World world, @Nonnull Random random, @Nonnull BlockPos pos) { + return generateImpl(world, random, new BlockPos.MutableBlockPos(pos)); + } + + public void setBlockSafely(World worldIn, BlockPos pos, IBlockState state) { + if (worldIn.getBlockState(pos).getBlock().canBeReplacedByLeaves(worldIn.getBlockState(pos), worldIn, pos)) { // I assume here, for my sanity, that all wood blocks are already accounted for. + setBlockAndNotifyAdequately(worldIn, pos, state); + } + } + + public int getAmountInChunk(List conditions, int chunkX, int chunkZ, World world, BlockPos pos) { + Biome biome = world.getBiome(pos); + Optional relevantCondition = conditions.stream().filter(biomeCondition -> biomeCondition.isSatisfied(biome)).findFirst(); + double treeStrength = feature.getRandomStrength(chunkX, chunkZ); + if (!ConfigHolder.misc.debug) { + if (relevantCondition.isPresent() && relevantCondition.get().getPerlinCutoff(biome) < treeStrength) { + double perlinCutoff = relevantCondition.get().getPerlinCutoff(biome); + double maxTrees = relevantCondition.get().getMaxFeatures(); + return (int) Math.ceil(maxTrees - perlinCutoff * maxTrees); + } + } else { + if (relevantCondition.isPresent()) { + if (relevantCondition.get().getPerlinCutoff(biome) < treeStrength) { + feature.updatePlacePercentage(true); + double perlinCutoff = relevantCondition.get().getPerlinCutoff(biome); + double maxTrees = relevantCondition.get().getMaxFeatures(); + return (int) Math.ceil(maxTrees - perlinCutoff * maxTrees); + } else { + feature.updatePlacePercentage(false); + } + } + } + return 0; + } + + public boolean generateInChunk(@Nonnull World world, @Nonnull Random random, int chunkX, int chunkZ) { + if (!configOption()) + return false; + Chunk chunk = world.getChunk(chunkX, chunkZ); + int seaLevel = chunk.getWorld().getSeaLevel(); + BlockPos.MutableBlockPos pos = new BlockPos.MutableBlockPos(chunk.getPos().getBlock(8, seaLevel, 8)); + int featureCount = getAmountInChunk(feature.featureConditions, chunkX, chunkZ, world, pos); + if (featureCount > 0) { + for (int j = 0; j < featureCount; j++) { + // Set up position for tree spawn, offset by 8 to prevent cascading + pos.setPos(chunk.x * 16 + random.nextInt(16) + 8, 255, chunk.z * 16 + random.nextInt(16) + 8); + while (world.isAirBlock(pos) && pos.getY() != 0) { + pos.setY(pos.getY() - 1); + } + pos.setY(pos.getY() + 1); + if (!this.generateImpl(chunk.getWorld(), random, pos)) { + featureCount -= 1; + } + } + return true; + } + return false; + } + + public abstract boolean configOption(); + + public abstract boolean generateImpl(World world, Random random, BlockPos.MutableBlockPos pos); +} diff --git a/src/main/java/gregtechfoodoption/worldgen/GTFOWorldGenerator.java b/src/main/java/gregtechfoodoption/worldgen/GTFOWorldGenerator.java index 8bdb8976..071b8815 100644 --- a/src/main/java/gregtechfoodoption/worldgen/GTFOWorldGenerator.java +++ b/src/main/java/gregtechfoodoption/worldgen/GTFOWorldGenerator.java @@ -1,7 +1,7 @@ package gregtechfoodoption.worldgen; import gregtechfoodoption.GTFOConfig; -import gregtechfoodoption.block.GTFOTree; +import gregtechfoodoption.worldgen.trees.GTFOTree; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.ChunkGeneratorFlat; @@ -16,10 +16,10 @@ public class GTFOWorldGenerator implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator iChunkGenerator, IChunkProvider iChunkProvider) { - if (!(iChunkGenerator instanceof ChunkGeneratorFlat) && GTFOConfig.enableGTFOTrees) { - for (GTFOTree tree : GTFOTree.TREES) { - tree.setWorld(world); - tree.getWorldGenInstance().generateInChunk(world, random, chunkX, chunkZ); + if (!(iChunkGenerator instanceof ChunkGeneratorFlat)) { + for (GTFOFeature feature : GTFOFeature.FEATURES) { + feature.setWorld(world); + feature.getWorldGenInstance().generateInChunk(world, random, chunkX, chunkZ); } } } diff --git a/src/main/java/gregtechfoodoption/worldgen/berries/GTFOBerries.java b/src/main/java/gregtechfoodoption/worldgen/berries/GTFOBerries.java new file mode 100644 index 00000000..9d0c19ce --- /dev/null +++ b/src/main/java/gregtechfoodoption/worldgen/berries/GTFOBerries.java @@ -0,0 +1,32 @@ +package gregtechfoodoption.worldgen.berries; + +import gregtechfoodoption.block.GTFOCrops; +import gregtechfoodoption.worldgen.GTFOFeature; +import gregtechfoodoption.worldgen.condition.TemperatureRainfallCondition; + +public class GTFOBerries { + public static GTFOFeature BUSH_BLUEBERRY = new GTFOBerry(1000, GTFOCrops.BUSH_BLUEBERRY) + .addCondition(new TemperatureRainfallCondition(3, 1.2, 0.7, 0.5, 0.5)); + public static GTFOFeature BUSH_BLACKBERRY = new GTFOBerry(1001, GTFOCrops.BUSH_BLACKBERRY) + .addCondition(new TemperatureRainfallCondition(3, 1.2, 0.5, 0.4, 0.5)); + public static GTFOFeature BUSH_RASPBERRY = new GTFOBerry(1002, GTFOCrops.BUSH_RASPBERRY) + .addCondition(new TemperatureRainfallCondition(3, 1.2, 0.5, 0.5, 0.4)); + public static GTFOFeature BUSH_STRAWBERRY = new GTFOBerry(1003, GTFOCrops.BUSH_STRAWBERRY) + .addCondition(new TemperatureRainfallCondition(3, 1.2, 0.7, 0.8, 0.5)); + public static GTFOFeature BUSH_RED_CURRANT = new GTFOBerry(1004, GTFOCrops.BUSH_RED_CURRANT) + .addCondition(new TemperatureRainfallCondition(3, 0.9, 0.3, 0.75, 0.5)); + public static GTFOFeature BUSH_BLACK_CURRANT = new GTFOBerry(1005, GTFOCrops.BUSH_BLACK_CURRANT) + .addCondition(new TemperatureRainfallCondition(3, 0.9, 0.3, 0.75, 0.5)); + public static GTFOFeature BUSH_WHITE_CURRANT = new GTFOBerry(1006, GTFOCrops.BUSH_WHITE_CURRANT) + .addCondition(new TemperatureRainfallCondition(3, 0.9, 0.3, 0.75, 0.5)); + public static GTFOFeature BUSH_LINGONBERRY = new GTFOBerry(1007, GTFOCrops.BUSH_LINGONBERRY) + .addCondition(new TemperatureRainfallCondition(3, 0.9, 0.25, 0.7, 0.6)); + public static GTFOFeature BUSH_ELDERBERRY = new GTFOBerry(1008, GTFOCrops.BUSH_ELDERBERRY) + .addCondition(new TemperatureRainfallCondition(3, 0.9, 0.2, 0.4, 0.6)); + public static GTFOFeature BUSH_CRANBERRY = new GTFOBerry(1009, GTFOCrops.BUSH_CRANBERRY) + .addCondition(new TemperatureRainfallCondition(3, 1.2, 0.2, 0.4, 0.6)); + + public static void init() { + + } +} diff --git a/src/main/java/gregtechfoodoption/worldgen/berries/GTFOBerry.java b/src/main/java/gregtechfoodoption/worldgen/berries/GTFOBerry.java new file mode 100644 index 00000000..d2dab74f --- /dev/null +++ b/src/main/java/gregtechfoodoption/worldgen/berries/GTFOBerry.java @@ -0,0 +1,59 @@ +package gregtechfoodoption.worldgen.berries; + +import gregtech.api.util.function.TriConsumer; +import gregtechfoodoption.block.GTFOBerryBush; +import gregtechfoodoption.worldgen.GTFOFeature; +import gregtechfoodoption.worldgen.trees.GTFOTreeGen; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.init.Blocks; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +import java.util.Random; + +public class GTFOBerry extends GTFOFeature { + public final GTFOBerryBush berryBush; + + public GTFOBerry(int seed, GTFOBerryBush berryBush) { + super(seed); + this.berryBush = berryBush; + this.WORLD_GEN_INSTANCE = new GTFOBerryGen(this); + } + + @Override + public boolean generate(World world, BlockPos.MutableBlockPos pos, Random random, TriConsumer notifier) { + if (canGrowAt(world, pos)) { + notifier.accept(world, pos, berryBush.withAge(2)); + for (int i = 0; i < random.nextInt(3); i++) { + BlockPos other = pos.add(random.nextInt(5) - 2, random.nextInt(5) - 2, 0); + if (canGrowAt(world, other)) { + notifier.accept(world, other, berryBush.withAge(2)); + } + } + return true; + } + + return false; + } + + protected boolean canGrowInto(Block blockType) { + Material material = blockType.getDefaultState().getMaterial(); + return material == Material.AIR || blockType == Blocks.VINE || material == Material.SNOW; + } + + protected boolean canGrowAt(World world, BlockPos pos) { + if (pos.getY() >= 1 && pos.getY() < world.getHeight()) { + IBlockState soilState = world.getBlockState(pos.down()); + IBlockState currentState = world.getBlockState(pos); + return canGrowInto(currentState.getBlock()) && soilState.getBlock().canSustainPlant(soilState, world, pos.down(), EnumFacing.UP, berryBush); + } + return false; + } + + public String toString() { + return "Berry " + berryBush.getRegistryName(); + } +} diff --git a/src/main/java/gregtechfoodoption/worldgen/berries/GTFOBerryGen.java b/src/main/java/gregtechfoodoption/worldgen/berries/GTFOBerryGen.java new file mode 100644 index 00000000..8b9ef147 --- /dev/null +++ b/src/main/java/gregtechfoodoption/worldgen/berries/GTFOBerryGen.java @@ -0,0 +1,26 @@ +package gregtechfoodoption.worldgen.berries; + +import gregtechfoodoption.GTFOConfig; +import gregtechfoodoption.worldgen.GTFOFeatureGen; +import net.minecraft.block.state.IBlockState; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import org.jetbrains.annotations.NotNull; + +import java.util.Random; + +public class GTFOBerryGen extends GTFOFeatureGen { + public GTFOBerryGen(GTFOBerry berry) { + super(true, berry); + } + + @Override + public boolean configOption() { + return GTFOConfig.gtfoWorldgenConfig.enableGTFOBerries; + } + + @Override + public boolean generateImpl(World world, Random random, BlockPos.MutableBlockPos pos) { + return feature.generate(world, pos, random, this::setBlockSafely); + } +} diff --git a/src/main/java/gregtechfoodoption/worldgen/trees/condition/BiomeCondition.java b/src/main/java/gregtechfoodoption/worldgen/condition/BiomeCondition.java similarity index 86% rename from src/main/java/gregtechfoodoption/worldgen/trees/condition/BiomeCondition.java rename to src/main/java/gregtechfoodoption/worldgen/condition/BiomeCondition.java index 720ef30c..065a2fb9 100644 --- a/src/main/java/gregtechfoodoption/worldgen/trees/condition/BiomeCondition.java +++ b/src/main/java/gregtechfoodoption/worldgen/condition/BiomeCondition.java @@ -1,10 +1,10 @@ -package gregtechfoodoption.worldgen.trees.condition; +package gregtechfoodoption.worldgen.condition; import net.minecraft.world.biome.Biome; import java.util.Arrays; -public class BiomeCondition extends TreeCondition { +public class BiomeCondition extends FeatureCondition { private Biome[] biomes; private double perlinCutoff; diff --git a/src/main/java/gregtechfoodoption/worldgen/trees/condition/TreeCondition.java b/src/main/java/gregtechfoodoption/worldgen/condition/FeatureCondition.java similarity index 70% rename from src/main/java/gregtechfoodoption/worldgen/trees/condition/TreeCondition.java rename to src/main/java/gregtechfoodoption/worldgen/condition/FeatureCondition.java index eb654a94..ac36c9fa 100644 --- a/src/main/java/gregtechfoodoption/worldgen/trees/condition/TreeCondition.java +++ b/src/main/java/gregtechfoodoption/worldgen/condition/FeatureCondition.java @@ -1,12 +1,12 @@ -package gregtechfoodoption.worldgen.trees.condition; +package gregtechfoodoption.worldgen.condition; import net.minecraft.world.biome.Biome; -public abstract class TreeCondition { +public abstract class FeatureCondition { private final int maxAmount; - public TreeCondition(int maxAmount) { + public FeatureCondition(int maxAmount) { this.maxAmount = maxAmount; } @@ -20,7 +20,7 @@ public TreeCondition(int maxAmount) { */ public abstract double getPerlinCutoff(Biome biome); - public double getMaxTrees() { + public double getMaxFeatures() { return maxAmount; } } diff --git a/src/main/java/gregtechfoodoption/worldgen/trees/condition/TemperatureRainfallCondition.java b/src/main/java/gregtechfoodoption/worldgen/condition/TemperatureRainfallCondition.java similarity index 88% rename from src/main/java/gregtechfoodoption/worldgen/trees/condition/TemperatureRainfallCondition.java rename to src/main/java/gregtechfoodoption/worldgen/condition/TemperatureRainfallCondition.java index 2c1786d2..7f6fd0ec 100644 --- a/src/main/java/gregtechfoodoption/worldgen/trees/condition/TemperatureRainfallCondition.java +++ b/src/main/java/gregtechfoodoption/worldgen/condition/TemperatureRainfallCondition.java @@ -1,8 +1,8 @@ -package gregtechfoodoption.worldgen.trees.condition; +package gregtechfoodoption.worldgen.condition; import net.minecraft.world.biome.Biome; -public class TemperatureRainfallCondition extends TreeCondition { +public class TemperatureRainfallCondition extends FeatureCondition { private double optimalTemp; private double optimalRain; private double range; diff --git a/src/main/java/gregtechfoodoption/worldgen/trees/ApricotTree.java b/src/main/java/gregtechfoodoption/worldgen/trees/ApricotTree.java index 76231bdc..57624a7c 100644 --- a/src/main/java/gregtechfoodoption/worldgen/trees/ApricotTree.java +++ b/src/main/java/gregtechfoodoption/worldgen/trees/ApricotTree.java @@ -2,10 +2,9 @@ import gregtech.api.util.function.TriConsumer; import gregtechfoodoption.GTFOValues; -import gregtechfoodoption.block.GTFOTree; import gregtechfoodoption.utils.GTFOUtils; -import gregtechfoodoption.worldgen.trees.condition.BiomeCondition; -import gregtechfoodoption.worldgen.trees.condition.TemperatureRainfallCondition; +import gregtechfoodoption.worldgen.condition.BiomeCondition; +import gregtechfoodoption.worldgen.condition.TemperatureRainfallCondition; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Biomes; import net.minecraft.item.ItemStack; @@ -24,7 +23,7 @@ public ApricotTree() { super("apricot", 3); this.addCondition(new BiomeCondition(Biomes.MUTATED_SAVANNA, 4, 0.40)); this.addCondition(new BiomeCondition(Biomes.SAVANNA, 2, 0.55)); - this.addCondition(new TemperatureRainfallCondition(2, 0.40, 1.2, 0.05, 0.2)); + this.addCondition(new TemperatureRainfallCondition(2, 1.20, 1.2, 0.05, 0.2)); } @Override diff --git a/src/main/java/gregtechfoodoption/worldgen/trees/BananaTree.java b/src/main/java/gregtechfoodoption/worldgen/trees/BananaTree.java index 1b164073..53b97c60 100644 --- a/src/main/java/gregtechfoodoption/worldgen/trees/BananaTree.java +++ b/src/main/java/gregtechfoodoption/worldgen/trees/BananaTree.java @@ -2,10 +2,9 @@ import gregtech.api.util.function.TriConsumer; import gregtechfoodoption.GTFOValues; -import gregtechfoodoption.block.GTFOTree; import gregtechfoodoption.utils.GTFOUtils; -import gregtechfoodoption.worldgen.trees.condition.BiomeCondition; -import gregtechfoodoption.worldgen.trees.condition.TemperatureRainfallCondition; +import gregtechfoodoption.worldgen.condition.BiomeCondition; +import gregtechfoodoption.worldgen.condition.TemperatureRainfallCondition; import net.minecraft.block.BlockLog; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Biomes; @@ -31,7 +30,7 @@ public BananaTree() { this.addCondition(new BiomeCondition(Biomes.JUNGLE_HILLS, 5, 0.35)); this.addCondition(new BiomeCondition(Biomes.MUTATED_JUNGLE, 5, 0.3)); this.addCondition(new BiomeCondition(Biomes.MUTATED_JUNGLE_EDGE, 5, 0.15)); - this.addCondition(new TemperatureRainfallCondition(5, 0.6, 0.8, 0.8, 0.4)); + this.addCondition(new TemperatureRainfallCondition(5, 1.5, 0.8, 0.8, 0.4)); } protected void generateLeaves(World world, BlockPos.MutableBlockPos pos, int height, Random random, TriConsumer notifier) { diff --git a/src/main/java/gregtechfoodoption/block/GTFOTree.java b/src/main/java/gregtechfoodoption/worldgen/trees/GTFOTree.java similarity index 86% rename from src/main/java/gregtechfoodoption/block/GTFOTree.java rename to src/main/java/gregtechfoodoption/worldgen/trees/GTFOTree.java index 09be3d0c..c938d78e 100644 --- a/src/main/java/gregtechfoodoption/block/GTFOTree.java +++ b/src/main/java/gregtechfoodoption/worldgen/trees/GTFOTree.java @@ -1,4 +1,4 @@ -package gregtechfoodoption.block; +package gregtechfoodoption.worldgen.trees; import gregtech.api.unification.material.Materials; import gregtech.api.unification.ore.OrePrefix; @@ -7,13 +7,15 @@ import gregtech.common.items.MetaItems; import gregtech.loaders.WoodTypeEntry; import gregtechfoodoption.GTFOValues; +import gregtechfoodoption.block.GTFOMetaBlocks; import gregtechfoodoption.block.tree.GTFOBlockLeaves; import gregtechfoodoption.block.tree.GTFOBlockLog; import gregtechfoodoption.block.tree.GTFOBlockSapling; import gregtechfoodoption.utils.GTFOLog; import gregtechfoodoption.utils.GTFOUtils; -import gregtechfoodoption.worldgen.trees.condition.TreeCondition; -import gregtechfoodoption.worldgen.trees.GTFOTreeGen; +import gregtechfoodoption.worldgen.GTFOFeature; +import gregtechfoodoption.worldgen.GTFOFeatureGen; +import gregtechfoodoption.worldgen.condition.FeatureCondition; import net.minecraft.block.Block; import net.minecraft.block.BlockLog; import net.minecraft.block.material.Material; @@ -39,52 +41,27 @@ import static net.minecraft.block.BlockLeaves.CHECK_DECAY; import static net.minecraft.block.BlockLeaves.DECAYABLE; -public abstract class GTFOTree { +public abstract class GTFOTree extends GTFOFeature { public final String name; - protected GTFOTreeGen TREE_GROW_INSTANCE; - protected GTFOTreeGen WORLD_GEN_INSTANCE; - - private int totalChunksChecked; - private int totalChunksPlaced; public IBlockState logState; public IBlockState leavesState; public IBlockState saplingState; - private NoiseGeneratorSimplex generatorSimplex; private final int seed; - public final List treeConditions = new ArrayList<>(); public static final List TREES = new ArrayList<>(); public GTFOTree(String name, int seed) { + super(seed); this.name = name; this.seed = seed; - this.TREE_GROW_INSTANCE = new GTFOTreeGen(true, this); + this.FEATURE_GROW_INSTANCE = new GTFOTreeGen(true, this); this.WORLD_GEN_INSTANCE = new GTFOTreeGen(false, this); TREES.add(this); } - public void setWorld(World world) { - generatorSimplex = new NoiseGeneratorSimplex(new Random(world.getSeed() + seed)); - } - - public double getRandomStrength(int chunkX, int chunkZ) { - return generatorSimplex.getValue(chunkX * getPerlinScale(), chunkZ * getPerlinScale()); - } - - // For testing purposes only. - public void updatePlacePercentage(boolean didSucceed) { - totalChunksChecked++; - if (didSucceed) { - totalChunksPlaced++; - } - if (totalChunksChecked % 1000 == 0) { - GTFOLog.logger.info("Tree " + this.name + " has been placed successfully in chunks " + ((double) totalChunksPlaced / (totalChunksChecked / 100)) + " percent of the time out of " + totalChunksChecked + " chunks checked"); - } - } - - public boolean grow(World world, BlockPos.MutableBlockPos pos, Random random, TriConsumer notifier) { + public boolean generate(World world, BlockPos.MutableBlockPos pos, Random random, TriConsumer notifier) { int minHeight = getMinTrunkHeight(random); // Check if tree fits in world @@ -106,18 +83,13 @@ public int getMinTrunkHeight(Random random) { return random.nextInt(3) + 5; } - public GTFOTreeGen getTreeGrowInstance() { - return TREE_GROW_INSTANCE; + public GTFOFeatureGen getTreeGrowInstance() { + return FEATURE_GROW_INSTANCE; } - public GTFOTreeGen getWorldGenInstance() { - return WORLD_GEN_INSTANCE; - } - public GTFOTree addCondition(TreeCondition condition) { - treeConditions.add(condition); - return this; - } + + public void setupBlocks() { GTFOBlockLeaves leaves = GTFOMetaBlocks.GTFO_LEAVES.get(seed / 4); @@ -284,10 +256,6 @@ protected IBlockState getNaturalLeavesState() { return this.leavesState.withProperty(DECAYABLE, true).withProperty(CHECK_DECAY, true); } - public double getPerlinScale() { - return 0.04; - } - public ItemStack getApple() { return ItemStack.EMPTY; } diff --git a/src/main/java/gregtechfoodoption/worldgen/trees/GTFOTreeGen.java b/src/main/java/gregtechfoodoption/worldgen/trees/GTFOTreeGen.java index d3d94a1e..d0edcd5c 100644 --- a/src/main/java/gregtechfoodoption/worldgen/trees/GTFOTreeGen.java +++ b/src/main/java/gregtechfoodoption/worldgen/trees/GTFOTreeGen.java @@ -1,34 +1,20 @@ package gregtechfoodoption.worldgen.trees; -import gregtech.common.ConfigHolder; -import gregtechfoodoption.block.GTFOTree; -import gregtechfoodoption.worldgen.trees.condition.TreeCondition; -import net.minecraft.block.state.IBlockState; +import gregtechfoodoption.GTFOConfig; +import gregtechfoodoption.worldgen.GTFOFeatureGen; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import net.minecraft.world.biome.Biome; import net.minecraft.world.chunk.Chunk; -import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.terraingen.SaplingGrowTreeEvent; import net.minecraftforge.fml.common.eventhandler.Event; import javax.annotation.Nonnull; -import java.util.List; -import java.util.Optional; import java.util.Random; -public class GTFOTreeGen extends WorldGenerator { - public final GTFOTree tree; - +public class GTFOTreeGen extends GTFOFeatureGen { public GTFOTreeGen(boolean notify, GTFOTree tree) { - super(notify); - this.tree = tree; - } - - @Override - public boolean generate(@Nonnull World world, @Nonnull Random random, @Nonnull BlockPos pos) { - return generateImpl(world, random, new BlockPos.MutableBlockPos(pos)); + super(notify, tree); } public boolean generateImpl(@Nonnull World world, @Nonnull Random random, BlockPos.MutableBlockPos pos) { @@ -37,61 +23,11 @@ public boolean generateImpl(@Nonnull World world, @Nonnull Random random, BlockP if (event.getResult() == Event.Result.DENY) { return false; } - return tree.grow(world, pos, random, this::setBlockSafely); - } - - public void setBlockSafely(World worldIn, BlockPos pos, IBlockState state) { - if (worldIn.getBlockState(pos).getBlock().canBeReplacedByLeaves(worldIn.getBlockState(pos), worldIn, pos)) { // I assume here, for my sanity, that all wood blocks are already accounted for. - setBlockAndNotifyAdequately(worldIn, pos, state); - } - } - - public boolean generateInChunk(@Nonnull World world, @Nonnull Random random, int chunkX, int chunkZ) { - Chunk chunk = world.getChunk(chunkX, chunkZ); - int seaLevel = chunk.getWorld().getSeaLevel(); - BlockPos.MutableBlockPos pos = new BlockPos.MutableBlockPos(chunk.getPos().getBlock(8, seaLevel, 8)); - int treeCount = getAmountInChunk(tree.treeConditions, chunkX, chunkZ, world, pos); - if (treeCount > 0) { - for (int j = 0; j < treeCount; j++) { - // Set up position for tree spawn, offset by 8 to prevent cascading - pos.setPos(chunk.x * 16 + random.nextInt(16) + 8, 255, chunk.z * 16 + random.nextInt(16) + 8); - while (world.isAirBlock(pos) && pos.getY() != 0) { - pos.setY(pos.getY() - 1); - } - pos.setY(pos.getY() + 1); - SaplingGrowTreeEvent event = new SaplingGrowTreeEvent(world, random, pos); - MinecraftForge.TERRAIN_GEN_BUS.post(event); - if (event.getResult() == Event.Result.DENY || !this.generateImpl(chunk.getWorld(), random, pos)) { - treeCount -= 1; - } - } - return true; - } - return false; + return feature.generate(world, pos, random, this::setBlockSafely); } - public int getAmountInChunk(List conditions, int chunkX, int chunkZ, World world, BlockPos pos) { - Biome biome = world.getBiome(pos); - Optional relevantCondition = conditions.stream().filter(biomeCondition -> biomeCondition.isSatisfied(biome)).findFirst(); - double treeStrength = tree.getRandomStrength(chunkX, chunkZ); - if (!ConfigHolder.misc.debug) { - if (relevantCondition.isPresent() && relevantCondition.get().getPerlinCutoff(biome) < treeStrength) { - double perlinCutoff = relevantCondition.get().getPerlinCutoff(biome); - double maxTrees = relevantCondition.get().getMaxTrees(); - return (int) Math.ceil(maxTrees - perlinCutoff * maxTrees); - } - } else { - if (relevantCondition.isPresent()) { - if (relevantCondition.get().getPerlinCutoff(biome) < treeStrength) { - tree.updatePlacePercentage(true); - double perlinCutoff = relevantCondition.get().getPerlinCutoff(biome); - double maxTrees = relevantCondition.get().getMaxTrees(); - return (int) Math.ceil(maxTrees - perlinCutoff * maxTrees); - } else { - tree.updatePlacePercentage(false); - } - } - } - return 0; + @Override + public boolean configOption() { + return GTFOConfig.gtfoWorldgenConfig.enableGTFOTrees; } } diff --git a/src/main/java/gregtechfoodoption/block/GTFOTrees.java b/src/main/java/gregtechfoodoption/worldgen/trees/GTFOTrees.java similarity index 95% rename from src/main/java/gregtechfoodoption/block/GTFOTrees.java rename to src/main/java/gregtechfoodoption/worldgen/trees/GTFOTrees.java index 0cbd0a48..ccf71cbe 100644 --- a/src/main/java/gregtechfoodoption/block/GTFOTrees.java +++ b/src/main/java/gregtechfoodoption/worldgen/trees/GTFOTrees.java @@ -1,4 +1,4 @@ -package gregtechfoodoption.block; +package gregtechfoodoption.worldgen.trees; import gregtechfoodoption.worldgen.trees.*; diff --git a/src/main/java/gregtechfoodoption/worldgen/trees/LemonTree.java b/src/main/java/gregtechfoodoption/worldgen/trees/LemonTree.java index b8368b79..676fdd00 100644 --- a/src/main/java/gregtechfoodoption/worldgen/trees/LemonTree.java +++ b/src/main/java/gregtechfoodoption/worldgen/trees/LemonTree.java @@ -2,10 +2,9 @@ import gregtech.api.util.function.TriConsumer; import gregtechfoodoption.GTFOValues; -import gregtechfoodoption.block.GTFOTree; import gregtechfoodoption.utils.GTFOUtils; -import gregtechfoodoption.worldgen.trees.condition.BiomeCondition; -import gregtechfoodoption.worldgen.trees.condition.TemperatureRainfallCondition; +import gregtechfoodoption.worldgen.condition.BiomeCondition; +import gregtechfoodoption.worldgen.condition.TemperatureRainfallCondition; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Biomes; import net.minecraft.item.ItemStack; @@ -24,7 +23,7 @@ public LemonTree() { super("lemon", 4); this.addCondition(new BiomeCondition(Biomes.JUNGLE_EDGE, 3, 0.4)); this.addCondition(new BiomeCondition(Biomes.FOREST, 1, 0.65)); - this.addCondition(new TemperatureRainfallCondition(5, 0.4, 0.7, 0.7, 0.3)); + this.addCondition(new TemperatureRainfallCondition(5, 1.2, 0.7, 0.7, 0.3)); } diff --git a/src/main/java/gregtechfoodoption/worldgen/trees/LimeTree.java b/src/main/java/gregtechfoodoption/worldgen/trees/LimeTree.java index 7b655ace..b83d345f 100644 --- a/src/main/java/gregtechfoodoption/worldgen/trees/LimeTree.java +++ b/src/main/java/gregtechfoodoption/worldgen/trees/LimeTree.java @@ -2,10 +2,9 @@ import gregtech.api.util.function.TriConsumer; import gregtechfoodoption.GTFOValues; -import gregtechfoodoption.block.GTFOTree; import gregtechfoodoption.utils.GTFOUtils; -import gregtechfoodoption.worldgen.trees.condition.BiomeCondition; -import gregtechfoodoption.worldgen.trees.condition.TemperatureRainfallCondition; +import gregtechfoodoption.worldgen.condition.BiomeCondition; +import gregtechfoodoption.worldgen.condition.TemperatureRainfallCondition; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Biomes; import net.minecraft.item.ItemStack; @@ -24,7 +23,7 @@ public LimeTree() { super("lime", 5); this.addCondition(new BiomeCondition(Biomes.JUNGLE, 3, 0.3)); this.addCondition(new BiomeCondition(Biomes.MUTATED_JUNGLE, 4, 0.3)); - this.addCondition(new TemperatureRainfallCondition(5, 0.4, 0.8, 0.85, 0.3)); + this.addCondition(new TemperatureRainfallCondition(5, 1.2, 0.8, 0.85, 0.3)); } @Override diff --git a/src/main/java/gregtechfoodoption/worldgen/trees/MangoTree.java b/src/main/java/gregtechfoodoption/worldgen/trees/MangoTree.java index fc5d9879..b42d7b29 100644 --- a/src/main/java/gregtechfoodoption/worldgen/trees/MangoTree.java +++ b/src/main/java/gregtechfoodoption/worldgen/trees/MangoTree.java @@ -2,10 +2,9 @@ import gregtech.api.util.function.TriConsumer; import gregtechfoodoption.GTFOValues; -import gregtechfoodoption.block.GTFOTree; import gregtechfoodoption.utils.GTFOUtils; -import gregtechfoodoption.worldgen.trees.condition.BiomeCondition; -import gregtechfoodoption.worldgen.trees.condition.TemperatureRainfallCondition; +import gregtechfoodoption.worldgen.condition.BiomeCondition; +import gregtechfoodoption.worldgen.condition.TemperatureRainfallCondition; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Biomes; import net.minecraft.item.ItemStack; @@ -24,7 +23,7 @@ public class MangoTree extends GTFOTree { public MangoTree() { super("mango", 2); this.addCondition(new BiomeCondition(new Biome[]{Biomes.MUTATED_JUNGLE_EDGE, Biomes.JUNGLE_EDGE}, 4, 0.2)); - this.addCondition(new TemperatureRainfallCondition(2, 0.5, 0.9, 0.9, 0.3)); + this.addCondition(new TemperatureRainfallCondition(2, 1.5, 0.9, 0.9, 0.3)); } @Override diff --git a/src/main/java/gregtechfoodoption/worldgen/trees/NutmegTree.java b/src/main/java/gregtechfoodoption/worldgen/trees/NutmegTree.java index ab522409..bffd667e 100644 --- a/src/main/java/gregtechfoodoption/worldgen/trees/NutmegTree.java +++ b/src/main/java/gregtechfoodoption/worldgen/trees/NutmegTree.java @@ -2,10 +2,9 @@ import gregtech.api.util.function.TriConsumer; import gregtechfoodoption.GTFOValues; -import gregtechfoodoption.block.GTFOTree; import gregtechfoodoption.utils.GTFOUtils; -import gregtechfoodoption.worldgen.trees.condition.BiomeCondition; -import gregtechfoodoption.worldgen.trees.condition.TemperatureRainfallCondition; +import gregtechfoodoption.worldgen.condition.BiomeCondition; +import gregtechfoodoption.worldgen.condition.TemperatureRainfallCondition; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Biomes; import net.minecraft.item.ItemStack; @@ -24,7 +23,7 @@ public class NutmegTree extends GTFOTree { public NutmegTree() { super("nutmeg", 8); this.addCondition(new BiomeCondition(Biomes.JUNGLE, 3, 0.3)); - this.addCondition(new TemperatureRainfallCondition(3, 0.4, 0.85, 1.0, 0.3)); + this.addCondition(new TemperatureRainfallCondition(3, 1.2, 0.85, 1.0, 0.3)); } diff --git a/src/main/java/gregtechfoodoption/worldgen/trees/OliveTree.java b/src/main/java/gregtechfoodoption/worldgen/trees/OliveTree.java index 553b2a3c..c2f24177 100644 --- a/src/main/java/gregtechfoodoption/worldgen/trees/OliveTree.java +++ b/src/main/java/gregtechfoodoption/worldgen/trees/OliveTree.java @@ -2,10 +2,9 @@ import gregtech.api.util.function.TriConsumer; import gregtechfoodoption.GTFOValues; -import gregtechfoodoption.block.GTFOTree; import gregtechfoodoption.utils.GTFOUtils; -import gregtechfoodoption.worldgen.trees.condition.BiomeCondition; -import gregtechfoodoption.worldgen.trees.condition.TemperatureRainfallCondition; +import gregtechfoodoption.worldgen.condition.BiomeCondition; +import gregtechfoodoption.worldgen.condition.TemperatureRainfallCondition; import net.minecraft.block.BlockLog; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Biomes; @@ -27,7 +26,7 @@ public OliveTree() { this.addCondition(new BiomeCondition(Biomes.BIRCH_FOREST, 5, 0.55)); this.addCondition(new BiomeCondition(Biomes.FOREST, 2, 0.65)); this.addCondition(new BiomeCondition(Biomes.PLAINS, 1, 0.88)); - this.addCondition(new TemperatureRainfallCondition(3, 0.5, 0.6, 0.6, 0.3)); + this.addCondition(new TemperatureRainfallCondition(3, 1.5, 0.6, 0.6, 0.3)); } diff --git a/src/main/java/gregtechfoodoption/worldgen/trees/OrangeTree.java b/src/main/java/gregtechfoodoption/worldgen/trees/OrangeTree.java index 42dd1491..158efb88 100644 --- a/src/main/java/gregtechfoodoption/worldgen/trees/OrangeTree.java +++ b/src/main/java/gregtechfoodoption/worldgen/trees/OrangeTree.java @@ -2,10 +2,9 @@ import gregtech.api.util.function.TriConsumer; import gregtechfoodoption.GTFOValues; -import gregtechfoodoption.block.GTFOTree; import gregtechfoodoption.utils.GTFOUtils; -import gregtechfoodoption.worldgen.trees.condition.BiomeCondition; -import gregtechfoodoption.worldgen.trees.condition.TemperatureRainfallCondition; +import gregtechfoodoption.worldgen.condition.BiomeCondition; +import gregtechfoodoption.worldgen.condition.TemperatureRainfallCondition; import net.minecraft.block.BlockLog; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Biomes; @@ -26,7 +25,7 @@ public OrangeTree() { super("orange", 1); this.addCondition(new BiomeCondition(Biomes.SAVANNA_PLATEAU, 6, 0.25)); this.addCondition(new BiomeCondition(Biomes.SAVANNA, 3, 0.45)); - this.addCondition(new TemperatureRainfallCondition(3, 0.40, 1.15, 0.0, 0.2)); + this.addCondition(new TemperatureRainfallCondition(3, 1.2, 1.15, 0.0, 0.2)); } @Override diff --git a/src/main/java/gregtechfoodoption/worldgen/trees/RainbowwoodTree.java b/src/main/java/gregtechfoodoption/worldgen/trees/RainbowwoodTree.java index 9bae1839..fdcc3483 100644 --- a/src/main/java/gregtechfoodoption/worldgen/trees/RainbowwoodTree.java +++ b/src/main/java/gregtechfoodoption/worldgen/trees/RainbowwoodTree.java @@ -1,10 +1,9 @@ package gregtechfoodoption.worldgen.trees; import gregtech.api.util.function.TriConsumer; -import gregtechfoodoption.block.GTFOTree; import gregtechfoodoption.utils.GTFOUtils; -import gregtechfoodoption.worldgen.trees.condition.BiomeCondition; -import gregtechfoodoption.worldgen.trees.condition.TemperatureRainfallCondition; +import gregtechfoodoption.worldgen.condition.BiomeCondition; +import gregtechfoodoption.worldgen.condition.TemperatureRainfallCondition; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Biomes; import net.minecraft.item.ItemStack; @@ -50,7 +49,7 @@ public RainbowwoodTree() { super("rainbowwood", 7); this.addCondition(new BiomeCondition(Biomes.PLAINS, 5, 0.89)); this.addCondition(new BiomeCondition(Biomes.MUTATED_PLAINS, 5, 0.89)); - this.addCondition(new TemperatureRainfallCondition(5, 0.11, 0.8, 0.4, 0.1)); + this.addCondition(new TemperatureRainfallCondition(5, 0.5, 0.8, 0.4, 0.1)); } @Override diff --git a/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/black_currant.json b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/black_currant.json new file mode 100644 index 00000000..22f11c5d --- /dev/null +++ b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/black_currant.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gregtech:items/metaitems/food/berry/black_currant" + } +} diff --git a/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/blackberry.json b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/blackberry.json new file mode 100644 index 00000000..457cae3a --- /dev/null +++ b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/blackberry.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gregtech:items/metaitems/food/berry/blackberry" + } +} diff --git a/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/blueberry.json b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/blueberry.json new file mode 100644 index 00000000..30015798 --- /dev/null +++ b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/blueberry.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gregtech:items/metaitems/food/berry/blueberry" + } +} diff --git a/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/cranberry.json b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/cranberry.json new file mode 100644 index 00000000..3ddc4918 --- /dev/null +++ b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/cranberry.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gregtech:items/metaitems/food/berry/cranberry" + } +} diff --git a/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/elderberry.json b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/elderberry.json new file mode 100644 index 00000000..624bcca1 --- /dev/null +++ b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/elderberry.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gregtech:items/metaitems/food/berry/elderberry" + } +} diff --git a/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/lingonberry.json b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/lingonberry.json new file mode 100644 index 00000000..ee0dcaa2 --- /dev/null +++ b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/lingonberry.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gregtech:items/metaitems/food/berry/lingonberry" + } +} diff --git a/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/raspberry.json b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/raspberry.json new file mode 100644 index 00000000..0837f6bb --- /dev/null +++ b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/raspberry.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gregtech:items/metaitems/food/berry/raspberry" + } +} diff --git a/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/red_currant.json b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/red_currant.json new file mode 100644 index 00000000..87740928 --- /dev/null +++ b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/red_currant.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gregtech:items/metaitems/food/berry/red_currant" + } +} diff --git a/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/strawberry.json b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/strawberry.json new file mode 100644 index 00000000..6db5d0e0 --- /dev/null +++ b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/strawberry.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gregtech:items/metaitems/food/berry/strawberry" + } +} diff --git a/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/white_currant.json b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/white_currant.json new file mode 100644 index 00000000..1d90d2e7 --- /dev/null +++ b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry/white_currant.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gregtech:items/metaitems/food/berry/white_currant" + } +} diff --git a/src/main/resources/assets/gregtech/models/item/metaitems/food/berry_medley.json b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry_medley.json new file mode 100644 index 00000000..2d4b6ad8 --- /dev/null +++ b/src/main/resources/assets/gregtech/models/item/metaitems/food/berry_medley.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gregtech:items/metaitems/food/berry_medley" + } +} diff --git a/src/main/resources/assets/gregtech/models/item/metaitems/food/etirps_cranberry.json b/src/main/resources/assets/gregtech/models/item/metaitems/food/etirps_cranberry.json new file mode 100644 index 00000000..a13cd2bb --- /dev/null +++ b/src/main/resources/assets/gregtech/models/item/metaitems/food/etirps_cranberry.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gregtech:items/metaitems/food/etirps_cranberry" + } +} diff --git a/src/main/resources/assets/gregtech/textures/items/metaitems/food/berry/black_currant.png b/src/main/resources/assets/gregtech/textures/items/metaitems/food/berry/black_currant.png new file mode 100644 index 0000000000000000000000000000000000000000..ef1a189065bbd20a024c1358fe2309f4b8c48abf GIT binary patch literal 488 zcmVP)?DnCEK*wuim(w; z(JDoX1T2zu!!TqWpPQY1`z*$N%%8+~%6soQoO|wtOW+5g@q^G@)}O#B7q+$=#t%X> zzp%*C(lS?xNPve=8wTLI3u~(b;WbAF;Ae7nm4PZIVy@TvuN4GfZLV(~0??1M=Hrcl zm<;B{PP_ZIF8m-g%l96jRKi~8t!-{?H%vdyMEoE$?e+@CCtc3ZhkW_mv2${i{zj<; zrILcRwbg+YdiDrQ)_Pc&lW}w;-oJZoWPO^`?!L%dUEe&UAH#S&x{z!$$nQD7u*mGJ z%UsiAcX!9;@?@iltTzCNdIy$Q`2zs0Q;tu%c9nh%XYqFt^$vvN$ikD!JaIf80aWsU z?7T0Y-=N)I0kTZ?Iv7zNbiI~wYIPh(Rx;5#<<8yvXq}=|!nd!ViVgtc=%{e}o40N= zGjol(rpK$DmnikC5N1W7ypq;Kw4UNeFGAL*`S{@td58ZN(5cO&R-39ggwh!=g6p-i ewEzA|x&H@06VU}G2WOoC0000C>0FeMyRn)q@qspV_AzF}7BE=;FVj4RoYi!56-d@!TN_yYU z-5maJ4jTCHP5dqK>Ejopn}(_?+t|&`x1IW(z~$u!<2o+BAJXriF^gk?Ri<@y?&f(z^zg9~o(_8WC29xQn$n$58JdcwTpS6^f zRmo&BC7#6yA+T+m#bVxyVb3272IuBo?+hV8YfYAAgkg^)xo;Z*j7Fo*csy2nKXEWP hH)d1gh6otQ;{qYY@zz$$glpsq1S)?F5PN?Z<^A5ZL@CZB!9imA`pa}^?3dGpn^>}A@ z4h3Lr*{01Y@4fTgbMC-(%dBhkpFCHZ-XKjkkxJgbd%1FUsrc~mGu0a{>WwWXxudtg zhcSk;lT&~tkX_h%aHKf7NxiW(S1qvC)7`mE`)-T`n!1H-&RK@{15%oXG=P$^x$0loeb@n-6t7;}{d7MV2r)EpXcUS9wJ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/items/metaitems/food/berry/elderberry.png b/src/main/resources/assets/gregtech/textures/items/metaitems/food/berry/elderberry.png new file mode 100644 index 0000000000000000000000000000000000000000..0de58c8399936fe5aebcffa408721ece6a618aa5 GIT binary patch literal 393 zcmV;40e1e0P)_)e zsu8|ZLen$!X2wXHHn){y1)!(f;^F?h-8?3-?p4r@46jZV)5;SDPt@EJH>Fbrz_bbk n^~WTa@r>u^z&RP#f7=gYWFTi_*&Hw-a literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/items/metaitems/food/berry/raspberry.png b/src/main/resources/assets/gregtech/textures/items/metaitems/food/berry/raspberry.png new file mode 100644 index 0000000000000000000000000000000000000000..a0db645acddc9aa2ddfa078566b405cf50ac9bab GIT binary patch literal 482 zcmV<80UiE{P)1>-hTJ!?%=;S^|!>^#a?@rsrsqFEBBhL zYc>zHJo@Ejj%#&31|BsDz%r*qv~g#vuqpTT91EQj21$f`Z_`T?07L{840)N~keLKq zg-v-n$fFlsTE|VQVV`qZ6UWH1vU-K>$_{&xe=265kxURo5+gkyUxc0{G{O^>%mq{w zbJJerslShc72+SLw4=c zK4YBVqV3?iF8WfQPPt4q@~H$JR&X@Og4*Y-uaV-$npXLE#ogX&Jme%u1E;GSMG6_dD-Ncn& z30BuF1xO7+G4IHd_{z8K_Fo3N5s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E#0&&Ag>yo&-TLLWu>!1mV62gdsH)2f%cT00000NkvXXu0mjfaaZL; literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtech/textures/items/metaitems/food/berry_medley.png b/src/main/resources/assets/gregtech/textures/items/metaitems/food/berry_medley.png new file mode 100644 index 0000000000000000000000000000000000000000..c0b11c33ede41090d8e0a03be41a42eee1e84387 GIT binary patch literal 315 zcmV-B0mS}^P)6@bbc0%5^ zxwyK=8@C8FE%1**E=iAoVgx*Mss|0!0K}yfLh@_oSZ6HnwtP%zgACu*vL>n z0IuIi3gQxg2R{hwplK3tLeP22Y|-YmWreWoHzKS5D2R*NiG%<7&L@%bUAtJ%=P)EX>4Tx04R}lkv~YoKorKmwn`N$7L+35kfAzRkSZcLS%o5039&*Im*i60LX(C| zii@M*T5u3u{I@td>Ehtv>Le(FIEuUIq9wjd#1?4|lK0EUdtdIp1HufdeAzx~{3Ma1ju5y(?kxjW$C5Ev_w z*G9lOd)jjg=t+1z0r~v^P=a(bi|NBx00006VoOIv0RI600RN!9r;`8x010qNS#tmY zE+YT{E+YYWr9XB6000McNliru<_Q)6J2Usmwj%%l02y>eSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{000+BL_t(Y$75g^1*2dTjDk@x3P!<52LK2V00HKa^}+xE N002ovPDHLkV1n!c?BDL{Jf25uv-* zqHBGv)Rfg?Q7b;zcBKNMD55CJs%Q^tsiH?Y>`Gl|yI%tGINNjfc+U1ea!xWc_xs)7 zz4!Os@1D#SMeHJX>P#wyLUET#BjUhyvi<8e4*bsP{uKq6^EnAgWE^Ut8H{>0p}}e7 z8Us$lt%RCFvEJ1xR!*s*x%G8S6+1KCXV-I{#^|p zS4=xxnMkJJyx8Va6BhcJ;=OBQno=uj7Ns(`?4R;w%Qtzq#|H#Fo4uoCTU&fm+ULZ- z@9p%c_p{kN^u(=ZsbEa>#@P=q+|`_2kG5qM))h)JO!q?HwBNi}eBS@+xlhWfilSUt zr#Af4&sXF7gi-f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?wyX(fi!ct7`J;>kE>t4VA W#dg{8zs>|bLy<+sMjTm~TJRr$ZPhyf literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/blackberry_ripe.png b/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/blackberry_ripe.png new file mode 100644 index 0000000000000000000000000000000000000000..8f8872efc1305e2560fdcf5edfe25c8c304bc505 GIT binary patch literal 4695 zcmeHKc~leE8lM0Pghg;c+oBFZp<*VEILY@dlKgZ=U6#S2W_8JGn@%-deIuW zn}^-WB2Bj9l(9pwdVSFA4w`kCan+vY_SusCGa!gjM8(D?C}U&$k^w1{{k0@QadK*4 zU1oY^Vwmr*@Rgw0oZWEPgRLna#w<&iy!Szt<(JVyN|BfmIOK=IqVcOz+(+x?jm;Pm z{n+)?wL0bHxEWoUiP`=w#}`EX)V#3iuxrc4k z>#w%SQJ+gsa)yo1Y#$ze{#Db)^2|x=ydQg>+A~YSzUy;$n`&m;q1k~XsSJt?9Vfb9 zcxrXVKjtlN$*^3%Bq*OI7R(Nu7%*cV+lEg5AneJ61sNZS&ULnB%#oTF%-NpPcqFs{ zKd@;B+xnH(dlFmi$#OfhwY)HlJt6y=0xjA6d&P=^Gf!5vettHE5q#R^KRl)eOTkUU;DmR^TElG#>-s@=m>GUtIYbtkMksLc7#7o@rC}*{; zGpDnoeSL00)XFa`-^uQUz6W~FPJ!M^Rn3xVOa=~4nA9Z4ZZLzUgP`yzyBXKaCuvws z>L_CbtG)Ip3#Nz&)?AT_r!vQq*_0yRLMG+MCu{QOYcPTp70C>@%K(9aq;c48&>O8X zdj!kLD+BiqGnWNBA@uwRR;nrijx||GSjZ7_cu1U`%H^{nnQ*v;(8?0!(|ReuQv@rU zrp+=g*JiVEYyytSqT`|%hH-g(E}xG81Y*rI(zqQlT7w-FJsfh8j6rPZ`EQBFrl_Eky zO(K{O7b7Gp6$wN#>2u3!H`A{==|WGZ62e`RlF4pSc7K4=(af`VPu9DAzkF@J`^t?i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pEmv0Wb z5z1`%p`v-~f-?)=d|HtD`j8_?xDTfSR`6s2g8l7dgd=r*?!NXHFRo5Yj*RkNMITl< zSA3@*4yj4MG?s#AYA79?Y5#Qcf7Cwx7Z{817Gzdj5) zD)#a$8qjumSm>T35eFj^4@dVe@+|uP)$3x$xtp4#r#FLCDU9ugbysAC@sa2M?RTW@ zv!cEAYef@B3>NCPZ2S7WMk%EEKttm0H&?4qS2q>Y;}cRPX9{<}lFENBZ~1c4xVjQ( z;K8yANBZr(pS;waSoF!(G@E#7W-03kJ*0kWOCxjTh5F`uo;&JVm*-z?vfK_>La)gf zH9bdcud7OF_1iyhjUtg%d}NlUA@K!q-j|6xZDA=Jk3WN`!?3pmj9UP_VU=FJtTvndH2}6 bX|em7fJaNi_2HGkH#DUpA@)%8+-1K4mGI3k literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/bush_block.png b/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/bush_block.png new file mode 100644 index 0000000000000000000000000000000000000000..9fadd53bd17954b48c9b2c7f369c2733b695ff3d GIT binary patch literal 670 zcmV;P0%84$P)0gzwKY11?@TDzSz zgI=#kxm->?etP&t^t-<~-1#PoOA}i9iS)_4=h9?H*4Xd&M?9Wip3;Uen7vidp6j7J zO>Sje8$(kg3B8M7r5@kJFUe-JD5day|8Eu%0C5baX%aM2>)~cxjvxLIkUWqzZ!et0r9x};H-ibtBK?xE-j1&YGCNmQlAPjPS-FVL=t+N$U(;-geWTd*yn+`ivb7{=J_52Lr>2d}SgXkC`F8L8qp2NQhpp zCn3^8sTmB*cbd552@c+4`}-zK?d^}~Jr8AX>?l9UcE0*|jc=~y{pn>F)6OqE;*#Fg zL~g7;ShQx-lpS;IHweTIu^a5q5%)hWExg1m>8!d~U(m}9j5(Z?z*=CKh^0B+dAx<~ z^J56Ur_2kh#ANrvCamqcQB+-|N>?_D(jMruG0ORHf3@q%h_P;rwqkk9 z#k(@p<$RB6qF36ZNkM0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w*KcOpL|ib zzT{?%(6Qv^C%eNc9Yen%=lXqJv^g;}BD+!JYEDS4@0l0b_)g*|ILu5n`a3IjB>Lhl zEvB-!+L>-Qo?J7YlkPn0{-THTbi?*j<&)YH$KQE;bPVC)$wxECfAH%pmG<0HW=N<@ zvE7vB^ed^(qZ$~Mk7n~WF!%VWUR*~FbKX9%CAG?FQsT7~IDNZEUEyZeLz{9=xBt1Q zrRFbL?hlXqbFwDoWS+X^E2MfNFEpF;w zhX&kEb{*$;<%3biY@eW@gYBp1I**pQ%xFGgii@fq9Wpa>Tpji($*<$^P8Flgt-9Nc z`Pbx^1TSmth^)Tkm|NbxqP04$Vr$>tU--Kwe7@qD{f)Het}`L&4&~IT-%dF`zr(HY z0Rj7UNd^7OO2;F#;L|JnpVzV&w_1sd(@LIPbvxrLl*`}yeob4q_OoC30duh|eLzj( zNB72gjk`AUhJ7;nb**1bDU#*6@A$dCruOHp%|}nRRJx}-I7BV431MlBciNELtP@Qi zmxzzmJ?!c1oLYN2aNbX;y}Q=c@-|I8qGoSMW(m^$FL#vo+k+>b& z^1XB=72rj;DHFa_b`@1z|Mt+GxXK&BTes0g52t`g9_T#V&X;fPOT3y>|6H`nMWU+m uD4r+%_k)7z(XsV2BHa9nO@*_%p4*oz?_clNMO_4q#E?hC$o7S$7ySl8AKE$q literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/elderberry_ripe.png b/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/elderberry_ripe.png new file mode 100644 index 0000000000000000000000000000000000000000..774a426dc96a3f074069a2a24d1d2693bf75c169 GIT binary patch literal 4733 zcmeHKc~BEs9uD3_Q4mi=X`>=nC*8R_5)KJUgdhey7+{%BrvokIAnA|@jwqDY2LrkYxbHb-{Z}n8=sBmQ(?+@_rZ6wb3Aev4jrGAFgbp3aLd4o z+DiG~Lg#fRDwACrFQf%FJjlHN{lL!aKGD~=qd~QP)3(fG{*$gSKr>>QIzQY^@tY7ien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Otl literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/lingonberry_ripe.png b/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/lingonberry_ripe.png new file mode 100644 index 0000000000000000000000000000000000000000..5ab5d4c7afa3a3ccc1ead1eba0b3bc5ecf3df88f GIT binary patch literal 4732 zcmeHKdsGu=77rpIQG6o4s0;x`kR+3LG7u05nux*h@Ck~O%mfDWBAJi?78DMG4?xkj z7OgKzD_X3s^?{0@Lb0{3t`%fgu~w|C+Ag}dVi%%4v`rK z9Kx-HnnJPuO{+*4dl?$j-R>R~UKls3@xWTYUz~$_!*@jEyJzhw*zPLpe)_BQw8NiE zvC5Sz{jqJci_XnjSe$K`EfP|Z9hLh+MkI{(__5-{GdV9g^62V>Q;Az&%)Eq*mS0M$ z-P+>#wZ!L#ONa6&wB&m_x7J2h5H;CoE3xt4vOG!q@th~AckXy(xqKJIzA|;Z7o`n4 zFz&}SxZV<|P|bJaBwVQ#eG$5Xh3G&a%G>2_|O*OnzNQ<7J`m*^Ds z%(1?yLH3u(g*{2JDHGZ*riI>X&AMCT*mEr)?%H0~yrw{(9Sf<|J%`7yiySq9@_nJ~ zyIbuNmfQ8`=5bz09TS7EcHiAsp5(u4%rn>e6N?0a58NJ9%A?xPFZRT7nRkfaOy1vf z>q`O&?pQy+92P$1@Bd;7P&kYFlO=*&{wjX%?X+h4F=UX0@ezU~Er*TB8!dsO6Ec8`t z)rvh+EjupB_IEX$3f;KjKI2Ae%ge6g+SAeN>o|rAbI-}yaHlM@yu6`g{RZv*2WQK_ z$*TKlEd1)zsErS$4rRT{3D(eZ{kM+W6QHjiy==bM_}Fn<#nGFBx{Ka$?7^SSC6+F8 z*UOHN({n;M?KB=k9{EiJC1)i-X)Tv8LR5M!1I6@8oMF`(K+RDo!J$?Is#=SakP=TO zbYfb^xmp@TU}D-bo*b4NBJdPKnrX!2GNa>FnQK)dj20R~4YncxK#P+oWYubPCd4YH z*>Mr@ZWA+UkX?mbE2b@%E1(Fy5r?=8E(4}VT8VTvErbdM8!mVB@s??iF zF^vY+p*Q|%4RZMayw23m0^oybMGZ_A17>Qq%)u5WGBO>2^gHys7N&S`LYc9+NpCi) z@W^yrNBRtgz*GbF2D4FP4+m2*aSg5oswS{2Ysi)hWOBuTg^hw_LTj*F0kVf^l7#v# zSwnoYt=PjE>hh|$$T4iDw3aiyBi8U!WNnMhQp!fj9hoIwB_7RF`^IT%dmzycnf%Tsdb zB3KR6F*b&A*&;5gmvu#m+O!Gb=Y?RZOZqX|@^4U+{kI9$8AEiDKL1`vzd>J$Lj zk&|k|$vC*=nv}D7s0n zCM~ED4@(9-0gfaUAX4-njn}~y%|HVnL zU13m@0d{>d(7Zq|WDYdLe$H%d=MVh#=i(3C0YDFL@=p8?(=|-jJ2CK1%EQ$)OxHUx z@J`CZ)%Aa)i~9CDh3mjqkOf?p4wrPA!9~ki8MQz{0heP+$nD(vmtb@?NLQFBl+lxH zj{~J_&r~3EA!YJNmv-tT2gLKYwoOqK%7_4&BrINd^@AO?Yva<~8$!FfSC@8$E1#ZV ze9VrQY{_+R?3qlfa+kR0C?Z|xg@t)}(u<7z)PjRm!ZWWH$3KReB5ypH_#V5kNd5)0 zqvqlJUq+NI50ad3t8U+$b)oCo06o(r^WyCdxH*4w} z+PsP8(zE{UW6dp6+EGtAG(poCKIW$J*q!v-Zn{VD5&Ip0KS23C60O&sO@V16(_Onrrt}c8@+1liiiowB%O)Xg}KFnB6n{R2tPXs!!Zy>Z&cf z=N5&81jSIZbRJ8~*FFE@^O}3tKagTKLU$dtqRjl7;!NDxb!U`=*9HFTuss__w4xO= vH;0P;@ifPEQE_+KXZ~{vJ6-Nv?RI<8{rq5E_0<|sNEBIQwB%^`n%w^Y=&sgy literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/raspberry_ripe.png b/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/raspberry_ripe.png new file mode 100644 index 0000000000000000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/textures/blocks/berry/red_currant_ripe.png b/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/red_currant_ripe.png new file mode 100644 index 0000000000000000000000000000000000000000..42c6b86af3d9f8dce2dd5c5a858d247ef779dc71 GIT binary patch literal 4741 zcmeHKdsGu=77y}JqhJuVsE9*QQ6$Ms-kA~}B?u9sSwO@J#mQs>gXBRTB%lR>MQq(J zQmjw33b+ccuC=JNS|2N^TGoSA1nUcnB0fNTRa~WYzXarQw&(2eob7+)oSARtK7RM! z-*>-zGM~s7M7UC?P$?9Ot29y)16G>t8s!4+)1SS;z;YrxF2NXsnIWBCt0L10$e5)g zAi_ebC=|<8wfvgvX=rRu_k?MuSZgL1ajP0#(HvPv+|EvE+4Lee{7Q1e$m=efCe#GP zFWqbE*C2j1yj=Dht}V^Q(Ro8ybe@49>}_r+*GzX#jDSX*)_9?4F8z|9}~(mm`sqoxfHV<(_@A_Ri<$7CHEy8IdOU5#>A%etBcx zk}^+o=|81Ax~+$USLfYgUP!z0qWdfLkp-(xa&)^)J%?t&&!pKE71rWadForO-&UMk zak9+~epwl{`c9<7mfsZamf#BQ4~`{Ep_;odnr@!C@3?N){)>W>r+na;@(xq6x!ctJ zqHA+zZty4T^#{58Hh!j#I zrgt4ZL5E1Cn7)`NgJrrfB9)BH))TSW3*zwX<+w;m4-TRRT2KI>CX5(lQKxGRs6|Y- z%8keO_H5ETm4D^+NWWL_TxcoWl8jYb{H zVwufmrkTUk>Qh*VNF-vxY!;i%02T~Gmd1!#7#f4G4WbuALKtv8sWXyV4P?W_6k3x} zOs4}q^fo`WPA2Pz*BJU(0DQ14n2v=oVU}9W8th>(hGznhzJz|)!w?4!C@Y3AXia*Y z2+t%mM&H2@O1$4+XVRzJ%TeMiBArkJQv-;K3<((_mC5@(Y!sxBYMtE+kUhlGNU8?N z8j_n$V=rfLBEY>LcZl`d+U>@`N+v@kTHItyPbv}9ZShg17AKXc{gF_?DkWFQXJEJh zVQ?`7VPF^sX7C6Mh(!pF@CAdQq#A<})8K>+3V<_7fJ1OZN+F`)GYCweVsJSsn4y4S zf+6DZVYYxP;t5s4K@bb|Bnoin}5(L=~1&ZOlB^a%TY&v>OZ> zGQh7_28I`yg{=Nz*vFY|?EHbhzPC-u_t8mHDH=%V^h8*jBW-!8lP#EsFsG3JovI9iwRW<`y!#2GfJ?mzn0 zlTx*6ePPFLkLR6ewCZQtELvsy*?{R4+6HK|wcvnHLSA8$l`gI)=b2et=3Gx2FE!ycqo8U{^|-ja>X3;|-cGICqh`Cnrt-WQj6$FFs6@^)d1w?E&iD89I%z%^mMDuY$wD5}}B)kpJw z%U=1BTK3ZP^SjTK=3F`-&0k|mUXy0%#`!d|d)%yu@|>>=K`O7OeqZAeIWs9JhbiiW z)y@x;)@Rnuo|(^2IL%r;&Gj^GLfzFewe{B#H1)k}{vTFc11&|7hA)up|6p1Ee*oo0 B;@toM literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/strawberry_ripe.png b/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/strawberry_ripe.png new file mode 100644 index 0000000000000000000000000000000000000000..77a9078fa59bc9f646a040bf131759db3ee498d3 GIT binary patch literal 4716 zcmeHKdsGu=7Eb_Cv7iXPD#{SFJS52^nLH&RLXZf7$ireqa59;MQIZMCghW6=SQKiv z)*|&$R$alfD2Q#UqONQtCIZZ7Aa>PxWCkRZxTX8#iw|UxKvQ+y)J3wB<+%EDI>x< z9h+L4<>zGcd(-06-ETK!hF-sxbM<@2-qV2zr?+wDv&Ug8ych9(7*(i5fOR@aa zh4u)J>yKULvEFHq#|NK$d3Ae5TEOOaI!8C{j}Zp7xwh?AM7Mtz=Y`{PpAf(4{9g*1 z)~9S*vg&q<@$!$nibw%3&THnx`AdQ+C z*c)W}i{_nxAk}Dw)3K_Gg212|>8(+m4S#)Axi;@u*Sb5O9#5kC9(7oz^bxP>41IoW z@1pX_meNM~j-KYfhpt(DlXZ648GDWaWjHY&3o$x$8Ftbexp{ot3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gWt7lyyMFh- zB(Ex4Gde3q-QCg?f66g6t=1#2_`?8X;r(SX_028rk5kVuIs}{U-Z1`pGREcXm52Ke z-`dl%jz5#;>KQbdtPlLbiT?8wPc1pM^4j#CLyHA_HHBrdGaDRc7L8Xrq@C_cTL157 zs_2wZY+hNRw3a+{zv0gb)m0;E3X(1ahCF%sxwY-Yfz-!tZrx+*Tbeary?^?}n(B-D zlBl5Gseash-ZfO9y!xM$A9M;o+7fYgnc#W1X;*=X0xmlYN1BFWc6> f18O+j0Y4gREPa+&+I77JbPi1}i;bwAyR_gxn{CyY literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/ungrown.png b/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/ungrown.png new file mode 100644 index 0000000000000000000000000000000000000000..3ea20390f870c69bc9ec01dda4627fefdb8381f4 GIT binary patch literal 592 zcmV-W03%M5QV?l-D~?=P67rRSAK`oc?t?5@diPn0)!BvNP!Sisz`wbArMU(ULvnRjSPhg zL@xe`ulFY28H$^j;7I(OYIo+$ncX=f`~_=ITIQ0&M47yZvYKB8)}FP@DVW0Kc}?7S zm>UT&FbCqm#Bex9FH2bpbaoqNl_3glks)eWRVQWP&ktZ(!US;jeX=)~03c^TC18U2 zgo)sz0};$@*%=eOIW$uc738FcP7Ehk4t!nfBy1YodLl>J_pFT-L<2Dov1!w7JEIIdmj?yQ+} zo>QyPnbDRu56ag3qRU`daBvjc*Y0!-59SR5ICT&V=e(!cY_J~IX}e#=gY(Y)UYDJ% zR!IOdgAB+(+X-ze?)&~oVo_0@oKd;R{!Ptyvm!q@itWq)wP08PfhT%h=g!l@~6ozUTt(PXhg3 zmrq|OSM2*|fx6fzO3Al3bNerW?aka$N?;)VS8SE{6Xj6)))h8R0ssI24rN$LW=%~1 eDgXcg2mk;800000(o>TF0000$^>ix literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/white_currant_ripe.png b/src/main/resources/assets/gregtechfoodoption/textures/blocks/berry/white_currant_ripe.png new file mode 100644 index 0000000000000000000000000000000000000000..4a0e5908907651301892f041879af81cf5054210 GIT binary patch literal 4742 zcmeHKdsGuw8jqj?5mXe7Ye9$L6PaWt50lLD6wpKogqMX1!elZDqj`}BiO7P8Qrv2N zP@ko01zMl@Dr$GtVig4`)w)<|RaQ|!T@{gC@PXQ!fIQCjoIRei{g0e8nLGFXzTfwK zzx&&3$y%x#E8_B+ee%b?RKs@ zvPe_DD`Xq*;ihRrU!ECq@0Q=wh_3>(1|J!_;O?~Yrq@SP^akIXNAAf>Iy{agrfqoh zk_>aNpZY8-s(91v2=C8$_gmrp(rf=>9LweMh6`8yNW87vr_rT6@|rR}Y22EvlZU1T zx!yuo++yLh>;-=wswVs!nNuS-78scQY??uP34K|U887RkIt*-wL> z-#n05G|p1^y<}%c<*}gr+*_>6i|X4u4r`7_F00_`OU<3-Q;;@EW^r-l+GV+#TaAA! zu3lPkZ#eS2WM2MV@t|#QV%1_(5y35Tp2wbqDP z1DJMR42*5lY$jxfm=*^x6QnXIRA(R|9*f69;BYII!C?l{A%BBHiN%D??xp}w0n9X$ zNsqDF7K?>t;j(lF6&n?aL~Mk^=5SzufQ?JECfo{ZjXpMtE{-tLNEj%+iPC8y8z(N; znN0yqCRm5w#i!9rr9JdoW48)G54IK8vr!hp)@ay$EsUn{3_#Ky(C=Cp!2l(dVqrSMYzt2k7QnRm#}qn(QegHWN2yfucsKzo z1$+eN2^1tOQj&a_AcRT=TgVUbXT!h9|W zQI05ZA;Gs(DF|$~&Y;1;c2XK#MY8o;m3_e`I2Iz41TZg3_9; zz0f#HL&lnLo0{lMkzl3}5pqO4u7D@t^n&J-1|z6M8z+jexIFucZCfyq3=kH#)hQsb z&x2gBPy>mZbcQ&cP94Cs1pwJBdzPi(I4N)w9)_DpK#Fj<7>Z!1Fph&_2!e5hFv16e zUc630DVO{&wC(Uf{#{!xri{S<68luwiHarDyPmop)s+1xL6H4WU^vm0f)URk6?VUX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