Skip to content

Commit

Permalink
added nether and end ancient cities
Browse files Browse the repository at this point in the history
  • Loading branch information
TelepathicGrunt committed Aug 8, 2022
1 parent 79afeec commit 82d2fd9
Show file tree
Hide file tree
Showing 175 changed files with 4,216 additions and 105 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
### **(V.6.2.0 Changes) (1.19.0-1.19.2 Minecraft) (Config Datapack updated)**

#### Ancient Cities:
Added an Ocean variant of the Ancient City! Very rare structure that can be located with a map from Wandering Traders!
Added an Ocean, Nether, and End variants of the Ancient City! Very rare structure!
Ocean Ancient City can be located with a map from Wandering Traders!

#### LootTables:
All RS loot table's secret lucky banner pool has been standardized and rebalanced.
Expand Down
246 changes: 153 additions & 93 deletions script/nbt_modification/nbt_converter.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import java.util.HashMap;
import java.util.Map;
import java.util.Set;


public class StructureFire extends Feature<StructureTargetConfig> {
Expand All @@ -25,6 +26,13 @@ public class StructureFire extends Feature<StructureTargetConfig> {
put(Level.END, BlockTags.INFINIBURN_END);
}};

private static final Set<Block> REPLACEABLE_BLOCKS = Set.of(
Blocks.NETHER_BRICKS,
Blocks.RED_NETHER_BRICKS,
Blocks.CRIMSON_NYLIUM,
Blocks.WARPED_NYLIUM
);

public StructureFire(Codec<StructureTargetConfig> config) {
super(config);
}
Expand All @@ -34,6 +42,7 @@ public boolean place(FeaturePlaceContext<StructureTargetConfig> context) {

BlockPos.MutableBlockPos mutable = new BlockPos.MutableBlockPos();
BlockState fire = Blocks.FIRE.defaultBlockState();
BlockState soulFire = Blocks.SOUL_FIRE.defaultBlockState();
TagKey<Block> infiniteBurningBlocksTagKey = INFINITE_FIRE_BLOCKS.getOrDefault(context.level().getLevel().dimension(), BlockTags.INFINIBURN_OVERWORLD);

for(int i = 0; i < context.config().attempts; i++) {
Expand All @@ -44,13 +53,18 @@ public boolean place(FeaturePlaceContext<StructureTargetConfig> context) {
);

BlockState belowBlock = context.level().getBlockState(mutable.below());
if(context.level().getBlockState(mutable).isAir() && (belowBlock.getBlock() == Blocks.NETHER_BRICKS || belowBlock.is(infiniteBurningBlocksTagKey))) {
if(context.level().getBlockState(mutable).isAir() && (REPLACEABLE_BLOCKS.contains(belowBlock.getBlock()) || belowBlock.is(infiniteBurningBlocksTagKey))) {

if(belowBlock.getBlock() == Blocks.NETHER_BRICKS) {
if(REPLACEABLE_BLOCKS.contains(belowBlock.getBlock())) {
context.level().setBlock(mutable.below(), Blocks.NETHERRACK.defaultBlockState(), 3);
}

context.level().setBlock(mutable, fire, 3);
if (belowBlock.getBlock() == Blocks.SOUL_SOIL || belowBlock.getBlock() == Blocks.SOUL_SAND) {
context.level().setBlock(mutable, soulFire, 3);
}
else {
context.level().setBlock(mutable, fire, 3);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"Start exploring for structures!": "Start exploring for structures!",
"Repurposed Structures": "Repurposed Structures",
"Civilization from the Beyond": "Civilization from the Beyond",
"Enter all new Ancient Cities": "Enter all new Ancient Cities",
"Bastions, Evil, and Bones...": "Bastions, Evil, and Bones...",
"Enter an Underground Bastion": "Enter an Underground Bastion",
"Enter a Nether City": "Enter a Nether City",
Expand Down Expand Up @@ -40,6 +42,7 @@
"End City Map": "End City Map",
"Nether Fortress Map": "Nether Fortress Map",
"Ruined Portal Map": "Ruined Portal Map",
"Ocean Ancient City Map": "Ocean Ancient City Map",

"RS Mansion Map": "RS Mansion Map",
"Jungle Fortress Map": "Jungle Fortress Map",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,49 @@
}
]
}
},
"in_ancient_city_nether": {
"trigger": "minecraft:location",
"conditions": {
"player": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"location": {
"structure": "repurposed_structures:ancient_city_nether"
}
}
}
]
}
},
"in_ancient_city_end": {
"trigger": "minecraft:location",
"conditions": {
"player": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"location": {
"structure": "repurposed_structures:ancient_city_end"
}
}
}
]
}
}
},
"requirements": [
[
"in_ancient_city_ocean"
],
[
"in_ancient_city_nether"
],
[
"in_ancient_city_end"
]
]
}
Loading

0 comments on commit 82d2fd9

Please sign in to comment.