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:
parent
110bd42042
commit
52c0e78be5
@ -9,11 +9,9 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||||||
|
|
||||||
@Mixin(LivingEntity.class)
|
@Mixin(LivingEntity.class)
|
||||||
public class GlobalGlow {
|
public class GlobalGlow {
|
||||||
private static final HaxxorOptions options = HaxxorOptions.getInstance();
|
|
||||||
|
|
||||||
@Inject(method = "isGlowing()Z", at = @At("RETURN"), cancellable = true)
|
@Inject(method = "isGlowing()Z", at = @At("RETURN"), cancellable = true)
|
||||||
private void isGlowingOverride(CallbackInfoReturnable<Boolean> cir) {
|
private void isGlowingOverride(CallbackInfoReturnable<Boolean> cir) {
|
||||||
if (options.glow.enabled.get()) {
|
if (HaxxorOptions.getInstance().glow.enabled.get()) {
|
||||||
cir.setReturnValue(true);
|
cir.setReturnValue(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,10 +9,10 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||||||
|
|
||||||
@Mixin(Entity.class)
|
@Mixin(Entity.class)
|
||||||
public class GlobalGlowAll {
|
public class GlobalGlowAll {
|
||||||
private static final HaxxorOptions options = HaxxorOptions.getInstance();
|
|
||||||
|
|
||||||
@Inject(method = "isGlowing()Z", at = @At("RETURN"), cancellable = true)
|
@Inject(method = "isGlowing()Z", at = @At("RETURN"), cancellable = true)
|
||||||
private void isGlowingOverride(CallbackInfoReturnable<Boolean> cir) {
|
private void isGlowingOverride(CallbackInfoReturnable<Boolean> cir) {
|
||||||
|
HaxxorOptions options = HaxxorOptions.getInstance();
|
||||||
|
|
||||||
if (options.glow.enabled.get() && options.glow.include_non_living.get()) {
|
if (options.glow.enabled.get() && options.glow.include_non_living.get()) {
|
||||||
cir.setReturnValue(true);
|
cir.setReturnValue(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user