mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Clean vehicle code.
By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
parent
db46d059ce
commit
6a7e7141f8
2 changed files with 5 additions and 45 deletions
|
@ -1,19 +0,0 @@
|
||||||
package org.bukkit.craftbukkit;
|
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.entity.CraftEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Indicates that an object has a method to get its CraftBukkit-equivalent
|
|
||||||
* CraftEntity object from its Minecraft net.minecraft.server.Entity object.
|
|
||||||
*
|
|
||||||
* @author sk89q
|
|
||||||
*/
|
|
||||||
/**@deprecated*/
|
|
||||||
public interface CraftMappable {
|
|
||||||
/**
|
|
||||||
* Gets the CraftEntity version.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public CraftEntity getCraftEntity();
|
|
||||||
}
|
|
|
@ -45,27 +45,6 @@ public class CraftMinecart extends CraftVehicle implements Minecart {
|
||||||
return minecart.a;
|
return minecart.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Internal function to convert an MC entity to an appropriate CraftBukkit
|
|
||||||
* entity.
|
|
||||||
*
|
|
||||||
* @param server
|
|
||||||
* @param minecart
|
|
||||||
* @return
|
|
||||||
*
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
public static CraftMinecart getCraftMinecart(CraftServer server,
|
|
||||||
EntityMinecart minecart) {
|
|
||||||
if (minecart.d == Type.StorageMinecart.getId()) {
|
|
||||||
return new CraftStorageMinecart(server, minecart);
|
|
||||||
} else if (minecart.d == Type.PoweredMinecart.getId()) {
|
|
||||||
return new CraftPoweredMinecart(server, minecart);
|
|
||||||
} else {
|
|
||||||
return new CraftMinecart(server, minecart);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "CraftMinecart";
|
return "CraftMinecart";
|
||||||
|
|
Loading…
Reference in a new issue