@@ -0,0 +1,19 @@
|
||||
package de.jottyfan.minecraft.gta.item;
|
||||
|
||||
import net.minecraft.world.food.FoodProperties;
|
||||
|
||||
public enum Food {
|
||||
DELICIOUS_STUB(new FoodProperties.Builder()
|
||||
.nutrition(1).saturationModifier(0.1f)
|
||||
.build());
|
||||
|
||||
private final FoodProperties component;
|
||||
|
||||
private Food(FoodProperties component) {
|
||||
this.component = component;
|
||||
}
|
||||
|
||||
public FoodProperties get() {
|
||||
return component;
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,8 @@ public class UnoItems {
|
||||
public static final Item RUBY = registerItem(Identifier.fromNamespaceAndPath(Uno.MOD_ID, "ruby"));
|
||||
|
||||
private static final Item registerStubItem(Identifier identifier) {
|
||||
return registerItem(identifier, new Item.Properties(), StubItem::new);
|
||||
return registerItem(identifier, new Item.Properties()
|
||||
.food(Food.DELICIOUS_STUB.get()), StubItem::new);
|
||||
}
|
||||
|
||||
private static final Item registerItem(Identifier identifier) {
|
||||
|
||||
Reference in New Issue
Block a user