Fixed an issue where some crop seeds were null, breaking seed replanting

And yes, this is what caused it. I know it seems unrelated
This commit is contained in:
Cameron Reed 2023-02-25 22:00:46 -07:00
parent 110bd42042
commit 52c0e78be5
2 changed files with 3 additions and 5 deletions

View File

@ -9,11 +9,9 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(LivingEntity.class)
public class GlobalGlow {
private static final HaxxorOptions options = HaxxorOptions.getInstance();
@Inject(method = "isGlowing()Z", at = @At("RETURN"), cancellable = true)
private void isGlowingOverride(CallbackInfoReturnable<Boolean> cir) {
if (options.glow.enabled.get()) {
if (HaxxorOptions.getInstance().glow.enabled.get()) {
cir.setReturnValue(true);
}
}

View File

@ -9,10 +9,10 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(Entity.class)
public class GlobalGlowAll {
private static final HaxxorOptions options = HaxxorOptions.getInstance();
@Inject(method = "isGlowing()Z", at = @At("RETURN"), cancellable = true)
private void isGlowingOverride(CallbackInfoReturnable<Boolean> cir) {
HaxxorOptions options = HaxxorOptions.getInstance();
if (options.glow.enabled.get() && options.glow.include_non_living.get()) {
cir.setReturnValue(true);
}