mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
A few minor fixes
This commit is contained in:
parent
096ad1febe
commit
4e10682748
3 changed files with 9 additions and 10 deletions
|
@ -297,7 +297,8 @@ public class BukkitChunkManager extends ChunkManager {
|
|||
if (id != null) {
|
||||
value.setBlock(x, y, z, id);
|
||||
} else {
|
||||
value.setBlock(x, y, z, PlotBlock.get("air"));
|
||||
value.setBlock(x, y, z,
|
||||
PlotBlock.get("air"));
|
||||
}
|
||||
}
|
||||
for (int y = Math.min(128, ids.length);
|
||||
|
@ -1095,14 +1096,13 @@ public class BukkitChunkManager extends ChunkManager {
|
|||
Block block = world.getBlockAt(x, y, z);
|
||||
Material id = block.getType();
|
||||
if (storeNormal) {
|
||||
int typeId = id.getId();
|
||||
if (typeId == 0) {
|
||||
if (id.name().contains("AIR")) {
|
||||
ids[y] = StringPlotBlock.EVERYTHING;
|
||||
} else {
|
||||
ids[y] = PlotBlock.get((short) typeId, block.getData());
|
||||
ids[y] = PlotBlock.get(id.name());
|
||||
}
|
||||
}
|
||||
if (!id.equals(Material.AIR)) {
|
||||
if (!id.name().contains("AIR")) {
|
||||
try {
|
||||
BlockLoc bl = new BlockLoc(x + offsetX, y, z + offsetZ);
|
||||
if (block.getState() instanceof InventoryHolder) {
|
||||
|
@ -1136,7 +1136,6 @@ public class BukkitChunkManager extends ChunkManager {
|
|||
this.brewingStandContents.put(bl, invBre);
|
||||
break;
|
||||
case FURNACE:
|
||||
case LEGACY_BURNING_FURNACE:
|
||||
Furnace furnace = (Furnace) inventoryHolder;
|
||||
short burn = furnace.getBurnTime();
|
||||
short cook = furnace.getCookTime();
|
||||
|
|
|
@ -729,9 +729,9 @@ public class BukkitLegacyMappings extends LegacyMappings {
|
|||
}
|
||||
}
|
||||
}
|
||||
PlotBlock plotBlock = fromStringToLegacy(workingString);
|
||||
if (plotBlock != null) {
|
||||
return plotBlock;
|
||||
PlotBlock plotBlock;
|
||||
if (NEW_STRING_TO_LEGACY_PLOT_BLOCK.keySet().contains(workingString.toLowerCase())) {
|
||||
return PlotBlock.get(workingString);
|
||||
} else if ((plotBlock = fromLegacyToString(workingString)) != null) {
|
||||
return plotBlock;
|
||||
} else {
|
||||
|
|
|
@ -11,7 +11,7 @@ import java.util.Map;
|
|||
|
||||
public class StringPlotBlock extends PlotBlock {
|
||||
|
||||
public static final PlotBlock EVERYTHING = new StringPlotBlock("");
|
||||
public static final PlotBlock EVERYTHING = new StringPlotBlock("air");
|
||||
private static final Map<String, StringPlotBlock> STRING_PLOT_BLOCK_CACHE = new HashMap<>();
|
||||
@Getter private final String nameSpace;
|
||||
@Getter private final String itemId;
|
||||
|
|
Loading…
Reference in a new issue