Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-17 05:20:05 +01:00
Added World.strikeLightning(). Also renamed WeatherStorm -> LightningStrike.
Dieser Commit ist enthalten in:
Ursprung
628fec752b
Commit
6739d6d75c
@ -363,6 +363,13 @@ public class CraftWorld implements World {
|
|||||||
return creature;
|
return creature;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LightningStrike strikeLightning(Location loc) {
|
||||||
|
EntityWeatherStorm lightning = new EntityWeatherStorm(world, loc.getX(), loc.getY(), loc.getZ());
|
||||||
|
world.a(lightning);
|
||||||
|
return new CraftLightningStrike(server, lightning);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean generateTree(Location loc, TreeType type) {
|
public boolean generateTree(Location loc, TreeType type) {
|
||||||
return generateTree(loc, type, world);
|
return generateTree(loc, type, world);
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ public abstract class CraftEntity implements org.bukkit.entity.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) {
|
else if (entity instanceof EntityWeather) {
|
||||||
if (entity instanceof EntityWeatherStorm) {
|
if (entity instanceof EntityWeatherStorm) {
|
||||||
return new CraftWeatherStorm(server, (EntityWeatherStorm)entity);
|
return new CraftLightningStrike(server, (EntityWeatherStorm)entity);
|
||||||
} else {
|
} else {
|
||||||
return new CraftWeather(server, (EntityWeather)entity);
|
return new CraftWeather(server, (EntityWeather)entity);
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,10 @@ package org.bukkit.craftbukkit.entity;
|
|||||||
|
|
||||||
import net.minecraft.server.EntityWeatherStorm;
|
import net.minecraft.server.EntityWeatherStorm;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.entity.WeatherStorm;
|
import org.bukkit.entity.LightningStrike;
|
||||||
|
|
||||||
public class CraftWeatherStorm extends CraftEntity implements WeatherStorm {
|
public class CraftLightningStrike extends CraftEntity implements LightningStrike {
|
||||||
public CraftWeatherStorm(final CraftServer server, final EntityWeatherStorm entity) {
|
public CraftLightningStrike(final CraftServer server, final EntityWeatherStorm entity) {
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
}
|
}
|
||||||
|
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren