Skip to content

Commit

Permalink
Rename Scarlet PokeShop to Scarlet PokeCenter, Make Antenna Jigsaw
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph T. McQuigg <[email protected]>
  • Loading branch information
JT122406 committed Mar 27, 2024
1 parent b50904f commit dc0bf67
Show file tree
Hide file tree
Showing 21 changed files with 51 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"values": [
{
"id": "generations_structures:scarlet_pokeshop",
"id": "generations_structures:scarlet_pokecenter",
"required": false
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"type": "minecraft:jigsaw",
"biomes": "#generations_structures:has_structure/scarlet_pokeshop",
"biomes": "#generations_structures:has_structure/scarlet_pokecenter",
"max_distance_from_center": 80,
"project_start_to_heightmap": "WORLD_SURFACE_WG",
"size": 1,
"spawn_overrides": {},
"start_height": {
"absolute": 1
},
"start_pool": "generations_structures:scarlet_pokeshop",
"start_pool": "generations_structures:scarlet_pokecenter",
"step": "surface_structures",
"terrain_adaptation": "beard_thin",
"use_expansion_hack": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"placement": {
"type": "minecraft:random_spread",
"salt": 347680677,
"separation": 50,
"separation": 45,
"spacing": 100
},
"structures": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"placement": {
"type": "minecraft:random_spread",
"salt": 738478911,
"separation": 50,
"separation": 45,
"spacing": 100
},
"structures": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"type": "minecraft:random_spread",
"salt": 293756737,
"separation": 250,
"spacing": 500
"spacing": 400
},
"structures": [
{
"structure": "generations_structures:scarlet_pokeshop",
"structure": "generations_structures:scarlet_pokecenter",
"weight": 1
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
{
"element": {
"element_type": "minecraft:single_pool_element",
"location": "generations_structures:scarlet_pokeshop",
"processors": "generations_structures:scarlet_pokeshop_processor_list",
"location": "generations_structures:scarlet_pokecenter",
"processors": "generations_structures:scarlet_pokecenter_processor_list",
"projection": "rigid"
},
"weight": 1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"elements": [
{
"element": {
"element_type": "minecraft:single_pool_element",
"location": "generations_structures:scarlet_pokecenter_antenna",
"processors": "minecraft:empty",
"projection": "rigid"
},
"weight": 1
}
],
"fallback": "generations_structures:scarlet_pokecenter_antenna"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import generations.gg.generations.structures.generationsstructures.processors.structure_processors.shrines.frozen.FrozenShrineProcessor;
import generations.gg.generations.structures.generationsstructures.processors.structure_processors.GymProcessor;
import generations.gg.generations.structures.generationsstructures.processors.structure_processors.PokeCenterProcessor;
import generations.gg.generations.structures.generationsstructures.processors.structure_processors.ScarletPokeShopProcessor;
import generations.gg.generations.structures.generationsstructures.processors.structure_processors.ScarletPokeCenterProcessor;
import generations.gg.generations.structures.generationsstructures.processors.structure_processors.shrines.lugia.LugiaShrineRandomizerProcessor;
import generations.gg.generations.structures.generationsstructures.processors.structure_processors.shrines.staticShrine.StaticShrineProcessor;
import generations.gg.generations.structures.generationsstructures.processors.structure_processors.shrines.staticShrine.StaticShrineRandomizerProcessor;
Expand All @@ -26,7 +26,7 @@ public class GenerationsProcessorLists {
public static void init() {}

public static final ResourceKey<StructureProcessorList> GYM_PROCESSOR_LIST = create("gym_processor_list");
public static final ResourceKey<StructureProcessorList> SCARLET_POKESHOP_PROCESSOR_LIST = create("scarlet_pokeshop_processor_list");
public static final ResourceKey<StructureProcessorList> SCARLET_POKECENTER_PROCESSOR_LIST = create("scarlet_pokecenter_processor_list");
public static final ResourceKey<StructureProcessorList> POKECENTER_PROCESSOR_LIST = create("pokecenter_processor_list");
public static final ResourceKey<StructureProcessorList> FROZEN_SHRINE_PROCESSOR_LIST = create("shrines/frozen_shrine_processor_list");
public static final ResourceKey<StructureProcessorList> FIERY_SHRINE_PROCESSOR_LIST = create("shrines/fiery_shrine_processor_list");
Expand All @@ -39,7 +39,7 @@ public static void init() {}
*/
public static void bootstrap(BootstapContext<StructureProcessorList> context) {
StructureProcessors.init();
register(context, SCARLET_POKESHOP_PROCESSOR_LIST, new StructureProcessorList(ImmutableList.of(new ScarletPokeShopProcessor())));
register(context, SCARLET_POKECENTER_PROCESSOR_LIST, new StructureProcessorList(ImmutableList.of(new ScarletPokeCenterProcessor())));
register(context, GYM_PROCESSOR_LIST, new StructureProcessorList(ImmutableList.of(new GymProcessor())));
register(context, POKECENTER_PROCESSOR_LIST, new StructureProcessorList(ImmutableList.of(new PokeCenterProcessor())));
register(context, FROZEN_SHRINE_PROCESSOR_LIST, new StructureProcessorList(ImmutableList.of(new FrozenShrineProcessor(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import generations.gg.generations.structures.generationsstructures.processors.structure_processors.shrines.frozen.FrozenShrineProcessor;
import generations.gg.generations.structures.generationsstructures.processors.structure_processors.GymProcessor;
import generations.gg.generations.structures.generationsstructures.processors.structure_processors.PokeCenterProcessor;
import generations.gg.generations.structures.generationsstructures.processors.structure_processors.ScarletPokeShopProcessor;
import generations.gg.generations.structures.generationsstructures.processors.structure_processors.ScarletPokeCenterProcessor;
import generations.gg.generations.structures.generationsstructures.processors.structure_processors.shrines.lugia.LugiaShrineRandomizerProcessor;
import generations.gg.generations.structures.generationsstructures.processors.structure_processors.shrines.staticShrine.StaticShrineProcessor;
import generations.gg.generations.structures.generationsstructures.processors.structure_processors.shrines.staticShrine.StaticShrineRandomizerProcessor;
Expand All @@ -20,7 +20,7 @@
* @author J.T. McQuigg (JT122406)
*/
public class StructureProcessors {
public static final StructureProcessorType<ScarletPokeShopProcessor> SCARLET_POKESHOP_PROCESSOR = () -> ScarletPokeShopProcessor.CODEC;
public static final StructureProcessorType<ScarletPokeCenterProcessor> SCARLET_POKECENTER_PROCESSOR = () -> ScarletPokeCenterProcessor.CODEC;
public static final StructureProcessorType<GymProcessor> GYM_PROCESSOR = () -> GymProcessor.CODEC;
public static final StructureProcessorType<PokeCenterProcessor> POKECENTER_PROCESSOR = () -> PokeCenterProcessor.CODEC;
public static final StructureProcessorType<FrozenShrineProcessor> FROZEN_SHRINE_PROCESSOR = () -> FrozenShrineProcessor.CODEC;
Expand All @@ -36,7 +36,7 @@ public class StructureProcessors {
*/
public static void init() {
GenerationsStructures.LOGGER.info("Registering Structure Processors");
register("scarlet_pokeshop_processor", SCARLET_POKESHOP_PROCESSOR);
register("scarlet_pokeshop_processor", SCARLET_POKECENTER_PROCESSOR);
register("gym_processor", GYM_PROCESSOR);
register("pokecenter_processor", POKECENTER_PROCESSOR);
register("shrines/frozen_shrine_processor", FROZEN_SHRINE_PROCESSOR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
* @see StructureProcessor
* @author J.T. McQuigg (JT122406)
*/
public class ScarletPokeShopProcessor extends StructureProcessor {
public static final ScarletPokeShopProcessor INSTANCE = new ScarletPokeShopProcessor();
public static final Codec<ScarletPokeShopProcessor> CODEC = Codec.unit(() -> INSTANCE);
public class ScarletPokeCenterProcessor extends StructureProcessor {
public static final ScarletPokeCenterProcessor INSTANCE = new ScarletPokeCenterProcessor();
public static final Codec<ScarletPokeCenterProcessor> CODEC = Codec.unit(() -> INSTANCE);

@Nullable
@Override
Expand All @@ -43,6 +43,6 @@ else if (block == GenerationsWood.GHOST_TRAPDOOR.get())

@Override
protected @NotNull StructureProcessorType<?> getType() {
return StructureProcessors.SCARLET_POKESHOP_PROCESSOR;
return StructureProcessors.SCARLET_POKECENTER_PROCESSOR;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ public static void bootstrap(BootstapContext<Structure> context) {
UniformHeight.of(VerticalAnchor.absolute(250), VerticalAnchor.belowTop(150)),
false
));
registerStructure(context, GenerationsStructuresKeys.SCARLET_POKESHOP, createJigsaw(
registerStructure(context, GenerationsStructuresKeys.SCARLET_POKECENTER, createJigsaw(
new Structure.StructureSettings(
biomeHolderGetter.getOrThrow(GenerationsBiomeTags.HAS_SCARLET_POKESHOP),
biomeHolderGetter.getOrThrow(GenerationsBiomeTags.HAS_SCARLET_POKECENTER),
Map.of(),
GenerationStep.Decoration.SURFACE_STRUCTURES,
TerrainAdjustment.BEARD_THIN
),
poolHolderGetter.getOrThrow(GenerationsTemplatePools.SCARLET_POKESHOP),
poolHolderGetter.getOrThrow(GenerationsTemplatePools.SCARLET_POKECENTER),
1,
ConstantHeight.of(VerticalAnchor.absolute(1)),
Heightmap.Types.WORLD_SURFACE_WG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
public interface GenerationsStructuresKeys {

/** Scarlet Pokeshop Structure ResourceKey **/
ResourceKey<Structure> SCARLET_POKESHOP = createKey("scarlet_pokeshop");
ResourceKey<Structure> SCARLET_POKECENTER = createKey("scarlet_pokecenter");
ResourceKey<Structure> SCARLET_POKECENTER_ANTENNA = createKey("scarlet_pokecenter_antenna");

/** Loot Balloon Structure ResourceKeys **/
ResourceKey<Structure> POKE_BALLOON = createKey("loot_balloon/poke_balloon");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class GenerationsBiomeTags {
public static final TagKey<Biome> IS_NOT_MOUNTAIN = create("is_not_mountain");

/** the tag for biomes that have a Scarlet Pokeshop */
public static final TagKey<Biome> HAS_SCARLET_POKESHOP = create("has_structure/scarlet_pokeshop");
public static final TagKey<Biome> HAS_SCARLET_POKECENTER = create("has_structure/scarlet_pokecenter");

/** the tag for biomes that have a Loot Balloon */
public static final TagKey<Biome> HAS_LOOT_BALLOON = create("has_structure/loot_balloon");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package generations.gg.generations.structures.generationsstructures.worldgen.structure_set;

import com.google.common.collect.ImmutableList;
import generations.gg.generations.structures.generationsstructures.GenerationsStructures;
import generations.gg.generations.structures.generationsstructures.structures.GenerationsStructuresKeys;
import net.minecraft.core.registries.Registries;
Expand Down Expand Up @@ -38,15 +39,15 @@ public static void bootstrap(BootstapContext<StructureSet> context) {
register(context, COMET, GenerationsStructuresKeys.COMET,
new RandomSpreadStructurePlacement(150, 85, RandomSpreadType.LINEAR, 1189082690));

register(context, POKESHOPS, GenerationsStructuresKeys.SCARLET_POKESHOP,
register(context, POKESHOPS, GenerationsStructuresKeys.SCARLET_POKECENTER,
new RandomSpreadStructurePlacement(400, 250, RandomSpreadType.LINEAR, 293756737));

register(context, SPIKE, GenerationsStructuresKeys.SPIKE,
new RandomSpreadStructurePlacement(20, 10, RandomSpreadType.LINEAR, 732790531));

register(context,
LOOT_BALLOON,
List.of(
ImmutableList.of(
createStructureSelectionEntry(context, GenerationsStructuresKeys.GREAT_BALLOON, 4),
createStructureSelectionEntry(context, GenerationsStructuresKeys.MASTER_BALLOON, 1),
createStructureSelectionEntry(context, GenerationsStructuresKeys.ULTRA_BALLOON, 2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public class GenerationsTemplatePools {
public static final ResourceKey<StructureTemplatePool> ULTRA_BALLOON = create("loot_balloon/ultra_balloon");

public static final ResourceKey<StructureTemplatePool> COMET = create("comet");
public static final ResourceKey<StructureTemplatePool> SCARLET_POKESHOP = create("scarlet_pokeshop");
public static final ResourceKey<StructureTemplatePool> SCARLET_POKECENTER = create("scarlet_pokecenter");
public static final ResourceKey<StructureTemplatePool> SCARLET_POKECENTER_ANTENNA = create("scarlet_pokecenter_antenna");
public static final ResourceKey<StructureTemplatePool> SPIKE = create("spike");
public static final ResourceKey<StructureTemplatePool> POKE_VILLAGE = create("village/plains/poke_village");
public static final ResourceKey<StructureTemplatePool> ISLANDS = create("islands");
Expand Down Expand Up @@ -69,10 +70,13 @@ public static void bootstrap(BootstapContext<StructureTemplatePool> context) {
Pair.of(StructurePoolElement.single(GenerationsStructuresKeys.COMET.location().toString(), getProcessor(context, ProcessorLists.EMPTY)), 1)
), StructureTemplatePool.Projection.RIGID);

register(context, SCARLET_POKESHOP, Pools.EMPTY, ImmutableList.of(
Pair.of(StructurePoolElement.single(GenerationsStructuresKeys.SCARLET_POKESHOP.location().toString(), getProcessor(context, GenerationsProcessorLists.SCARLET_POKESHOP_PROCESSOR_LIST)), 1)
register(context, SCARLET_POKECENTER, Pools.EMPTY, ImmutableList.of(
Pair.of(StructurePoolElement.single(GenerationsStructuresKeys.SCARLET_POKECENTER.location().toString(), getProcessor(context, GenerationsProcessorLists.SCARLET_POKECENTER_PROCESSOR_LIST)), 1)
), StructureTemplatePool.Projection.RIGID);

register(context, SCARLET_POKECENTER_ANTENNA, SCARLET_POKECENTER_ANTENNA, ImmutableList.of(
Pair.of(StructurePoolElement.single(GenerationsStructuresKeys.SCARLET_POKECENTER_ANTENNA.location().toString(), getProcessor(context, ProcessorLists.EMPTY)), 1)
), StructureTemplatePool.Projection.RIGID);

register(context, SPIKE, Pools.EMPTY, ImmutableList.of(
Pair.of(StructurePoolElement.single(GenerationsStructuresKeys.SPIKE.location().toString(), getProcessor(context, ProcessorLists.EMPTY)), 1)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected void addTags(HolderLookup.@NotNull Provider provider) {
.addOptionalTag(Tags.Biomes.IS_PLAINS).addOptionalTag(Tags.Biomes.IS_DESERT)
.addOptionalTag(fabricTagMaker("plains"));

tag(GenerationsBiomeTags.HAS_SCARLET_POKESHOP)
tag(GenerationsBiomeTags.HAS_SCARLET_POKECENTER)
.addTag(BiomeTags.IS_OVERWORLD)
.addOptionalTag(Tags.Biomes.IS_PLAINS.location())
.addOptionalTag(fabricTagMaker("plains"));
Expand Down Expand Up @@ -115,7 +115,7 @@ public GenerationsStructureTagsProvider(PackOutput arg, CompletableFuture<Holder

@Override
protected void addTags(HolderLookup.@NotNull Provider provider) {
tag(GenerationsStructureTags.POKESHOP).addOptional(GenerationsStructuresKeys.SCARLET_POKESHOP.location());
tag(GenerationsStructureTags.POKESHOP).addOptional(GenerationsStructuresKeys.SCARLET_POKECENTER.location());
tag(GenerationsStructureTags.LOOT_BALLOONS)
.addOptional(GenerationsStructuresKeys.POKE_BALLOON.location())
.addOptional(GenerationsStructuresKeys.GREAT_BALLOON.location())
Expand Down

0 comments on commit dc0bf67

Please sign in to comment.