Remove internal phase comments and format code

Strip all Phase references, TODO/FUTURE roadmap notes, and internal
planning comments from the codebase. Run Prettier for consistent
formatting across all Java files.
This commit is contained in:
NotEvil
2026-04-12 01:24:49 +02:00
parent 73d70e212d
commit a71093ba9c
482 changed files with 8500 additions and 5155 deletions

View File

@@ -13,7 +13,6 @@ import net.minecraft.world.level.levelgen.structure.pieces.StructurePiecesBuilde
/**
* Abstract base class for kidnapper structure types.
*
* Phase 3: Refactoring - Consolidates common structure generation logic
*
* Subclasses:
* - KidnapperCampStructure: Small, 2 tents

View File

@@ -298,7 +298,6 @@ public class HangingCagePiece extends StructurePiece {
int baseZ = centerZ - 6;
int floorY = candidatePos.getY() - 5;
// Phase 1: Shell — walls, floor, ceiling, air interior
for (int rx = 0; rx < ROOM; rx++) {
for (int rz = 0; rz < ROOM; rz++) {
if (!layout.isInShape(rx, rz)) continue;
@@ -356,7 +355,6 @@ public class HangingCagePiece extends StructurePiece {
}
}
// Phase 2: Theme-specific decorations
theme.placeDecorations(
level,
random,
@@ -367,7 +365,6 @@ public class HangingCagePiece extends StructurePiece {
chunkBB
);
// Phase 2b: Shared structural features
RoomTheme.placeSharedPillars(
level,
random,
@@ -416,11 +413,9 @@ public class HangingCagePiece extends StructurePiece {
chunkBB
);
// Phase 2c: Chests
placeVanillaChest(level, random, baseX, baseZ, floorY, layout, chunkBB);
placeTrappedChest(level, random, baseX, baseZ, floorY, layout, chunkBB);
// Phase 3: Iron bars from ry=7 to ry=10 at center [6,6]
for (int ry = 7; ry <= 10; ry++) {
safeSetBlock(
level,
@@ -430,7 +425,6 @@ public class HangingCagePiece extends StructurePiece {
);
}
// Phase 4: Pet Cage at [6,6] ry=5
BlockPos masterPos = new BlockPos(centerX, floorY + 5, centerZ);
BlockState masterState = V2Blocks.PET_CAGE.get()

View File

@@ -12,7 +12,6 @@ import net.minecraft.world.level.levelgen.structure.pieces.StructurePiecesBuilde
/**
* Kidnapper Fortress - Large, rare structure.
*
* Phase 4: Kidnapper Revamp - Varied Structures
*
* The largest kidnapper structure type.
* Contains:

View File

@@ -11,7 +11,6 @@ import net.minecraft.world.level.levelgen.structure.pieces.StructurePiecesBuilde
/**
* Kidnapper Outpost - Medium-sized structure.
*
* Phase 4: Kidnapper Revamp - Varied Structures
*
* Single-piece structure that spawns on flat terrain (like fortress).
* Uses kidnap_outpost.nbt template.

View File

@@ -11,7 +11,6 @@ import net.minecraftforge.registries.RegistryObject;
* Registry for custom structures.
*
* Phase: Kidnapper Revamp - Cell System
* Phase 4: Added Outpost and Fortress structures
*/
public class ModStructures {

View File

@@ -30,11 +30,8 @@ enum RoomTheme {
int rz,
boolean isEdge
) {
boolean isCorner =
(rx == 1 || rx == 11) && (rz == 1 || rz == 11);
if (
isCorner
) return Blocks.MOSSY_COBBLESTONE.defaultBlockState();
boolean isCorner = (rx == 1 || rx == 11) && (rz == 1 || rz == 11);
if (isCorner) return Blocks.MOSSY_COBBLESTONE.defaultBlockState();
return r.nextFloat() < 0.15f
? Blocks.COBBLESTONE.defaultBlockState()
: Blocks.DEEPSLATE_TILES.defaultBlockState();
@@ -66,26 +63,17 @@ enum RoomTheme {
// Cobwebs at corners (low + high)
for (int[] c : corners) {
if (
layout.isInShape(c[0], c[1]) &&
!layout.isWall(c[0], c[1])
layout.isInShape(c[0], c[1]) && !layout.isWall(c[0], c[1])
) {
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + c[0],
floorY + 1,
baseZ + c[1]
),
new BlockPos(baseX + c[0], floorY + 1, baseZ + c[1]),
Blocks.COBWEB.defaultBlockState(),
chunkBB
);
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + c[0],
floorY + 9,
baseZ + c[1]
),
new BlockPos(baseX + c[0], floorY + 9, baseZ + c[1]),
Blocks.COBWEB.defaultBlockState(),
chunkBB
);
@@ -137,9 +125,7 @@ enum RoomTheme {
chunkBB
);
int fcx2 = fcx + (fcx < 6 ? 1 : -1);
if (
layout.isInShape(fcx2, fcz) && !layout.isWall(fcx2, fcz)
) {
if (layout.isInShape(fcx2, fcz) && !layout.isWall(fcx2, fcz)) {
HangingCagePiece.safeSetBlock(
level,
new BlockPos(baseX + fcx2, floorY + 1, baseZ + fcz),
@@ -160,13 +146,7 @@ enum RoomTheme {
// Side chains
placeSharedChains(level, baseX, baseZ, floorY, chunkBB);
// Hanging lanterns
placeSharedHangingLanterns(
level,
baseX,
baseZ,
floorY,
chunkBB
);
placeSharedHangingLanterns(level, baseX, baseZ, floorY, chunkBB);
}
@Override
@@ -240,8 +220,7 @@ enum RoomTheme {
// Soul fire at corners: soul_sand at ry=0, soul_fire at ry=1
for (int[] c : corners) {
if (
layout.isInShape(c[0], c[1]) &&
!layout.isWall(c[0], c[1])
layout.isInShape(c[0], c[1]) && !layout.isWall(c[0], c[1])
) {
HangingCagePiece.safeSetBlock(
level,
@@ -251,11 +230,7 @@ enum RoomTheme {
);
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + c[0],
floorY + 1,
baseZ + c[1]
),
new BlockPos(baseX + c[0], floorY + 1, baseZ + c[1]),
Blocks.SOUL_FIRE.defaultBlockState(),
chunkBB
);
@@ -306,9 +281,7 @@ enum RoomTheme {
int[] ifc = icorners[1];
int ifcx = ifc[0] + (ifc[0] < 6 ? 1 : -1);
int ifcz = ifc[1] + (ifc[1] < 6 ? 1 : -1);
if (
layout.isInShape(ifcx, ifcz) && !layout.isWall(ifcx, ifcz)
) {
if (layout.isInShape(ifcx, ifcz) && !layout.isWall(ifcx, ifcz)) {
HangingCagePiece.safeSetBlock(
level,
new BlockPos(baseX + ifcx, floorY + 1, baseZ + ifcz),
@@ -317,16 +290,11 @@ enum RoomTheme {
);
int ifcx2 = ifcx + (ifcx < 6 ? 1 : -1);
if (
layout.isInShape(ifcx2, ifcz) &&
!layout.isWall(ifcx2, ifcz)
layout.isInShape(ifcx2, ifcz) && !layout.isWall(ifcx2, ifcz)
) {
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + ifcx2,
floorY + 1,
baseZ + ifcz
),
new BlockPos(baseX + ifcx2, floorY + 1, baseZ + ifcz),
Blocks.LAVA_CAULDRON.defaultBlockState(),
chunkBB
);
@@ -350,13 +318,7 @@ enum RoomTheme {
// Side chains
placeSharedChains(level, baseX, baseZ, floorY, chunkBB);
// Hanging lanterns
placeSharedHangingLanterns(
level,
baseX,
baseZ,
floorY,
chunkBB
);
placeSharedHangingLanterns(level, baseX, baseZ, floorY, chunkBB);
}
@Override
@@ -372,9 +334,7 @@ enum RoomTheme {
public BlockState scatterBlock(RandomSource r) {
float f = r.nextFloat();
if (f < 0.40f) return Blocks.SOUL_SAND.defaultBlockState();
if (
f < 0.70f
) return Blocks.NETHER_WART_BLOCK.defaultBlockState();
if (f < 0.70f) return Blocks.NETHER_WART_BLOCK.defaultBlockState();
return Blocks.BONE_BLOCK.defaultBlockState();
}
@@ -390,9 +350,7 @@ enum RoomTheme {
if (
ry == 1 && f < 0.20f
) return Blocks.MOSSY_COBBLESTONE.defaultBlockState();
if (
f < 0.15f
) return Blocks.MOSSY_STONE_BRICKS.defaultBlockState();
if (f < 0.15f) return Blocks.MOSSY_STONE_BRICKS.defaultBlockState();
if (
f < 0.30f
) return Blocks.CRACKED_STONE_BRICKS.defaultBlockState();
@@ -406,11 +364,8 @@ enum RoomTheme {
int rz,
boolean isEdge
) {
boolean isCorner =
(rx == 1 || rx == 11) && (rz == 1 || rz == 11);
if (
isCorner
) return Blocks.MOSSY_COBBLESTONE.defaultBlockState();
boolean isCorner = (rx == 1 || rx == 11) && (rz == 1 || rz == 11);
if (isCorner) return Blocks.MOSSY_COBBLESTONE.defaultBlockState();
return r.nextFloat() < 0.20f
? Blocks.COBBLESTONE.defaultBlockState()
: Blocks.STONE_BRICKS.defaultBlockState();
@@ -442,26 +397,17 @@ enum RoomTheme {
// Cobwebs at corners (low + high)
for (int[] c : corners) {
if (
layout.isInShape(c[0], c[1]) &&
!layout.isWall(c[0], c[1])
layout.isInShape(c[0], c[1]) && !layout.isWall(c[0], c[1])
) {
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + c[0],
floorY + 1,
baseZ + c[1]
),
new BlockPos(baseX + c[0], floorY + 1, baseZ + c[1]),
Blocks.COBWEB.defaultBlockState(),
chunkBB
);
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + c[0],
floorY + 9,
baseZ + c[1]
),
new BlockPos(baseX + c[0], floorY + 9, baseZ + c[1]),
Blocks.COBWEB.defaultBlockState(),
chunkBB
);
@@ -499,8 +445,7 @@ enum RoomTheme {
// Skull in first corner
int[] sc = corners[0];
if (
layout.isInShape(sc[0], sc[1]) &&
!layout.isWall(sc[0], sc[1])
layout.isInShape(sc[0], sc[1]) && !layout.isWall(sc[0], sc[1])
) {
HangingCagePiece.safeSetBlock(
level,
@@ -513,9 +458,7 @@ enum RoomTheme {
int[] cfc = corners[1];
int cfcx = cfc[0] + (cfc[0] < 6 ? 1 : -1);
int cfcz = cfc[1] + (cfc[1] < 6 ? 1 : -1);
if (
layout.isInShape(cfcx, cfcz) && !layout.isWall(cfcx, cfcz)
) {
if (layout.isInShape(cfcx, cfcz) && !layout.isWall(cfcx, cfcz)) {
HangingCagePiece.safeSetBlock(
level,
new BlockPos(baseX + cfcx, floorY + 1, baseZ + cfcz),
@@ -524,16 +467,11 @@ enum RoomTheme {
);
int cfcx2 = cfcx + (cfcx < 6 ? 1 : -1);
if (
layout.isInShape(cfcx2, cfcz) &&
!layout.isWall(cfcx2, cfcz)
layout.isInShape(cfcx2, cfcz) && !layout.isWall(cfcx2, cfcz)
) {
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + cfcx2,
floorY + 1,
baseZ + cfcz
),
new BlockPos(baseX + cfcx2, floorY + 1, baseZ + cfcz),
Blocks.CANDLE.defaultBlockState()
.setValue(BlockStateProperties.CANDLES, 4)
.setValue(BlockStateProperties.LIT, true),
@@ -542,13 +480,7 @@ enum RoomTheme {
}
}
placeSharedChains(level, baseX, baseZ, floorY, chunkBB);
placeSharedHangingLanterns(
level,
baseX,
baseZ,
floorY,
chunkBB
);
placeSharedHangingLanterns(level, baseX, baseZ, floorY, chunkBB);
}
@Override
@@ -623,16 +555,11 @@ enum RoomTheme {
// Snow layers in corners
for (int[] c : corners) {
if (
layout.isInShape(c[0], c[1]) &&
!layout.isWall(c[0], c[1])
layout.isInShape(c[0], c[1]) && !layout.isWall(c[0], c[1])
) {
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + c[0],
floorY + 1,
baseZ + c[1]
),
new BlockPos(baseX + c[0], floorY + 1, baseZ + c[1]),
Blocks.SNOW.defaultBlockState().setValue(
net.minecraft.world.level.block.SnowLayerBlock.LAYERS,
2 + random.nextInt(3)
@@ -679,8 +606,7 @@ enum RoomTheme {
int ifc2x = ifc2[0] + (ifc2[0] < 6 ? 1 : -1);
int ifc2z = ifc2[1] + (ifc2[1] < 6 ? 1 : -1);
if (
layout.isInShape(ifc2x, ifc2z) &&
!layout.isWall(ifc2x, ifc2z)
layout.isInShape(ifc2x, ifc2z) && !layout.isWall(ifc2x, ifc2z)
) {
HangingCagePiece.safeSetBlock(
level,
@@ -698,11 +624,7 @@ enum RoomTheme {
) {
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + ifc2x2,
floorY + 1,
baseZ + ifc2z
),
new BlockPos(baseX + ifc2x2, floorY + 1, baseZ + ifc2z),
Blocks.BLUE_ICE.defaultBlockState(),
chunkBB
);
@@ -724,20 +646,12 @@ enum RoomTheme {
}
}
placeSharedChains(level, baseX, baseZ, floorY, chunkBB);
placeSharedHangingLanterns(
level,
baseX,
baseZ,
floorY,
chunkBB
);
placeSharedHangingLanterns(level, baseX, baseZ, floorY, chunkBB);
}
@Override
public BlockState pillarBlock(RandomSource r, int ry) {
if (
ry == 1 || ry == 10
) return Blocks.BLUE_ICE.defaultBlockState();
if (ry == 1 || ry == 10) return Blocks.BLUE_ICE.defaultBlockState();
return r.nextFloat() < 0.5f
? Blocks.PACKED_ICE.defaultBlockState()
: Blocks.BLUE_ICE.defaultBlockState();
@@ -853,8 +767,7 @@ enum RoomTheme {
int[][] corners = layout.innerCorners();
int[] sc = corners[0];
if (
layout.isInShape(sc[0], sc[1]) &&
!layout.isWall(sc[0], sc[1])
layout.isInShape(sc[0], sc[1]) && !layout.isWall(sc[0], sc[1])
) {
HangingCagePiece.safeSetBlock(
level,
@@ -868,9 +781,7 @@ enum RoomTheme {
int[] sfc = scorners[1];
int sfcx = sfc[0] + (sfc[0] < 6 ? 1 : -1);
int sfcz = sfc[1] + (sfc[1] < 6 ? 1 : -1);
if (
layout.isInShape(sfcx, sfcz) && !layout.isWall(sfcx, sfcz)
) {
if (layout.isInShape(sfcx, sfcz) && !layout.isWall(sfcx, sfcz)) {
HangingCagePiece.safeSetBlock(
level,
new BlockPos(baseX + sfcx, floorY + 1, baseZ + sfcz),
@@ -879,16 +790,11 @@ enum RoomTheme {
);
int sfcx2 = sfcx + (sfcx < 6 ? 1 : -1);
if (
layout.isInShape(sfcx2, sfcz) &&
!layout.isWall(sfcx2, sfcz)
layout.isInShape(sfcx2, sfcz) && !layout.isWall(sfcx2, sfcz)
) {
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + sfcx2,
floorY + 1,
baseZ + sfcz
),
new BlockPos(baseX + sfcx2, floorY + 1, baseZ + sfcz),
Blocks.SCULK_SENSOR.defaultBlockState(),
chunkBB
);
@@ -912,20 +818,12 @@ enum RoomTheme {
}
}
placeSharedChains(level, baseX, baseZ, floorY, chunkBB);
placeSharedHangingLanterns(
level,
baseX,
baseZ,
floorY,
chunkBB
);
placeSharedHangingLanterns(level, baseX, baseZ, floorY, chunkBB);
}
@Override
public BlockState pillarBlock(RandomSource r, int ry) {
if (
ry == 1 || ry == 10
) return Blocks.SCULK.defaultBlockState();
if (ry == 1 || ry == 10) return Blocks.SCULK.defaultBlockState();
return r.nextFloat() < 0.3f
? Blocks.SCULK.defaultBlockState()
: Blocks.DEEPSLATE_TILE_WALL.defaultBlockState();
@@ -949,9 +847,7 @@ enum RoomTheme {
@Override
public BlockState wallBlock(RandomSource r, int ry) {
float f = r.nextFloat();
if (
f < 0.10f
) return Blocks.CHISELED_SANDSTONE.defaultBlockState();
if (f < 0.10f) return Blocks.CHISELED_SANDSTONE.defaultBlockState();
if (f < 0.30f) return Blocks.SANDSTONE.defaultBlockState();
return Blocks.CUT_SANDSTONE.defaultBlockState();
}
@@ -1043,8 +939,7 @@ enum RoomTheme {
int[][] corners = layout.innerCorners();
int[] tc = corners[0];
if (
layout.isInShape(tc[0], tc[1]) &&
!layout.isWall(tc[0], tc[1])
layout.isInShape(tc[0], tc[1]) && !layout.isWall(tc[0], tc[1])
) {
HangingCagePiece.safeSetBlock(
level,
@@ -1058,8 +953,7 @@ enum RoomTheme {
int ssfcx = ssfc[0] + (ssfc[0] < 6 ? 1 : -1);
int ssfcz = ssfc[1] + (ssfc[1] < 6 ? 1 : -1);
if (
layout.isInShape(ssfcx, ssfcz) &&
!layout.isWall(ssfcx, ssfcz)
layout.isInShape(ssfcx, ssfcz) && !layout.isWall(ssfcx, ssfcz)
) {
HangingCagePiece.safeSetBlock(
level,
@@ -1074,11 +968,7 @@ enum RoomTheme {
) {
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + ssfcx2,
floorY + 1,
baseZ + ssfcz
),
new BlockPos(baseX + ssfcx2, floorY + 1, baseZ + ssfcz),
Blocks.FLOWER_POT.defaultBlockState(),
chunkBB
);
@@ -1100,13 +990,7 @@ enum RoomTheme {
}
}
placeSharedChains(level, baseX, baseZ, floorY, chunkBB);
placeSharedHangingLanterns(
level,
baseX,
baseZ,
floorY,
chunkBB
);
placeSharedHangingLanterns(level, baseX, baseZ, floorY, chunkBB);
}
@Override
@@ -1225,19 +1109,13 @@ enum RoomTheme {
// Skip cage center area (5-7, 5-7)
if (rx >= 5 && rx <= 7 && rz >= 5 && rz <= 7) continue;
// Skip corner positions (used by decorations/chests)
if (
(rx <= 2 || rx >= 10) && (rz <= 2 || rz >= 10)
) continue;
if ((rx <= 2 || rx >= 10) && (rz <= 2 || rz >= 10)) continue;
if (random.nextFloat() < 0.12f) {
BlockState scatter = theme.scatterBlock(random);
if (scatter != null) {
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + rx,
floorY + 1,
baseZ + rz
),
new BlockPos(baseX + rx, floorY + 1, baseZ + rz),
scatter,
chunkBB
);
@@ -1280,11 +1158,7 @@ enum RoomTheme {
) {
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + pos[0],
floorY + 10,
baseZ + pos[1]
),
new BlockPos(baseX + pos[0], floorY + 10, baseZ + pos[1]),
Blocks.COBWEB.defaultBlockState(),
chunkBB
);
@@ -1300,21 +1174,13 @@ enum RoomTheme {
) {
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + pos[0],
floorY + 10,
baseZ + pos[1]
),
new BlockPos(baseX + pos[0], floorY + 10, baseZ + pos[1]),
Blocks.CHAIN.defaultBlockState(),
chunkBB
);
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + pos[0],
floorY + 9,
baseZ + pos[1]
),
new BlockPos(baseX + pos[0], floorY + 9, baseZ + pos[1]),
Blocks.CHAIN.defaultBlockState(),
chunkBB
);
@@ -1346,11 +1212,7 @@ enum RoomTheme {
) {
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + pos[0],
floorY + 1,
baseZ + pos[1]
),
new BlockPos(baseX + pos[0], floorY + 1, baseZ + pos[1]),
Blocks.LANTERN.defaultBlockState(),
chunkBB
);
@@ -1368,9 +1230,7 @@ enum RoomTheme {
{ 12, 8 },
};
for (int[] pos : wallSconces) {
if (
layout.isWall(pos[0], pos[1]) && random.nextFloat() < 0.5f
) {
if (layout.isWall(pos[0], pos[1]) && random.nextFloat() < 0.5f) {
Direction torchDir = getTorchDirection(pos[0], pos[1]);
if (torchDir != null) {
HangingCagePiece.safeSetBlock(
@@ -1420,22 +1280,14 @@ enum RoomTheme {
// Band at ry=5
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + pos[0],
floorY + 5,
baseZ + pos[1]
),
new BlockPos(baseX + pos[0], floorY + 5, baseZ + pos[1]),
theme.wallAccentBlock(),
chunkBB
);
// Optional band at ry=8
HangingCagePiece.safeSetBlock(
level,
new BlockPos(
baseX + pos[0],
floorY + 8,
baseZ + pos[1]
),
new BlockPos(baseX + pos[0], floorY + 8, baseZ + pos[1]),
theme.wallAccentBlock(),
chunkBB
);