Skip to content

Commit

Permalink
Add Processor to Meowth Balloon
Browse files Browse the repository at this point in the history
  • Loading branch information
JT122406 committed Nov 12, 2024
1 parent 97cb571 commit 84e49f9
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"processors": [
{
"processor_type": "moreprocessors:same_state_rule",
"rules": [
{
"input_predicate": {
"block": "generations_core:wing_ball_loot",
"predicate_type": "minecraft:random_block_match",
"probability": 0.33
},
"location_predicate": {
"predicate_type": "minecraft:always_true"
},
"output_location": "generations_core:level_ball_loot"
},
{
"input_predicate": {
"block": "generations_core:wing_ball_loot",
"predicate_type": "minecraft:random_block_match",
"probability": 0.5
},
"location_predicate": {
"predicate_type": "minecraft:always_true"
},
"output_location": "generations_core:jet_ball_loot"
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"element": {
"element_type": "minecraft:single_pool_element",
"location": "generations_structures:loot_balloon/meowth",
"processors": "minecraft:empty",
"processors": "generations_structures:meowth_balloon_processor_list",
"projection": "rigid"
},
"weight": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import biomesoplenty.api.block.BOPBlocks;
import com.google.common.collect.ImmutableList;
import generations.gg.generations.core.generationscore.common.world.level.block.GenerationsBlocks;
import generations.gg.generations.core.generationscore.common.world.level.block.GenerationsDecorationBlocks;
import generations.gg.generations.core.generationscore.common.world.level.block.GenerationsUtilityBlocks;
import generations.gg.generations.core.generationscore.common.world.level.block.GenerationsWood;
import generations.gg.generations.structures.generationsstructures.GenerationsStructures;
import it.unimi.dsi.fastutil.objects.Reference2ObjectOpenHashMap;
Expand Down Expand Up @@ -212,6 +214,15 @@ public class GenerationsProcessorLists {
)
)));

public static final ResourceKey<StructureProcessorList> MEOWTH_BALLOON_PROCESSOR_LIST = register("meowth_balloon", context -> new StructureProcessorList(ImmutableList.of(
new SameStateRuleProcessor(
ImmutableList.of(
new SameStateProcessorRule(new RandomBlockMatchTest(GenerationsUtilityBlocks.WING_BALL_LOOT.getOrNull(), 0.33f), AlwaysTrueTest.INSTANCE, GenerationsUtilityBlocks.LEVEL_BALL_LOOT.getOrNull()),
new SameStateProcessorRule(new RandomBlockMatchTest(GenerationsUtilityBlocks.WING_BALL_LOOT.getOrNull(), 0.5f), AlwaysTrueTest.INSTANCE, GenerationsUtilityBlocks.JET_BALL_LOOT.getOrNull())
)
)
)));

private static StructureProcessorList createProcessorList(ProcessorRule... processors) {
return new StructureProcessorList(ImmutableList.of(new RuleProcessor(ImmutableList.copyOf(processors))));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class GenerationsTemplatePools {
public static final ResourceKey<StructureTemplatePool> BEAST_BALLOON = registerSimple("loot_balloon/beast", GenerationsStructureSettings.BEAST_BALLOON);
public static final ResourceKey<StructureTemplatePool> GREAT_BALLOON = registerSimple("loot_balloon/great", GenerationsStructureSettings.GREAT_BALLOON);
public static final ResourceKey<StructureTemplatePool> MASTER_BALLOON = registerSimple("loot_balloon/master", GenerationsStructureSettings.MASTER_BALLOON);
public static final ResourceKey<StructureTemplatePool> MEOWTH_BALLOON = registerSimple("loot_balloon/meowth", GenerationsStructureSettings.MEOWTH_BALLOON);
public static final ResourceKey<StructureTemplatePool> MEOWTH_BALLOON = registerSimple("loot_balloon/meowth", GenerationsStructureSettings.MEOWTH_BALLOON, GenerationsProcessorLists.MEOWTH_BALLOON_PROCESSOR_LIST);
public static final ResourceKey<StructureTemplatePool> POKE_BALLOON = registerSimple("loot_balloon/poke", GenerationsStructureSettings.POKE_BALLOON);
public static final ResourceKey<StructureTemplatePool> ULTRA_BALLOON = registerSimple("loot_balloon/ultra", GenerationsStructureSettings.ULTRA_BALLOON);

Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ archives_base_name=Generations-Structures
mod_version=1.1.2-Beta-SNAPSHOT
maven_group=generations.gg.generations.structures.generationsstructures

fabric_loader_version=0.16.7
fabric_loader_version=0.16.9
fabric_api_version=0.92.2

forge_version=47.3.11
Expand All @@ -16,7 +16,7 @@ use_neoforge=false

parchment=2023.09.03

generations-core_version=4.0.2-Beta
generations-core_version=4.1.2-Beta-SNAPSHOT
architectury_version=9.2.14
botarium_version=2.3.4
devauth_version=1.2.1
Expand All @@ -26,7 +26,7 @@ moreprocessors_version=1.2.0
terrablender_version=3.0.1.7
BOP_version=19.0.0.91
GlitchCore_version=0.0.1.1
BWG_version=1.3.3
BWG_version=1.4.2

# Publishing
github_token=xxx

0 comments on commit 84e49f9

Please sign in to comment.