Update world interface

This commit is contained in:
MattBDev 2020-05-10 20:57:24 -04:00
parent 4f2b0e6f4e
commit a813cbfcdf

View File

@ -55,6 +55,7 @@ import org.bukkit.entity.Item;
import org.bukkit.entity.LightningStrike;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.generator.BlockPopulator;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.inventory.ItemStack;
@ -649,6 +650,11 @@ public class AsyncWorld extends PassthroughExtent implements World {
return TaskManager.IMP.sync(() -> parent.spawn(location, clazz, function));
}
@Override
public <T extends Entity> @NotNull T spawn(@NotNull Location location, @NotNull Class<T> clazz, @Nullable Consumer<T> function, CreatureSpawnEvent.@NotNull SpawnReason reason) throws IllegalArgumentException {
return null;
}
@Override
public FallingBlock spawnFallingBlock(Location location, MaterialData data) throws IllegalArgumentException {
return TaskManager.IMP.sync(() -> parent.spawnFallingBlock(location, data));
@ -1053,6 +1059,21 @@ public class AsyncWorld extends PassthroughExtent implements World {
return parent.getViewDistance();
}
@Override
public void setViewDistance(int viewDistance) {
}
@Override
public int getNoTickViewDistance() {
return 0;
}
@Override
public void setNoTickViewDistance(int viewDistance) {
}
@Override
public RayTraceResult rayTrace(Location arg0, Vector arg1, double arg2, FluidCollisionMode arg3, boolean arg4,
double arg5, Predicate<Entity> arg6) {
@ -1174,6 +1195,11 @@ public class AsyncWorld extends PassthroughExtent implements World {
return parent.getChunkAtAsync(arg0, arg1, arg2);
}
@Override
public @NotNull CompletableFuture<Chunk> getChunkAtAsync(int x, int z, boolean gen, boolean urgent) {
return null;
}
@Override
public boolean isDayTime() {
return parent.isDayTime();