From 0436c5d6f8d48baeb0d6860b99bbf57ec385ec2d Mon Sep 17 00:00:00 2001 From: Goldorion <38427877+Goldorion@users.noreply.github.com> Date: Sun, 21 Aug 2022 15:05:59 -0400 Subject: [PATCH] Fix #243 --- changelog.md | 1 + src/fabric-1.19.2/block.definition.yaml | 2 +- src/fabric-1.19.2/plant.definition.yaml | 2 +- src/fabric-1.19.2/templates/block/block.java.ftl | 6 ------ src/fabric-1.19.2/templates/plant/plant.java.ftl | 6 ------ 5 files changed, 3 insertions(+), 14 deletions(-) diff --git a/changelog.md b/changelog.md index ff30e844..39cde659 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,7 @@ * [Bugfix #229] Generated blocks, plants or structures caused a build error. * [Bugfix #231] Sounds did not play on servers * [Bugfix #238] Stay in crafting grid option caused a build error +* [Bugfix #243] Disabled the creative pick item parameter for blocks and plants (Forge feature) * [Bugfix] Random offset plant parameter caused a build error when changed. ### 1.7-beta-5 diff --git a/src/fabric-1.19.2/block.definition.yaml b/src/fabric-1.19.2/block.definition.yaml index 795ef070..8a5a7318 100644 --- a/src/fabric-1.19.2/block.definition.yaml +++ b/src/fabric-1.19.2/block.definition.yaml @@ -429,6 +429,6 @@ global_templates: variables: level=7 name: "@RESROOT/data/fabric/tags/blocks/mineable/needs_tool_level_7.json" -field_exclusions: [ displayFluidOverlay, plantsGrowOn, beaconColorModifier, isLadder, enchantPowerBonus, aiPathNodeType, +field_exclusions: [ creativePickItem, displayFluidOverlay, plantsGrowOn, beaconColorModifier, isLadder, enchantPowerBonus, aiPathNodeType, hasEnergyStorage, isFluidTank, energyInitial, energyCapacity, energyMaxReceive, energyMaxExtract, fluidCapacity, fluidRestrictions, onDestroyedByPlayer ] \ No newline at end of file diff --git a/src/fabric-1.19.2/plant.definition.yaml b/src/fabric-1.19.2/plant.definition.yaml index 503eb847..cfc3daf1 100644 --- a/src/fabric-1.19.2/plant.definition.yaml +++ b/src/fabric-1.19.2/plant.definition.yaml @@ -67,4 +67,4 @@ localizationkeys: - key: block.@modid.@registryname mapto: name -field_exclusions: [ aiPathNodeType, growapableSpawnType ] \ No newline at end of file +field_exclusions: [ creativePickItem, aiPathNodeType, growapableSpawnType ] \ No newline at end of file diff --git a/src/fabric-1.19.2/templates/block/block.java.ftl b/src/fabric-1.19.2/templates/block/block.java.ftl index 2914c623..36beca5b 100644 --- a/src/fabric-1.19.2/templates/block/block.java.ftl +++ b/src/fabric-1.19.2/templates/block/block.java.ftl @@ -389,12 +389,6 @@ public class ${name}Block extends } - <#if data.creativePickItem?? && !data.creativePickItem.isEmpty()> - @Override public ItemStack getPickBlock(BlockState state, HitResult target, BlockGetter world, BlockPos pos, Player player) { - return ${mappedMCItemToItemStackCode(data.creativePickItem, 1)}; - } - - <#if data.offsetType != "NONE"> @Override public Block.OffsetType getOffsetType() { return Block.OffsetType.${data.offsetType}; diff --git a/src/fabric-1.19.2/templates/plant/plant.java.ftl b/src/fabric-1.19.2/templates/plant/plant.java.ftl index 62aefb38..37fc9e89 100644 --- a/src/fabric-1.19.2/templates/plant/plant.java.ftl +++ b/src/fabric-1.19.2/templates/plant/plant.java.ftl @@ -163,12 +163,6 @@ public class ${name}Block extends <#if data.plantType == "normal">Flower<#elseif } - <#if data.creativePickItem?? && !data.creativePickItem.isEmpty()> - @Override public ItemStack getPickBlock(BlockState state, HitResult target, BlockGetter world, BlockPos pos, Player player) { - return ${mappedMCItemToItemStackCode(data.creativePickItem, 1)}; - } - - <#if !(data.useLootTableForDrops || (data.dropAmount == 0))> <#if data.dropAmount != 1 && !(data.customDrop?? && !data.customDrop.isEmpty())> @Override public List getDrops(BlockState state, LootContext.Builder builder) {