Skip to content

Commit 3c34964

Browse files
1 parent 230b8b9 commit 3c34964

File tree

119 files changed

+2615
-61
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+2615
-61
lines changed

CHANGELOG.md

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
1-
### **(V.6.2.2 Changes) (1.19.0-1.19.2 Minecraft) (Config Datapack updated)**
1+
### **(V.6.3.0 Changes) (1.19.0-1.19.2 Minecraft) (Config Datapack updated)**
22

3-
#### Loot Tables:
4-
Cleaned up and organized loot table files. Rebalanced lucky banner chances. Added more lucky banners variants!
5-
6-
7-
### **(V.6.2.1 Changes) (1.19.0-1.19.2 Minecraft) (Config Datapack updated)**
8-
9-
#### Ancient Cities:
10-
End Ancient Cities's End Gateway Block will now teleport you to 0,0 coordinate in the End dimension on topmost land at that spot.
11-
12-
13-
### **(V.6.2.0 Changes) (1.19.0-1.19.2 Minecraft) (Config Datapack updated)**
14-
15-
#### Ancient Cities:
16-
Added an Ocean, Nether, and End variants of the Ancient City! Very rare structure!
17-
Ocean Ancient City can be located with a map from Wandering Traders!
18-
19-
#### Loot Tables:
20-
All RS loot table's secret lucky banner pool has been standardized and rebalanced.
21-
22-
More secret banners have been added to all RS loot table's lucky banner pool!
23-
24-
#### Advancements:
25-
Changed the name and description of many advancements for RS so it is less boring lol.
26-
27-
#### Mod Compat:
28-
Fixed villages and a few other structures that would not spawn if William Wyther's Overhauled Overworld mod/datapack is on.
29-
Also, please update WWOO to v3.1.2 for best compatibility with Repurposed Structures.
3+
#### Villages:
4+
Ocean Village now added! Spawns only in deep ocean biomes. Explore the bottom of the sea to see this village's tragic ending!
5+
Can be located with Dolphins

CHANGELOG_OLD.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
### **(V.6.2.2 Changes) (1.19.0-1.19.2 Minecraft) (Config Datapack updated)**
2+
3+
#### Loot Tables:
4+
Cleaned up and organized loot table files. Rebalanced lucky banner chances. Added more lucky banners variants!
5+
6+
7+
### **(V.6.2.1 Changes) (1.19.0-1.19.2 Minecraft) (Config Datapack updated)**
8+
9+
#### Ancient Cities:
10+
End Ancient Cities's End Gateway Block will now teleport you to 0,0 coordinate in the End dimension on topmost land at that spot.
11+
12+
13+
### **(V.6.2.0 Changes) (1.19.0-1.19.2 Minecraft) (Config Datapack updated)**
14+
15+
#### Ancient Cities:
16+
Added an Ocean, Nether, and End variants of the Ancient City! Very rare structure!
17+
Ocean Ancient City can be located with a map from Wandering Traders!
18+
19+
#### Loot Tables:
20+
All RS loot table's secret lucky banner pool has been standardized and rebalanced.
21+
22+
More secret banners have been added to all RS loot table's lucky banner pool!
23+
24+
#### Advancements:
25+
Changed the name and description of many advancements for RS so it is less boring lol.
26+
27+
#### Mod Compat:
28+
Fixed villages and a few other structures that would not spawn if William Wyther's Overhauled Overworld mod/datapack is on.
29+
Also, please update WWOO to v3.1.2 for best compatibility with Repurposed Structures.
30+
31+
132
### **(V.6.1.4 Changes) (1.19.0 Minecraft) (Config Datapack updated)**
233

334
#### Mansions:

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
org.gradle.jvmargs=-Xmx4G
44
org.gradle.daemon=false
55
modid=repurposed_structures
6-
mod_version=6.2.2
6+
mod_version=6.3.0
77
mc_version=1.19.2
88
forge_version=43.0.0

