mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
A quick and dirty fix for #75
This commit is contained in:
parent
c62c4e475b
commit
a2410939dd
1 changed files with 5 additions and 2 deletions
|
@ -18,7 +18,7 @@ import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.entity.effect.StatusEffects;
|
import net.minecraft.entity.effect.StatusEffects;
|
||||||
import net.minecraft.resource.SynchronousResourceReloader;
|
import net.minecraft.resource.SynchronousResourceReloader;
|
||||||
|
|
||||||
@Mixin(GameRenderer.class)
|
@Mixin(value = GameRenderer.class, priority = Integer.MAX_VALUE)
|
||||||
abstract class MixinGameRenderer implements AutoCloseable, SynchronousResourceReloader {
|
abstract class MixinGameRenderer implements AutoCloseable, SynchronousResourceReloader {
|
||||||
|
|
||||||
@Shadow
|
@Shadow
|
||||||
|
@ -26,7 +26,10 @@ abstract class MixinGameRenderer implements AutoCloseable, SynchronousResourceRe
|
||||||
|
|
||||||
@ModifyConstant(
|
@ModifyConstant(
|
||||||
method = "updateTargetedEntity",
|
method = "updateTargetedEntity",
|
||||||
constant = @Constant(doubleValue = 6)
|
constant = @Constant(doubleValue = 6),
|
||||||
|
require = 0
|
||||||
|
/* This injection is only here to fix reach distance in creative. If it fails, another mod is probably doing the same thing as us. */
|
||||||
|
// TODO: Find a better way of doing this
|
||||||
)
|
)
|
||||||
private double onUpdateTargetedEntity(double initial) {
|
private double onUpdateTargetedEntity(double initial) {
|
||||||
return Math.max(initial, client.interactionManager.getReachDistance());
|
return Math.max(initial, client.interactionManager.getReachDistance());
|
||||||
|
|
Loading…
Reference in a new issue