mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 12:13:54 -07:00
Implemented BlockState.update(boolean), signs should now work, cleaned up some code a little
This commit is contained in:
@@ -4,6 +4,7 @@ package org.bukkit.craftbukkit;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.craftbukkit.block.CraftBlockState;
|
||||
import org.bukkit.craftbukkit.block.CraftSign;
|
||||
|
||||
public class CraftBlock implements Block {
|
||||
private final CraftWorld world;
|
||||
@@ -253,6 +254,15 @@ public class CraftBlock implements Block {
|
||||
}
|
||||
|
||||
public BlockState getState() {
|
||||
return new CraftBlockState(world, x, y, z, type, data);
|
||||
Material material = getType();
|
||||
|
||||
switch (material) {
|
||||
case Sign:
|
||||
case SignPost:
|
||||
case WallSign:
|
||||
return new CraftSign(this);
|
||||
default:
|
||||
return new CraftBlockState(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user