mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 13:36:16 +01:00
Implemented Weather and WeatherStorm
This commit is contained in:
parent
1a68a2aafe
commit
d5ee48a0c8
@ -76,6 +76,13 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|||||||
else if (entity instanceof EntityFireball) { return new CraftFireball( server, (EntityFireball) entity); }
|
else if (entity instanceof EntityFireball) { return new CraftFireball( server, (EntityFireball) entity); }
|
||||||
else if (entity instanceof EntityFish) { return new CraftFish( server, (EntityFish) entity); }
|
else if (entity instanceof EntityFish) { return new CraftFish( server, (EntityFish) entity); }
|
||||||
else if (entity instanceof EntityItem) { return new CraftItem( server, (EntityItem) entity); }
|
else if (entity instanceof EntityItem) { return new CraftItem( server, (EntityItem) entity); }
|
||||||
|
else if (entity instanceof EntityWeather) {
|
||||||
|
if (entity instanceof EntityWeatherStorm) {
|
||||||
|
return new CraftWeatherStorm(server, (EntityWeatherStorm)entity);
|
||||||
|
} else {
|
||||||
|
return new CraftWeather(server, (EntityWeather)entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (entity instanceof EntityMinecart) {
|
else if (entity instanceof EntityMinecart) {
|
||||||
EntityMinecart mc = (EntityMinecart) entity;
|
EntityMinecart mc = (EntityMinecart) entity;
|
||||||
if (mc.type == CraftMinecart.Type.StorageMinecart.getId()) {
|
if (mc.type == CraftMinecart.Type.StorageMinecart.getId()) {
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
package org.bukkit.craftbukkit.entity;
|
||||||
|
|
||||||
|
import net.minecraft.server.EntityWeather;
|
||||||
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
|
import org.bukkit.entity.Weather;
|
||||||
|
|
||||||
|
public class CraftWeather extends CraftEntity implements Weather {
|
||||||
|
public CraftWeather(final CraftServer server, final EntityWeather entity) {
|
||||||
|
super(server, entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EntityWeather getHandle() {
|
||||||
|
return (EntityWeather)super.getHandle();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
package org.bukkit.craftbukkit.entity;
|
||||||
|
|
||||||
|
import net.minecraft.server.EntityWeatherStorm;
|
||||||
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
|
import org.bukkit.entity.WeatherStorm;
|
||||||
|
|
||||||
|
public class CraftWeatherStorm extends CraftEntity implements WeatherStorm {
|
||||||
|
public CraftWeatherStorm(final CraftServer server, final EntityWeatherStorm entity) {
|
||||||
|
super(server, entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EntityWeatherStorm getHandle() {
|
||||||
|
return (EntityWeatherStorm)super.getHandle();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user