mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-31 13:26:03 -05:00
@@ -27,13 +27,13 @@ import net.minecraft.world.level.storage.loot.entries.LootItem;
|
||||
|
||||
public class TestLoot {
|
||||
public static void init() {
|
||||
LootEvent.MODIFY_LOOT_TABLE.register((lootTables, id, context, builtin) -> {
|
||||
/*LootEvent.MODIFY_LOOT_TABLE.register((lootTables, id, context, builtin) -> {
|
||||
// Check that the loot table is dirt and built-in
|
||||
if (builtin && Blocks.DIRT.getLootTable().equals(id)) {
|
||||
// Create a loot pool with a single item entry of Items.DIAMOND
|
||||
LootPool.Builder pool = LootPool.lootPool().add(LootItem.lootTableItem(Items.DIAMOND));
|
||||
context.addPool(pool);
|
||||
}
|
||||
});
|
||||
});*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ public class TestRegistries {
|
||||
public static final RegistrySupplier<Item> TEST_EQUIPPABLE = ITEMS.register("test_eqippable", () ->
|
||||
new EquippableTickingItem(new Item.Properties().arch$tab(TestRegistries.TEST_TAB)));
|
||||
public static final RegistrySupplier<Item> TEST_EDIBLE = ITEMS.register("test_edible", () -> {
|
||||
FoodProperties.Builder fpBuilder = new FoodProperties.Builder().nutrition(8).saturationMod(0.8F).meat();
|
||||
FoodProperties.Builder fpBuilder = new FoodProperties.Builder().nutrition(8).saturationModifier(0.8F);
|
||||
FoodPropertiesHooks.effect(fpBuilder, () -> new MobEffectInstance(TEST_EFFECT, 100), 1);
|
||||
return new Item(new Item.Properties().food(fpBuilder.build()).arch$tab(TestRegistries.TEST_TAB));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user