mirror of
https://github.com/BG-Software-LLC/WildLoaders.git
synced 2024-11-21 11:46:46 +01:00
Fixed errors in Spigot 1.19.4
This commit is contained in:
parent
b8400695ba
commit
7da9f07005
@ -16,7 +16,6 @@ import net.minecraft.world.level.chunk.LevelChunk;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.craftbukkit.v1_19_R3.CraftChunk;
|
|
||||||
import org.bukkit.craftbukkit.v1_19_R3.CraftServer;
|
import org.bukkit.craftbukkit.v1_19_R3.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_19_R3.CraftWorld;
|
import org.bukkit.craftbukkit.v1_19_R3.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_19_R3.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_19_R3.inventory.CraftItemStack;
|
||||||
@ -104,7 +103,7 @@ public final class NMSAdapter implements com.bgsoftware.wildloaders.nms.NMSAdapt
|
|||||||
serverLevel.addBlockEntityTicker(ChunkLoaderBlockEntity.getTicker());
|
serverLevel.addBlockEntityTicker(ChunkLoaderBlockEntity.getTicker());
|
||||||
|
|
||||||
for (org.bukkit.Chunk bukkitChunk : chunkLoader.getLoadedChunks()) {
|
for (org.bukkit.Chunk bukkitChunk : chunkLoader.getLoadedChunks()) {
|
||||||
LevelChunk levelChunk = ((CraftChunk) bukkitChunk).getHandle();
|
LevelChunk levelChunk = serverLevel.getChunk(bukkitChunk.getX(), bukkitChunk.getZ());
|
||||||
levelChunk.getBlockEntities().values().stream()
|
levelChunk.getBlockEntities().values().stream()
|
||||||
.filter(blockEntity -> blockEntity instanceof SpawnerBlockEntity)
|
.filter(blockEntity -> blockEntity instanceof SpawnerBlockEntity)
|
||||||
.forEach(blockEntity -> {
|
.forEach(blockEntity -> {
|
||||||
@ -141,7 +140,7 @@ public final class NMSAdapter implements com.bgsoftware.wildloaders.nms.NMSAdapt
|
|||||||
serverLevel.levelEvent(null, 2001, blockPos, Block.getId(serverLevel.getBlockState(blockPos)));
|
serverLevel.levelEvent(null, 2001, blockPos, Block.getId(serverLevel.getBlockState(blockPos)));
|
||||||
|
|
||||||
for (org.bukkit.Chunk bukkitChunk : chunkLoader.getLoadedChunks()) {
|
for (org.bukkit.Chunk bukkitChunk : chunkLoader.getLoadedChunks()) {
|
||||||
LevelChunk levelChunk = ((CraftChunk) bukkitChunk).getHandle();
|
LevelChunk levelChunk = serverLevel.getChunk(bukkitChunk.getX(), bukkitChunk.getZ());
|
||||||
levelChunk.getBlockEntities().values().stream()
|
levelChunk.getBlockEntities().values().stream()
|
||||||
.filter(blockEntity -> blockEntity instanceof SpawnerBlockEntity)
|
.filter(blockEntity -> blockEntity instanceof SpawnerBlockEntity)
|
||||||
.forEach(blockEntity -> {
|
.forEach(blockEntity -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user