use of org.bukkit.craftbukkit.v1_7_R4.CraftChunk in project InteractionVisualizer by LOOHP.
the class V1_13 method getTileEntities.
@Override
public NMSTileEntitySet<?, ?> getTileEntities(ChunkPosition chunk, boolean load) {
if (!chunk.isLoaded() && !load) {
return null;
}
World world = chunk.getWorld();
return new NMSTileEntitySet<net.minecraft.server.v1_13_R1.BlockPosition, net.minecraft.server.v1_13_R1.TileEntity>(((CraftChunk) chunk.getChunk()).getHandle().tileEntities, entry -> {
net.minecraft.server.v1_13_R1.BlockPosition pos = entry.getKey();
Material type = CraftMagicNumbers.getMaterial(entry.getValue().getBlock().getBlock());
TileEntityType tileEntityType = TileEntity.getTileEntityType(type);
if (tileEntityType != null) {
return new TileEntity(world, pos.getX(), pos.getY(), pos.getZ(), tileEntityType);
} else {
return null;
}
});
}
use of org.bukkit.craftbukkit.v1_7_R4.CraftChunk in project InteractionVisualizer by LOOHP.
the class V1_14 method getTileEntities.
@Override
public NMSTileEntitySet<?, ?> getTileEntities(ChunkPosition chunk, boolean load) {
if (!chunk.isLoaded() && !load) {
return null;
}
World world = chunk.getWorld();
return new NMSTileEntitySet<net.minecraft.server.v1_14_R1.BlockPosition, net.minecraft.server.v1_14_R1.TileEntity>(((CraftChunk) chunk.getChunk()).getHandle().tileEntities, entry -> {
net.minecraft.server.v1_14_R1.BlockPosition pos = entry.getKey();
Material type = CraftMagicNumbers.getMaterial(entry.getValue().getBlock().getBlock());
TileEntityType tileEntityType = TileEntity.getTileEntityType(type);
if (tileEntityType != null) {
return new TileEntity(world, pos.getX(), pos.getY(), pos.getZ(), tileEntityType);
} else {
return null;
}
});
}
use of org.bukkit.craftbukkit.v1_7_R4.CraftChunk in project InteractionVisualizer by LOOHP.
the class V1_15 method getTileEntities.
@Override
public NMSTileEntitySet<?, ?> getTileEntities(ChunkPosition chunk, boolean load) {
if (!chunk.isLoaded() && !load) {
return null;
}
World world = chunk.getWorld();
return new NMSTileEntitySet<net.minecraft.server.v1_15_R1.BlockPosition, net.minecraft.server.v1_15_R1.TileEntity>(((CraftChunk) chunk.getChunk()).getHandle().tileEntities, entry -> {
net.minecraft.server.v1_15_R1.BlockPosition pos = entry.getKey();
Material type = CraftMagicNumbers.getMaterial(entry.getValue().getBlock().getBlock());
TileEntityType tileEntityType = TileEntity.getTileEntityType(type);
if (tileEntityType != null) {
return new TileEntity(world, pos.getX(), pos.getY(), pos.getZ(), tileEntityType);
} else {
return null;
}
});
}
use of org.bukkit.craftbukkit.v1_7_R4.CraftChunk in project InteractionVisualizer by LOOHP.
the class V1_16 method getTileEntities.
@Override
public NMSTileEntitySet<?, ?> getTileEntities(ChunkPosition chunk, boolean load) {
if (!chunk.isLoaded() && !load) {
return null;
}
World world = chunk.getWorld();
return new NMSTileEntitySet<net.minecraft.server.v1_16_R1.BlockPosition, net.minecraft.server.v1_16_R1.TileEntity>(((CraftChunk) chunk.getChunk()).getHandle().tileEntities, entry -> {
net.minecraft.server.v1_16_R1.BlockPosition pos = entry.getKey();
Material type = CraftMagicNumbers.getMaterial(entry.getValue().getBlock().getBlock());
TileEntityType tileEntityType = TileEntity.getTileEntityType(type);
if (tileEntityType != null) {
return new TileEntity(world, pos.getX(), pos.getY(), pos.getZ(), tileEntityType);
} else {
return null;
}
});
}
use of org.bukkit.craftbukkit.v1_7_R4.CraftChunk in project InteractionVisualizer by LOOHP.
the class V1_16_2 method getTileEntities.
@Override
public NMSTileEntitySet<?, ?> getTileEntities(ChunkPosition chunk, boolean load) {
if (!chunk.isLoaded() && !load) {
return null;
}
World world = chunk.getWorld();
return new NMSTileEntitySet<net.minecraft.server.v1_16_R2.BlockPosition, net.minecraft.server.v1_16_R2.TileEntity>(((CraftChunk) chunk.getChunk()).getHandle().tileEntities, entry -> {
net.minecraft.server.v1_16_R2.BlockPosition pos = entry.getKey();
Material type = CraftMagicNumbers.getMaterial(entry.getValue().getBlock().getBlock());
TileEntityType tileEntityType = TileEntity.getTileEntityType(type);
if (tileEntityType != null) {
return new TileEntity(world, pos.getX(), pos.getY(), pos.getZ(), tileEntityType);
} else {
return null;
}
});
}
Aggregations