Update to 24w12a

Signed-off-by: shedaniel <daniel@shedaniel.me>
This commit is contained in:
shedaniel
2024-04-01 20:27:07 +09:00
parent 7684945cc5
commit d4f399c9e1
7 changed files with 18 additions and 39 deletions

View File

@@ -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);
}
});
});*/
}
}

View File

@@ -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));
});