Skip to content

Commit

Permalink
Fix #243
Browse files Browse the repository at this point in the history
  • Loading branch information
Goldorion committed Aug 21, 2022
1 parent 20a2151 commit 0436c5d
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 14 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/fabric-1.19.2/block.definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
2 changes: 1 addition & 1 deletion src/fabric-1.19.2/plant.definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ localizationkeys:
- key: block.@modid.@registryname
mapto: name

field_exclusions: [ aiPathNodeType, growapableSpawnType ]
field_exclusions: [ creativePickItem, aiPathNodeType, growapableSpawnType ]
6 changes: 0 additions & 6 deletions src/fabric-1.19.2/templates/block/block.java.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,6 @@ public class ${name}Block extends
}
</#if>

<#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>

<#if data.offsetType != "NONE">
@Override public Block.OffsetType getOffsetType() {
return Block.OffsetType.${data.offsetType};
Expand Down
6 changes: 0 additions & 6 deletions src/fabric-1.19.2/templates/plant/plant.java.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,6 @@ public class ${name}Block extends <#if data.plantType == "normal">Flower<#elseif
}
</#if>

<#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>

<#if !(data.useLootTableForDrops || (data.dropAmount == 0))>
<#if data.dropAmount != 1 && !(data.customDrop?? && !data.customDrop.isEmpty())>
@Override public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
Expand Down

0 comments on commit 0436c5d

Please sign in to comment.