Skip to content

Commit

Permalink
Fix the wrong setting being used for creeper explosion drop check and…
Browse files Browse the repository at this point in the history
… invert the default drop behavior of creeper explosions
  • Loading branch information
ArkoSammy12 committed Jun 24, 2024
1 parent 6dcb269 commit 984d1f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public enum ConfigSettings {
EXPLOSION_HEAL_DELAY(new NumberSetting.Builder<>(new SettingLocation(SettingGroups.DELAYS.getName(), "explosion_heal_delay"), "(Default = %.1f) How much time in seconds should an explosion wait for to begin healing.".formatted(ConfigUtils.DEFAULT_EXPLOSION_HEAL_DELAY), ConfigUtils.DEFAULT_EXPLOSION_HEAL_DELAY).withLowerBound(0.05d)),
BLOCK_PLACEMENT_DELAY(new BlockPlacementDelaySetting.Builder(new SettingLocation(SettingGroups.DELAYS.getName(), "block_placement_delay"),"(Default = %.1f) The time in seconds that a block takes to heal.".formatted(ConfigUtils.DEFAULT_BLOCK_PLACEMENT_DELAY), ConfigUtils.DEFAULT_BLOCK_PLACEMENT_DELAY).withLowerBound(0.05d)),

DROP_ITEMS_ON_CREEPER_EXPLOSIONS(new BooleanSetting.Builder(new SettingLocation(SettingGroups.EXPLOSION_ITEM_DROPS.getName(), "drop_items_on_creeper_explosions"), "(Default = true) Whether to drop items when a creeper explodes.", true)),
DROP_ITEMS_ON_CREEPER_EXPLOSIONS(new BooleanSetting.Builder(new SettingLocation(SettingGroups.EXPLOSION_ITEM_DROPS.getName(), "drop_items_on_creeper_explosions"), "(Default = false) Whether to drop items when a creeper explodes.", false)),
DROP_ITEMS_ON_GHAST_EXPLOSIONS(new BooleanSetting.Builder(new SettingLocation(SettingGroups.EXPLOSION_ITEM_DROPS.getName(), "drop_items_on_ghast_explosions"), "(Default = true) Whether to drop items when a ghast explodes.", true)),
DROP_ITEMS_ON_WITHER_EXPLOSIONS(new BooleanSetting.Builder(new SettingLocation(SettingGroups.EXPLOSION_ITEM_DROPS.getName(), "drop_items_on_wither_explosions"), "(Default = true) Whether to drop items when a wither explodes.", true)),
DROP_ITEMS_ON_TNT_EXPLOSIONS(new BooleanSetting.Builder(new SettingLocation(SettingGroups.EXPLOSION_ITEM_DROPS.getName(), "drop_items_on_tnt_explosions"), "(Default = true) Whether to drop items when a tnt explodes.", true)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private boolean shouldExplosionDropItems(boolean original, @Local(argsOnly = tru
DamageSource damageSource = ((ExplosionAccessor)explosion).creeper_healing$getDamageSource();

boolean shouldDropItems = false;
if (causingLivingEntity instanceof CreeperEntity && ConfigUtils.getSettingValue(ConfigSettings.DROP_ITEMS_ON_END_CRYSTAL_EXPLOSIONS.getSettingLocation(), BooleanSetting.class)){
if (causingLivingEntity instanceof CreeperEntity && ConfigUtils.getSettingValue(ConfigSettings.DROP_ITEMS_ON_CREEPER_EXPLOSIONS.getSettingLocation(), BooleanSetting.class)){
shouldDropItems = true;
} else if (causingLivingEntity instanceof GhastEntity && ConfigUtils.getSettingValue(ConfigSettings.DROP_ITEMS_ON_GHAST_EXPLOSIONS.getSettingLocation(), BooleanSetting.class)){
shouldDropItems = true;
Expand Down

0 comments on commit 984d1f4

Please sign in to comment.