added compostable functionality to items
This commit is contained in:
1 parent
303e594b75
commit
2538d56de1
8 files changed
+13
-43
No files matched your search
@@ -32,6 +32,10 @@ processResources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fabricApi {
|
||||||
|
configureDataGeneration()
|
||||||
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile).configureEach {
|
tasks.withType(JavaCompile).configureEach {
|
||||||
it.options.release = 25
|
it.options.release = 25
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import net.minecraft.resources.ResourceKey;
|
|||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraft.world.item.equipment.ArmorType;
|
import net.minecraft.world.item.equipment.ArmorType;
|
||||||
import net.minecraft.world.level.ItemLike;
|
import net.minecraft.world.level.ItemLike;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jotty
|
* @author jotty
|
||||||
@@ -23,13 +24,13 @@ public class QuicklyItems {
|
|||||||
public static final Item STUB = registerItem(ID.STUB, Stub::new);
|
public static final Item STUB = registerItem(ID.STUB, Stub::new);
|
||||||
public static final Item RAWTURQUOISE = registerItem(ID.RAWTURQUOISE);
|
public static final Item RAWTURQUOISE = registerItem(ID.RAWTURQUOISE);
|
||||||
public static final Item TURQUOISEINGOT = registerItem(ID.TURQUOISEINGOT);
|
public static final Item TURQUOISEINGOT = registerItem(ID.TURQUOISEINGOT);
|
||||||
public static final Item COTTON = registerItem(ID.COTTON);
|
public static final Item COTTON = registerItem(ID.COTTON, ofCompostable(QIP.of(ID.COTTON)));
|
||||||
public static final Item COTTONPLANT = registerItem(ID.COTTONPLANT);
|
public static final Item COTTONPLANT = registerItem(ID.COTTONPLANT);
|
||||||
public static final Item COTTONSEED = registerItem(ID.COTTONSEED, QIP.of(ID.BLOCKCOTTONPLANT), Plant::new);
|
public static final Item COTTONSEED = registerItem(ID.COTTONSEED, ofCompostable(QIP.of(ID.BLOCKCOTTONPLANT)), Plant::new);
|
||||||
public static final Item PILLOW = registerItem(ID.PILLOW);
|
public static final Item PILLOW = registerItem(ID.PILLOW);
|
||||||
public static final Item CANOLA = registerItem(ID.CANOLA);
|
public static final Item CANOLA = registerItem(ID.CANOLA, ofCompostable(QIP.of(ID.CANOLA)));
|
||||||
public static final Item CANOLAPLANT = registerItem(ID.CANOLAPLANT);
|
public static final Item CANOLAPLANT = registerItem(ID.CANOLAPLANT);
|
||||||
public static final Item CANOLASEED = registerItem(ID.CANOLASEED, QIP.of(ID.BLOCKCANOLAPLANT), Plant::new);
|
public static final Item CANOLASEED = registerItem(ID.CANOLASEED, ofCompostable(QIP.of(ID.BLOCKCANOLAPLANT)), Plant::new);
|
||||||
public static final Item CANOLABOTTLE = registerItem(ID.CANOLABOTTLE);
|
public static final Item CANOLABOTTLE = registerItem(ID.CANOLABOTTLE);
|
||||||
public static final Item CANOLABOTTLESTACK = registerItem(ID.CANOLABOTTLESTACK);
|
public static final Item CANOLABOTTLESTACK = registerItem(ID.CANOLABOTTLESTACK);
|
||||||
public static final Item ROTTENFLESHSTRIPES = registerItem(ID.ROTTEN_FLESH_STRIPES);
|
public static final Item ROTTENFLESHSTRIPES = registerItem(ID.ROTTEN_FLESH_STRIPES);
|
||||||
@@ -78,6 +79,10 @@ public class QuicklyItems {
|
|||||||
public static final Item ARMOR_TURQUOISE_LEGGINGS = registerItem(ID.TURQUOISE_LEGGINGS, ArmorType.LEGGINGS);
|
public static final Item ARMOR_TURQUOISE_LEGGINGS = registerItem(ID.TURQUOISE_LEGGINGS, ArmorType.LEGGINGS);
|
||||||
public static final Item ARMOR_TURQUOISE_CHESTPLATE = registerItem(ID.TURQUOISE_CHESTPLATE, ArmorType.CHESTPLATE);
|
public static final Item ARMOR_TURQUOISE_CHESTPLATE = registerItem(ID.TURQUOISE_CHESTPLATE, ArmorType.CHESTPLATE);
|
||||||
|
|
||||||
|
private static final QIP ofCompostable(QIP qip) {
|
||||||
|
return (QIP) qip.compostable(ResourceKey.create(Registries.NUMBER_PROVIDER, Identifier.withDefaultNamespace("compostable/medium_high")));
|
||||||
|
}
|
||||||
|
|
||||||
private static final Item registerItem(Identifier identifier, ArmorType armorType) {
|
private static final Item registerItem(Identifier identifier, ArmorType armorType) {
|
||||||
return QuicklyItems.registerItem(identifier,
|
return QuicklyItems.registerItem(identifier,
|
||||||
new QIP().stacksTo(1).humanoidArmor(ModArmorMaterials.TURQUOISE_ARMOR_MATERIAL, armorType));
|
new QIP().stacksTo(1).humanoidArmor(ModArmorMaterials.TURQUOISE_ARMOR_MATERIAL, armorType));
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"components": {
|
|
||||||
"minecraft:compostable": {
|
|
||||||
"layers": {
|
|
||||||
"value": 0.75
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"components": {
|
|
||||||
"minecraft:compostable": {
|
|
||||||
"layers": {
|
|
||||||
"type": "minecraft:constant",
|
|
||||||
"value": 0.5
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"components": {
|
|
||||||
"minecraft:compostable": {
|
|
||||||
"layers": {
|
|
||||||
"type": "minecraft:constant",
|
|
||||||
"value": 0.75
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"components": {
|
|
||||||
"minecraft:compostable": {
|
|
||||||
"layers": {
|
|
||||||
"type": "minecraft:constant",
|
|
||||||
"value": 0.5
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user