src/main/java/com/telepathicgrunt/repurposedstructures/misc/lootmanager/StructureModdedLootImporter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ private static Map<ResourceLocation, ResourceLocation> createMap() {
180180
tableMap.put(new ResourceLocation(RepurposedStructures.MODID, "chests/villages/mountains_house"), new ResourceLocation("minecraft:chests/village/village_snowy_house"));
181181
tableMap.put(new ResourceLocation(RepurposedStructures.MODID, "chests/villages/mushroom_house"), new ResourceLocation("minecraft:chests/village/village_plains_house"));
182182
tableMap.put(new ResourceLocation(RepurposedStructures.MODID, "chests/villages/oak_house"), new ResourceLocation("minecraft:chests/village/village_plains_house"));
183+
tableMap.put(new ResourceLocation(RepurposedStructures.MODID, "chests/villages/ocean_house"), new ResourceLocation("minecraft:chests/village/village_plains_house"));
184+
tableMap.put(new ResourceLocation(RepurposedStructures.MODID, "chests/villages/ocean_cartographer"), new ResourceLocation("minecraft:chests/village/village_cartographer"));
183185
tableMap.put(new ResourceLocation(RepurposedStructures.MODID, "chests/villages/swamp_house"), new ResourceLocation("minecraft:chests/village/village_plains_house"));
184186
tableMap.put(new ResourceLocation(RepurposedStructures.MODID, "chests/villages/crimson_cartographer"), new ResourceLocation("minecraft:chests/village/village_cartographer"));
185187
tableMap.put(new ResourceLocation(RepurposedStructures.MODID, "chests/villages/crimson_fisher"), new ResourceLocation("minecraft:chests/village/village_fisher"));

src/main/java/com/telepathicgrunt/repurposedstructures/modinit/RSFeatures.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import com.telepathicgrunt.repurposedstructures.world.features.configs.StructureTargetConfig;
1515
import com.telepathicgrunt.repurposedstructures.world.features.configs.StructureTargetLengthRangeConfig;
1616
import net.minecraft.world.level.levelgen.feature.Feature;
17+
import net.minecraft.world.level.levelgen.feature.configurations.BlockPileConfiguration;
1718
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
1819
import net.minecraftforge.registries.DeferredRegister;
1920
import net.minecraftforge.registries.ForgeRegistries;
@@ -47,6 +48,7 @@ public final class RSFeatures {
4748
public static final RegistryObject<Feature<StructureTargetAndRangeConfig>> STRUCTURE_GRASS = FEATURES.register("structure_grass", () -> new StructureGrass(StructureTargetAndRangeConfig.CODEC));
4849
public static final RegistryObject<Feature<StructureTargetAndRangeConfig>> STRUCTURE_FLOWERS = FEATURES.register("structure_flowers", () -> new StructureFlowers(StructureTargetAndRangeConfig.CODEC));
4950
public static final RegistryObject<Feature<StructureRangeConfig>> STRUCTURE_POWDER_SNOW = FEATURES.register("structure_powder_snow", () -> new StructurePowderSnow(StructureRangeConfig.CODEC));
51+
public static final RegistryObject<Feature<BlockPileConfiguration>> UNDERWATER_BLOCK_PILE = FEATURES.register("underwater_block_pile", () -> new UnderwaterBlockPileFeature(BlockPileConfiguration.CODEC));
5052

5153
public static final RegistryObject<Feature<MinecartConfig>> MINESHAFT_MINECARTS = FEATURES.register("mineshaft_minecarts", () -> new MinecartFeature(MinecartConfig.CODEC));
5254
public static final RegistryObject<Feature<MineshaftSupportConfig>> MINESHAFT_SUPPORTS = FEATURES.register("mineshaft_supports", () -> new MineshaftSupport(MineshaftSupportConfig.CODEC));

src/main/java/com/telepathicgrunt/repurposedstructures/modinit/RSProcessors.java

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
11
package com.telepathicgrunt.repurposedstructures.modinit;
22

33
import com.telepathicgrunt.repurposedstructures.RepurposedStructures;
4-
import com.telepathicgrunt.repurposedstructures.world.processors.AirProcessor;
5-
import com.telepathicgrunt.repurposedstructures.world.processors.CeilingVinePostProcessor;
6-
import com.telepathicgrunt.repurposedstructures.world.processors.CloseOffAirSourcesProcessor;
7-
import com.telepathicgrunt.repurposedstructures.world.processors.CloseOffFluidSourcesProcessor;
8-
import com.telepathicgrunt.repurposedstructures.world.processors.EndGatewayProcessor;
9-
import com.telepathicgrunt.repurposedstructures.world.processors.FillEndPortalFrameProcessor;
10-
import com.telepathicgrunt.repurposedstructures.world.processors.FloodWithWaterProcessor;
11-
import com.telepathicgrunt.repurposedstructures.world.processors.MineshaftSkyViewProcessor;
12-
import com.telepathicgrunt.repurposedstructures.world.processors.NoiseReplaceWithPropertiesProcessor;
13-
import com.telepathicgrunt.repurposedstructures.world.processors.PillarProcessor;
14-
import com.telepathicgrunt.repurposedstructures.world.processors.RandomReplaceWithPropertiesProcessor;
15-
import com.telepathicgrunt.repurposedstructures.world.processors.RemoveFloatingBlocksProcessor;
16-
import com.telepathicgrunt.repurposedstructures.world.processors.ReplaceAirOnlyProcessor;
17-
import com.telepathicgrunt.repurposedstructures.world.processors.ReplaceLiquidOnlyProcessor;
18-
import com.telepathicgrunt.repurposedstructures.world.processors.SpawnerRandomizingProcessor;
19-
import com.telepathicgrunt.repurposedstructures.world.processors.StructureVoidProcessor;
20-
import com.telepathicgrunt.repurposedstructures.world.processors.TickBlocksProcessor;
21-
import com.telepathicgrunt.repurposedstructures.world.processors.WallVinePostProcessor;
22-
import com.telepathicgrunt.repurposedstructures.world.processors.WaterloggingFixProcessor;
4+
import com.telepathicgrunt.repurposedstructures.world.processors.*;
235
import net.minecraft.core.Registry;
246
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureProcessorType;
257
import net.minecraftforge.registries.DeferredRegister;
@@ -45,6 +27,7 @@ public final class RSProcessors {
4527
public static final RegistryObject<StructureProcessorType<RandomReplaceWithPropertiesProcessor>> RANDOM_REPLACE_WITH_PROPERTIES_PROCESSOR = STRUCTURE_PROCESSOR.register("random_replace_with_properties_processor", () -> () -> RandomReplaceWithPropertiesProcessor.CODEC);
4628
public static final RegistryObject<StructureProcessorType<NoiseReplaceWithPropertiesProcessor>> NOISE_REPLACE_WITH_PROPERTIES_PROCESSOR = STRUCTURE_PROCESSOR.register("noise_replace_with_properties_processor", () -> () -> NoiseReplaceWithPropertiesProcessor.CODEC);
4729
public static final RegistryObject<StructureProcessorType<WaterloggingFixProcessor>> WATERLOGGING_FIX_PROCESSOR = STRUCTURE_PROCESSOR.register("waterlogging_fix_processor", () -> () -> WaterloggingFixProcessor.CODEC);
30+
public static final RegistryObject<StructureProcessorType<SuperGravityProcessor>> SUPER_GRAVITY_PROCESSOR = STRUCTURE_PROCESSOR.register("super_gravity_processor", () -> () -> SuperGravityProcessor.CODEC);
4831

4932
public static final RegistryObject<StructureProcessorType<WallVinePostProcessor>> WALL_VINE_POST_PROCESSOR = STRUCTURE_PROCESSOR.register("wall_vine_post_processor", () -> () -> WallVinePostProcessor.CODEC);
5033
public static final RegistryObject<StructureProcessorType<CeilingVinePostProcessor>> CEILING_VINE_POST_PROCESSOR = STRUCTURE_PROCESSOR.register("ceiling_vine_post_processor", () -> () -> CeilingVinePostProcessor.CODEC);

src/main/java/com/telepathicgrunt/repurposedstructures/modinit/RSStructurePieces.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.telepathicgrunt.repurposedstructures.modinit;
22

33
import com.telepathicgrunt.repurposedstructures.RepurposedStructures;
4+
import com.telepathicgrunt.repurposedstructures.world.structures.pieces.LegacyOceanBottomSinglePoolElement;
45
import com.telepathicgrunt.repurposedstructures.world.structures.pieces.MansionStructurePiece;
56
import com.telepathicgrunt.repurposedstructures.world.structures.pieces.MirroringSingleJigsawPiece;
67
import net.minecraft.core.Registry;
@@ -15,5 +16,6 @@ public final class RSStructurePieces {
1516
public static final DeferredRegister<StructurePieceType> STRUCTURE_PIECE = DeferredRegister.create(Registry.STRUCTURE_PIECE_REGISTRY, RepurposedStructures.MODID);
1617

1718
public static final RegistryObject<StructurePoolElementType<MirroringSingleJigsawPiece>> MIRROR_SINGLE = STRUCTURE_POOL_ELEMENT.register("mirroring_single_pool_element", () -> () -> MirroringSingleJigsawPiece.CODEC);
19+
public static final RegistryObject<StructurePoolElementType<LegacyOceanBottomSinglePoolElement>> LEGACY_OCEAN_BOTTOM = STRUCTURE_POOL_ELEMENT.register("legacy_ocean_bottom_single_pool_element", () -> () -> LegacyOceanBottomSinglePoolElement.CODEC);
1820
public static final RegistryObject<StructurePieceType> MANSION_STRUCTURE_PIECE = STRUCTURE_PIECE.register("mansion_structure_piece", () -> MansionStructurePiece::new);
1921
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
package com.telepathicgrunt.repurposedstructures.world.features;
2+
3+
import com.mojang.serialization.Codec;
4+
import com.telepathicgrunt.repurposedstructures.utils.GeneralUtils;
5+
import net.minecraft.core.BlockPos;
6+
import net.minecraft.core.Direction;
7+
import net.minecraft.tags.FluidTags;
8+
import net.minecraft.util.RandomSource;
9+
import net.minecraft.world.InteractionHand;
10+
import net.minecraft.world.entity.EntityType;
11+
import net.minecraft.world.entity.EquipmentSlot;
12+
import net.minecraft.world.entity.MobSpawnType;
13+
import net.minecraft.world.entity.monster.Drowned;
14+
import net.minecraft.world.item.ItemStack;
15+
import net.minecraft.world.item.Items;
16+
import net.minecraft.world.level.LevelAccessor;
17+
import net.minecraft.world.level.WorldGenLevel;
18+
import net.minecraft.world.level.block.Blocks;
19+
import net.minecraft.world.level.block.state.BlockState;
20+
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
21+
import net.minecraft.world.level.levelgen.feature.Feature;
22+
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
23+
import net.minecraft.world.level.levelgen.feature.configurations.BlockPileConfiguration;
24+
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
25+
26+
27+
public class UnderwaterBlockPileFeature extends Feature<BlockPileConfiguration> {
28+
public UnderwaterBlockPileFeature(Codec<BlockPileConfiguration> blockPileConfigurationCodec) {
29+
super(blockPileConfigurationCodec);
30+
}
31+
32+
public boolean place(FeaturePlaceContext<BlockPileConfiguration> placeContext) {
33+
BlockPos blockpos = placeContext.origin();
34+
WorldGenLevel worldgenlevel = placeContext.level();
35+
RandomSource randomsource = placeContext.random();
36+
BlockPileConfiguration blockpileconfiguration = placeContext.config();
37+
if (blockpos.getY() < worldgenlevel.getMinBuildHeight() + 5) {
38+
return false;
39+
}
40+
else {
41+
int i = 2 + randomsource.nextInt(2);
42+
int j = 2 + randomsource.nextInt(2);
43+
44+
for(BlockPos blockpos1 : BlockPos.betweenClosed(blockpos.offset(-i, 0, -j), blockpos.offset(i, 1, j))) {
45+
int xOffset = blockpos.getX() - blockpos1.getX();
46+
int zOffset = blockpos.getZ() - blockpos1.getZ();
47+
if ((float)(xOffset * xOffset + zOffset * zOffset) <= randomsource.nextFloat() * 10.0F - randomsource.nextFloat() * 6.0F) {
48+
this.tryPlaceBlock(worldgenlevel, blockpos1, randomsource, blockpileconfiguration);
49+
}
50+
else if ((double)randomsource.nextFloat() < 0.031D) {
51+
this.tryPlaceBlock(worldgenlevel, blockpos1, randomsource, blockpileconfiguration);
52+
}
53+
}
54+
55+
return true;
56+
}
57+
}
58+
59+
private boolean mayPlaceOn(LevelAccessor levelAccessor, BlockPos pos, RandomSource randomSource) {
60+
BlockPos blockpos = pos.below();
61+
BlockState blockstate = levelAccessor.getBlockState(blockpos);
62+
return blockstate.is(Blocks.DIRT_PATH) ? randomSource.nextBoolean() : blockstate.isFaceSturdy(levelAccessor, blockpos, Direction.UP);
63+
}
64+
65+
private void tryPlaceBlock(LevelAccessor levelAccessor, BlockPos blockPos, RandomSource randomSource, BlockPileConfiguration stateProvider) {
66+
boolean isWaterLocation = levelAccessor.isWaterAt(blockPos);
67+
if ((levelAccessor.isEmptyBlock(blockPos) || isWaterLocation) && this.mayPlaceOn(levelAccessor, blockPos, randomSource)) {
68+
BlockState resultState = stateProvider.stateProvider.getState(randomSource, blockPos);
69+
if (isWaterLocation && resultState.hasProperty(BlockStateProperties.WATERLOGGED)) {
70+
resultState = resultState.setValue(BlockStateProperties.WATERLOGGED, true);
71+
}
72+
levelAccessor.setBlock(blockPos, resultState, 4);
73+
}
74+
}
75+
}

0 commit comments

Comments
 (0)