Skip to content

Commit

Permalink
Rename shulkerSpawning to shulkerSpawnsOnDragonKill
Browse files Browse the repository at this point in the history
  • Loading branch information
jsorrell committed May 18, 2022
1 parent 7200522 commit 8eb4009
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private void setExitPortalLocation(boolean previouslyKilled, CallbackInfo ci) {
target = "Lnet/minecraft/entity/boss/dragon/EnderDragonFight;previouslyKilled:Z",
opcode = Opcodes.PUTFIELD))
private void spawnShulkerOnDragonReKill(EnderDragonEntity dragon, CallbackInfo ci) {
if (SkyBlockSettings.shulkerSpawning) {
if (SkyBlockSettings.shulkerSpawnsOnDragonKill) {
// On top of bedrock pillar
BlockPos shulkerPosition = this.exitPortalLocation.add(0, 4, 0);
if (this.previouslyKilled && this.world.getBlockState(shulkerPosition).isOf(Blocks.AIR)) {
Expand Down
19 changes: 16 additions & 3 deletions src/main/java/com/jsorrell/skyblock/settings/SkyBlockSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,24 @@ public FieldPair fix(FieldPair fieldPair) {
public static boolean renewableDragonHeads = false;

/* Shulker Spawning */
private static class ShulkerSpawningNameFix extends SettingFixer {
@Override
public String[] alternateNames() {
return new String[]{"shulkerSpawning"};
}

@Override
public FieldPair fix(FieldPair fieldPair) {
fieldPair.setName("shulkerSpawnsOnDragonKill");
return fieldPair;
}
}

@Rule(
desc = "Shulkers spawn on obsidian pillar when Ender Dragon is re-killed",
category = {FEATURE})
@SkyBlockSetting("true")
public static boolean shulkerSpawning = false;
@SkyBlockSetting(value = "true", fixer = ShulkerSpawningNameFix.class)
public static boolean shulkerSpawnsOnDragonKill = false;

/* Anvils Compact Coal into Diamonds */
@Rule(
Expand Down Expand Up @@ -183,7 +196,7 @@ public FieldPair fix(FieldPair fieldPair) {
public static boolean saplingsDieOnSand = false;

@Rule(
desc = "Creatures with Echolocation Drop Echo Shardes when Killed with Sonic Booms",
desc = "Creatures with Echolocation Drop Echo Shards when Killed with Sonic Booms",
category = {FEATURE})
@SkyBlockSetting("true")
public static boolean renewableEchoShards = false;
Expand Down

0 comments on commit 8eb4009

Please sign in to comment.