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

SPIGOT-4037: Improve legacy BlockState.setData

Dieser Commit ist enthalten in:
md_5 2018-07-18 09:53:50 +10:00
Ursprung 404d6e776e
Commit 3791cf947e

Datei anzeigen

@ -20,6 +20,7 @@ import org.bukkit.plugin.Plugin;
import java.util.List;
import net.minecraft.server.GeneratorAccess;
import net.minecraft.server.IBlockData;
import org.bukkit.craftbukkit.util.CraftLegacy;
public class CraftBlockState implements BlockState {
private final CraftWorld world;
@ -101,7 +102,7 @@ public class CraftBlockState implements BlockState {
}
public void setData(final MaterialData data) {
Material mat = getType();
Material mat = CraftMagicNumbers.getMaterial(this.data).getItemType();
if ((mat == null) || (mat.getData() == null)) {
this.data = CraftMagicNumbers.getBlock(data);