geforkt von Mirrors/Paper
Implement EndGateway#getExitLocation and EndGateway#setExitLocation(Location)
Dieser Commit ist enthalten in:
Ursprung
f09f7d8754
Commit
a12b1a4770
@ -1,6 +1,8 @@
|
||||
package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import net.minecraft.server.BlockPosition;
|
||||
import net.minecraft.server.EntityEnderCrystal;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.entity.EnderCrystal;
|
||||
import org.bukkit.entity.EntityType;
|
||||
@ -20,6 +22,23 @@ public class CraftEnderCrystal extends CraftEntity implements EnderCrystal {
|
||||
getHandle().a(showing); // PAIL: Rename setShowingBottom
|
||||
}
|
||||
|
||||
@Override
|
||||
public Location getBeamTarget() {
|
||||
BlockPosition pos = getHandle().j(); // PAIL: Rename getBeamTarget
|
||||
return pos == null ? null : new Location(getWorld(), pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBeamTarget(Location location) {
|
||||
if (location == null) {
|
||||
getHandle().a((BlockPosition) null); // PAIL: Rename setBeamTarget
|
||||
} else if (location.getWorld() != getWorld()) {
|
||||
throw new IllegalArgumentException("Cannot set beam target location to different world");
|
||||
} else {
|
||||
getHandle().a(new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityEnderCrystal getHandle() {
|
||||
return (EntityEnderCrystal) entity;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren