2.1.0 Lemonwood drops lemons

This commit is contained in:
Vos
2026-03-25 20:41:51 -05:00
parent a7d7ae3782
commit d2e30dea28
3 changed files with 64 additions and 1 deletions
@@ -127,6 +127,63 @@
} }
], ],
"rolls": 1.0 "rolls": 1.0
},
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:match_tool",
"predicate": {
"items": "minecraft:shears"
}
},
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
]
}
}
],
"entries": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:survives_explosion"
},
{
"chances": [
0.005,
0.0055555557,
0.00625,
0.008333334,
0.025
],
"condition": "minecraft:table_bonus",
"enchantment": "minecraft:fortune"
}
],
"name": "acesbs:lemon"
}
],
"rolls": 1.0
} }
] ]
} }
@@ -18,6 +18,7 @@
- Durability calculations have changed to reflect the material's rarity. - Durability calculations have changed to reflect the material's rarity.
- Tools have the mining level of the base material with the durability of the next tier. - Tools have the mining level of the base material with the durability of the next tier.
- Hammers get the equivalent durability for the materials put into them. (effectively the durability x6.33) - Hammers get the equivalent durability for the materials put into them. (effectively the durability x6.33)
- Lemonwood Trees now drop lemons.
# Known Issues # Known Issues
- The Command Core Item does not display the correct texture when activated. - The Command Core Item does not display the correct texture when activated.
@@ -77,7 +77,7 @@ public class ModLootTableProvider extends FabricBlockLootTableProvider {
addDrop(LemonWoodBlocks.LEMONWOOD_WOOD); addDrop(LemonWoodBlocks.LEMONWOOD_WOOD);
addDrop(LemonWoodBlocks.STRIPPED_LEMONWOOD_WOOD); addDrop(LemonWoodBlocks.STRIPPED_LEMONWOOD_WOOD);
addDrop(LemonWoodBlocks.LEMONWOOD_SAPLING); addDrop(LemonWoodBlocks.LEMONWOOD_SAPLING);
addDrop(LemonWoodBlocks.LEMONWOOD_LEAVES, leavesDrops(LemonWoodBlocks.LEMONWOOD_LEAVES, LemonWoodBlocks.LEMONWOOD_SAPLING, 0.0625f)); addDrop(LemonWoodBlocks.LEMONWOOD_LEAVES, lemonwoodLeavesDrops(LemonWoodBlocks.LEMONWOOD_LEAVES, LemonWoodBlocks.LEMONWOOD_SAPLING, 0.0625f));
addDrop(LemonWoodBlocks.LEMONWOOD_PLANKS); addDrop(LemonWoodBlocks.LEMONWOOD_PLANKS);
addDrop(LemonWoodBlocks.LEMONWOOD_STAIRS); addDrop(LemonWoodBlocks.LEMONWOOD_STAIRS);
@@ -120,6 +120,11 @@ public class ModLootTableProvider extends FabricBlockLootTableProvider {
this.addDrop(ModBlocks.TOBACCO_CROP, this.cropDrops(ModBlocks.TOBACCO_CROP, ModItems.TOBACCO, ModItems.TOBACCO_SEEDS, builder2)); this.addDrop(ModBlocks.TOBACCO_CROP, this.cropDrops(ModBlocks.TOBACCO_CROP, ModItems.TOBACCO, ModItems.TOBACCO_SEEDS, builder2));
} }
public LootTable.Builder lemonwoodLeavesDrops(Block leaves, Block sapling, float... saplingChance) {
RegistryWrapper.Impl<Enchantment> impl = this.registries.getOrThrow(RegistryKeys.ENCHANTMENT);
return this.leavesDrops(leaves, sapling, saplingChance).pool(LootPool.builder().rolls(ConstantLootNumberProvider.create(1.0F)).conditionally(this.createWithoutShearsOrSilkTouchCondition()).with(((LeafEntry.Builder)this.addSurvivesExplosionCondition(leaves, ItemEntry.builder(ModItems.LEMON))).conditionally(TableBonusLootCondition.builder(impl.getOrThrow(Enchantments.FORTUNE), new float[]{0.005F, 0.0055555557F, 0.00625F, 0.008333334F, 0.025F}))));
}
public LootTable.Builder multipleOreDrops(Block drop, Item item, float minDrops, float maxDrops) { public LootTable.Builder multipleOreDrops(Block drop, Item item, float minDrops, float maxDrops) {
RegistryWrapper.Impl<Enchantment> impl = this.registries.getOrThrow(RegistryKeys.ENCHANTMENT); RegistryWrapper.Impl<Enchantment> impl = this.registries.getOrThrow(RegistryKeys.ENCHANTMENT);
return this.dropsWithSilkTouch( return this.dropsWithSilkTouch(