Skip to content

Commit

Permalink
fix to PR
Browse files Browse the repository at this point in the history
  • Loading branch information
nossr50 committed Sep 28, 2024
1 parent d5c4beb commit d42581b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 2.2.022
Fixed a bug where Roll was always reducing damage (thanks Ineusia)
Fix COTW errors on older versions (thanks Warriorrrr)
Fixed Slime Spawner not marking divided cubes as being from a mob spawner (thanks Ineusia).


Version 2.2.021
Fixed issue where Roll wasn't reducing as much damage as it should have been (thanks Ineusia)
Updated locale_es (thanks Devilcasters)
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/gmail/nossr50/listeners/EntityListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class EntityListener implements Listener {
* check if a {@link Player} has a {@link Trident} enchanted with "Piercing".
*/
private final NamespacedKey piercingEnchantment = NamespacedKey.minecraft("piercing");
private final List<EntityType> transformableEntities = Arrays.asList(EntityType.SLIME, EntityType.MAGMA_CUBE);
private final static List<EntityType> TRANSFORMABLE_ENTITIES = Arrays.asList(EntityType.SLIME, EntityType.MAGMA_CUBE);

public EntityListener(final mcMMO pluginRef) {
this.pluginRef = pluginRef;
Expand All @@ -78,7 +78,7 @@ public void onEntityTransform(EntityTransformEvent event) {
}

// Clear the original slime/magma cubes metadata - it's dead.
if (transformableEntities.contains(livingEntity.getType())) {
if (TRANSFORMABLE_ENTITIES.contains(livingEntity.getType())) {
mcMMO.getTransientMetadataTools().cleanLivingEntityMetadata(livingEntity);
}
}
Expand Down Expand Up @@ -664,7 +664,7 @@ public void onEntityDeathLowest(EntityDeathEvent event) {
LivingEntity entity = event.getEntity();

// Clear metadata for Slimes/Magma Cubes after transformation events take place, otherwise small spawned slimes will not have any tags
if (transformableEntities.contains(entity.getType())) {
if (TRANSFORMABLE_ENTITIES.contains(entity.getType())) {
return;
}

Expand Down

0 comments on commit d42581b

Please sign in to comment.