Guide Book as advancement reward

This commit is contained in:
Aleksey 2021-01-10 00:02:29 +03:00
parent 3b96ee6307
commit 1a4cc735d2
5 changed files with 37 additions and 7 deletions

View file

@ -8,7 +8,6 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import net.fabricmc.fabric.api.entity.event.v1.ServerEntityWorldChangeEvents;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.server.world.ServerWorld;
@ -16,6 +15,7 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.TeleportTarget;
import net.minecraft.world.World;
import ru.betterend.interfaces.TeleportingEntity;
@Mixin(Entity.class)
@ -74,7 +74,6 @@ public abstract class EntityMixin implements TeleportingEntity {
destination.resetIdleTimeout();
this.world.getProfiler().pop();
this.beExitPos = null;
ServerEntityWorldChangeEvents.AFTER_ENTITY_CHANGE_WORLD.invoker().afterChangeWorld(Entity.class.cast(this), entity, (ServerWorld) world, (ServerWorld) entity.world);
info.setReturnValue(entity);
info.cancel();
}