Skip to content

Commit

Permalink
bees no longer randomly change gender upon entering/exiting beehives
Browse files Browse the repository at this point in the history
  • Loading branch information
yrsegal committed Jul 7, 2023
1 parent 7af4591 commit daec2c7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/main/java/vazkii/quark/mixin/BeehiveBlockEntityMixin.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package vazkii.quark.mixin;

import com.llamalad7.mixinextras.injector.WrapWithCondition;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.level.block.entity.BeehiveBlockEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

@Mixin(value = BeehiveBlockEntity.class)
public class BeehiveBlockEntityMixin {

@WrapWithCondition(method = {"writeBees", "removeIgnoredBeeTags"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/nbt/CompoundTag;remove(Ljava/lang/String;)V"))
private static boolean doNotRemoveUUIDOfBees(CompoundTag instance, String key) {
return !key.equals("UUID");
}

}
1 change: 1 addition & 0 deletions src/main/resources/quark.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"BannerDuplicateRecipeMixin",
"BaseCoralPlantTypeBlockMixin",
"BeaconBlockEntityMixin",
"BeehiveBlockEntityMixin",
"BlockItemMixin",
"BoatMixin",
"CrossbowMultishotMixin",
Expand Down

0 comments on commit daec2c7

Please sign in to comment.