Skip to content

Commit

Permalink
disable dying mobs when they aren't enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ix0rai committed May 25, 2024
1 parent 33a06e6 commit cf46e97
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/io/ix0rai/rainglow/mixin/DyeItemMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ private void useOnEntity(ItemStack stack, PlayerEntity user, LivingEntity entity
RainglowEntity entityType = RainglowEntity.get(entity);

if (entityType != null && !Rainglow.colourUnloaded(entityType, colour)
&& Rainglow.CONFIG.isEntityEnabled(entityType)
&& !Rainglow.getColour(entityType, entity.getDataTracker(), entity.getWorld().getRandom()).getId().equals(colour)) {
entity.getWorld().playSoundFromEntity(user, entity, SoundEvents.BLOCK_AMETHYST_CLUSTER_BREAK, SoundCategory.PLAYERS, 5.0f, 1.0f);
if (!user.getWorld().isClient()) {
Expand Down

0 comments on commit cf46e97

Please sign in to comment.