-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shaderoot and Iceroot drop from carrots.
- Loading branch information
1 parent
10445d1
commit db126c9
Showing
11 changed files
with
301 additions
and
87 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
.../src/main/generated/resources/data/generations_core/loot_tables/blocks/calyrex_roots.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,59 @@ | ||
{ | ||
"type": "minecraft:block", | ||
"pools": [ | ||
{ | ||
"bonus_rolls": 0.0, | ||
"entries": [ | ||
{ | ||
"type": "minecraft:alternatives", | ||
"children": [ | ||
{ | ||
"type": "minecraft:item", | ||
"conditions": [ | ||
{ | ||
"condition": "generations_core:species_key", | ||
"key": "cobblemon:spectrier" | ||
}, | ||
{ | ||
"chance": 0.001, | ||
"condition": "minecraft:random_chance" | ||
}, | ||
{ | ||
"block": "minecraft:carrots", | ||
"condition": "minecraft:block_state_property", | ||
"properties": { | ||
"age": "7" | ||
} | ||
} | ||
], | ||
"name": "generations_core:shaderoot_carrot" | ||
}, | ||
{ | ||
"type": "minecraft:item", | ||
"conditions": [ | ||
{ | ||
"condition": "generations_core:species_key", | ||
"key": "cobblemon:glastrier" | ||
}, | ||
{ | ||
"chance": 0.001, | ||
"condition": "minecraft:random_chance" | ||
}, | ||
{ | ||
"block": "minecraft:carrots", | ||
"condition": "minecraft:block_state_property", | ||
"properties": { | ||
"age": "7" | ||
} | ||
} | ||
], | ||
"name": "generations_core:iceroot_carrot" | ||
} | ||
] | ||
} | ||
], | ||
"rolls": 1.0 | ||
} | ||
], | ||
"random_sequence": "generations_core:blocks/calyrex_roots" | ||
} |
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
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
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
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
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
29 changes: 29 additions & 0 deletions
29
...rations/gg/generations/core/generationscore/common/world/loot/LootItemConditionTypes.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,29 @@ | ||
package generations.gg.generations.core.generationscore.common.world.loot; | ||
|
||
import dev.architectury.registry.registries.DeferredRegister; | ||
import dev.architectury.registry.registries.RegistrySupplier; | ||
import generations.gg.generations.core.generationscore.common.GenerationsCore; | ||
import generations.gg.generations.core.generationscore.common.config.SpeciesKey; | ||
import net.minecraft.core.registries.Registries; | ||
import net.minecraft.world.level.storage.loot.Serializer; | ||
import net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer; | ||
import net.minecraft.world.level.storage.loot.entries.LootPoolEntryType; | ||
import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; | ||
import net.minecraft.world.level.storage.loot.predicates.LootItemConditionType; | ||
|
||
import java.util.function.Supplier; | ||
|
||
public class LootItemConditionTypes { | ||
public static final DeferredRegister<LootItemConditionType> REGISTER = DeferredRegister.create(GenerationsCore.MOD_ID, Registries.LOOT_CONDITION_TYPE); | ||
|
||
public static <T extends LootItemCondition> RegistrySupplier<LootItemConditionType> register(String name, Supplier<Serializer<T>> supplier) { | ||
return REGISTER.register(name, () -> new LootItemConditionType(supplier.get())); | ||
} | ||
|
||
public static final RegistrySupplier<LootItemConditionType> SPECIES_KEY = register("species_key", SpeciesKeyCondition.Serializer::new); | ||
|
||
public static void init() { | ||
REGISTER.register(); | ||
} | ||
|
||
} |
Oops, something went wrong.