-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
47 additions
and
12 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
src/generated/resources/.cache/e0d3d0b8d9c807675613821fa865a35f707cd83f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// 1.21 2024-10-01T22:03:29.4033395 Data Maps | ||
cd167d458df01c70b8fdf741124c5cb6ad903930 data/neoforge/data_maps/item/compostables.json |
11 changes: 11 additions & 0 deletions
11
src/generated/resources/data/neoforge/data_maps/item/compostables.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"values": { | ||
"cottonly:cotton_ball": { | ||
"chance": 0.65 | ||
}, | ||
"cottonly:cotton_seeds": { | ||
"can_villager_compost": true, | ||
"chance": 0.3 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/net/manmaed/cottonly/datagenerators/CottonDataMaps.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package net.manmaed.cottonly.datagenerators; | ||
|
||
import net.manmaed.cottonly.items.CItems; | ||
import net.minecraft.core.HolderLookup; | ||
import net.minecraft.core.registries.BuiltInRegistries; | ||
import net.minecraft.data.PackOutput; | ||
import net.neoforged.neoforge.common.data.DataMapProvider; | ||
import net.neoforged.neoforge.registries.datamaps.builtin.Compostable; | ||
import net.neoforged.neoforge.registries.datamaps.builtin.NeoForgeDataMaps; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
|
||
public class CottonDataMaps extends DataMapProvider { | ||
|
||
public CottonDataMaps(PackOutput packOutput, CompletableFuture<HolderLookup.Provider> lookupProvider) { | ||
super(packOutput, lookupProvider); | ||
} | ||
|
||
@Override | ||
protected void gather() { | ||
builder(NeoForgeDataMaps.COMPOSTABLES) | ||
.add(BuiltInRegistries.ITEM.wrapAsHolder(CItems.COTTON_SEED.get()), new Compostable(0.3F, true), false) | ||
.add(BuiltInRegistries.ITEM.wrapAsHolder(CItems.COTTON_BALL.get()), new Compostable(0.65F), false); | ||
; | ||
} | ||
|
||
/* how it should look like | ||
"minecraft:wheat_seeds": { | ||
"can_villager_compost": true, | ||
"chance": 0.3 | ||
} | ||
*/ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters