use of crazypants.enderio.base.teleport.packet.PacketTravelEvent in project EnderIO by SleepyTrousers.
the class TravelController method doClientTeleport.
// Note: This is restricted to the current player
public boolean doClientTeleport(@Nonnull Entity entity, @Nonnull EnumHand hand, @Nonnull BlockPos bc, @Nonnull TravelSource source, int powerUse, boolean conserveMomentum) {
TeleportEntityEvent evt = new TeleportEntityEvent(entity, source, bc, entity.dimension);
if (MinecraftForge.EVENT_BUS.post(evt)) {
return false;
}
PacketTravelEvent p = new PacketTravelEvent(evt.getTarget(), powerUse, conserveMomentum, source, hand);
PacketHandler.INSTANCE.sendToServer(p);
return true;
}
Aggregations