Skip to content

Commit 3016890

Browse files
committed
comment log info
1 parent 12e4cf4 commit 3016890

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

Underilla-Spigot/src/main/java/com/jkantrell/mc/underilla/spigot/impl/BukkitChunkData.java

+24-24
Original file line numberDiff line numberDiff line change
@@ -71,30 +71,30 @@ public void setBlock(int x, int y, int z, Block block) {
7171
this.chunkData.setBlock(x, y, z, bukkitBlock.getBlockData());
7272

7373
if (bukkitBlock.getMaterial().equals(org.bukkit.Material.SPAWNER)) {
74-
// CraftBlock craftBlock = ((CraftBlock) world.getBlockAt(x, y, z));
75-
// world.getBlockAt(x, y, z).getState().update();
76-
org.bukkit.block.Block bblock = world.getBlockAt(x, y, z);
77-
bblock.getState().setType(org.bukkit.Material.SPAWNER);
78-
bblock.getState().update(true, true);
79-
CraftBlock craftBlock = (CraftBlock) bblock;
80-
CraftBlockState blockState = (CraftBlockState) craftBlock.getState();
81-
82-
83-
Underilla.getInstance().getLogger()
84-
.info("setBlock: Spawner block detected at " + x + ", " + y + ", " + z + " with class " + bblock.getClass()
85-
+ ", material " + bblock.getType() + ", state " + bblock.getState() + ", blockData " + bblock.getBlockData()
86-
+ ", blockData class " + bblock.getBlockData().getClass() + ", blockData material "
87-
+ bblock.getBlockData().getMaterial() + ", blockData class " + bblock.getBlockData().getClass());
88-
// CreatureSpawner creatureSpawner = new CraftCreatureSpawner(world,
89-
// new SpawnerBlockEntity(craftBlock.getPosition(), craftBlock.getState()));
90-
// creatureSpawner.
91-
92-
// TODO it's not a CreatureSpawner, it's stay at the previous block type (Deepslate, mostly).
93-
if (bblock.getState() instanceof CreatureSpawner creatureSpawner) {
94-
creatureSpawner.setSpawnedType(bukkitBlock.getSpawnedType().orElse(org.bukkit.entity.EntityType.ZOMBIE));
95-
// creatureSpawner.update();
96-
Underilla.getInstance().getLogger().info("setBlock: Spawner type set to " + creatureSpawner.getSpawnedType());
97-
}
74+
// // CraftBlock craftBlock = ((CraftBlock) world.getBlockAt(x, y, z));
75+
// // world.getBlockAt(x, y, z).getState().update();
76+
// org.bukkit.block.Block bblock = world.getBlockAt(x, y, z);
77+
// bblock.getState().setType(org.bukkit.Material.SPAWNER);
78+
// bblock.getState().update(true, true);
79+
// CraftBlock craftBlock = (CraftBlock) bblock;
80+
// CraftBlockState blockState = (CraftBlockState) craftBlock.getState();
81+
82+
83+
// Underilla.getInstance().getLogger()
84+
// .info("setBlock: Spawner block detected at " + x + ", " + y + ", " + z + " with class " + bblock.getClass()
85+
// + ", material " + bblock.getType() + ", state " + bblock.getState() + ", blockData " + bblock.getBlockData()
86+
// + ", blockData class " + bblock.getBlockData().getClass() + ", blockData material "
87+
// + bblock.getBlockData().getMaterial() + ", blockData class " + bblock.getBlockData().getClass());
88+
// // CreatureSpawner creatureSpawner = new CraftCreatureSpawner(world,
89+
// // new SpawnerBlockEntity(craftBlock.getPosition(), craftBlock.getState()));
90+
// // creatureSpawner.
91+
92+
// // TODO it's not a CreatureSpawner, it's stay at the previous block type (Deepslate, mostly).
93+
// if (bblock.getState() instanceof CreatureSpawner creatureSpawner) {
94+
// creatureSpawner.setSpawnedType(bukkitBlock.getSpawnedType().orElse(org.bukkit.entity.EntityType.ZOMBIE));
95+
// // creatureSpawner.update();
96+
// Underilla.getInstance().getLogger().info("setBlock: Spawner type set to " + creatureSpawner.getSpawnedType());
97+
// }
9898
}
9999

100100
}

Underilla-Spigot/src/main/java/com/jkantrell/mc/underilla/spigot/impl/BukkitChunkReader.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ public Optional<Block> blockFromTag(CompoundTag tag, CompoundTag blockEntity) {
6464
// System.out.println("Loaded Block Entities: " + blockEntity);
6565
// if it's a spawner or a chest
6666
if (blockEntity.getString("id").equals("minecraft:mob_spawner")) {
67-
Underilla.getInstance().getLogger().info("Interesting Spawner: " + blockEntity);
67+
// Underilla.getInstance().getLogger().info("Interesting Spawner: " + blockEntity);
6868
String spawnedType = blockEntity.getCompoundTag("SpawnData").getCompoundTag("entity").getString("id");
6969
// System.out.println("Spawner Type: " + spawnedType);
7070
if (block.get() instanceof BukkitBlock bukkitBlock) {
7171
// bukkitBlock.setBlockData(Material.SPAWNER.createBlockData());
7272
bukkitBlock.setSpawnedType(spawnedType);
73-
Underilla.getInstance().getLogger().info("blockFromTag: " + bukkitBlock.getSpawnedType());
73+
// Underilla.getInstance().getLogger().info("blockFromTag: " + bukkitBlock.getSpawnedType());
7474
}
7575

7676
// } else if (blockEntity.getString("id").equals("minecraft:chest")) {

0 commit comments

Comments
 (0)