lead fix and unloaded entity fix

This commit is contained in:
gnembon committed 2019-07-07 20:46:59 -03:00
1 parent 800b26bf18
commit f9e90ded2a
5 files changed
+60 -6

No files matched your search

@@ -0,0 +1,21 @@
package carpet.mixins;
import carpet.settings.CarpetSettings;
import net.minecraft.entity.Entity;
import net.minecraft.server.world.ServerWorld;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(ServerWorld.class)
public class ServerWorld_unloadedEntityMixin
{
@Redirect(method = "checkChunk", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/entity/Entity;teleportRequested()Z"
))
private boolean addFastEntityCheck(Entity entity)
{
return CarpetSettings.unloadedEntityFix || entity.teleportRequested();
}
}