3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

[Slightly breaking] setType(Id) will not longer reuse the previous data value

of the block and instead reset the the data value to the block's default
Dieser Commit ist enthalten in:
Thinkofdeath 2014-12-02 12:03:02 +00:00
Ursprung b58808d54d
Commit 733e4290d8

Datei anzeigen

@ -121,7 +121,8 @@ public class CraftBlock implements Block {
}
public boolean setTypeId(final int type, final boolean applyPhysics) {
return setTypeIdAndData(type, getData(), applyPhysics);
net.minecraft.server.Block block = getNMSBlock(type);
return setTypeIdAndData(type, (byte) block.toLegacyData(block.getBlockData()), applyPhysics);
}
public boolean setTypeIdAndData(final int type, final byte data, final boolean applyPhysics) {