This commit is contained in:
nelle 2023-01-08 23:41:27 -07:00
parent d59c12882b
commit 45ad5d88d0
4 changed files with 21 additions and 3 deletions

View file

@ -3,7 +3,7 @@ org.gradle.jvmargs = -Xmx1G
org.gradle.parallel = true
# Mod Properties
version = 2.2.0
version = 2.2.1
maven_group = xyz.limepot
archives_base_name = roses_mod

View file

@ -11,6 +11,7 @@ import net.minecraft.item.ItemGroups;
import net.minecraft.item.Items;
import net.minecraft.loot.LootPool;
import net.minecraft.loot.entry.ItemEntry;
import net.minecraft.loot.provider.number.ConstantLootNumberProvider;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
@ -74,7 +75,7 @@ public class RosesMod implements ModInitializer {
final Identifier ROSE_BUSH_LOOT_TABLE_ID = Blocks.ROSE_BUSH.getLootTableId();
LootTableEvents.MODIFY.register((resourceManager, lootManager, id, tableBuilder, source) -> {
if (source.isBuiltin() && ROSE_BUSH_LOOT_TABLE_ID.equals(id)) {
LootPool.Builder poolBuilder = LootPool.builder().with(ItemEntry.builder(RosesMod.ROSE_FLOWER));;
LootPool.Builder poolBuilder = LootPool.builder().rolls(ConstantLootNumberProvider.create(3)).with(ItemEntry.builder(RosesMod.ROSE_FLOWER));;
tableBuilder.pool(poolBuilder);
}
});

View file

@ -2,7 +2,7 @@
"type": "minecraft:block",
"pools": [
{
"rolls": 2,
"rolls": 3,
"entries": [
{
"type": "minecraft:item",

View file

@ -0,0 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" ",
" WW",
" WW"
],
"key": {
"W": {
"item": "roses_mod:cyan_rose"
}
},
"result": {
"item": "minecraft:cyan_rose_bush",
"count": 1
}
}