Fixed item frames and paintings not logging directional data
This commit is contained in:
parent
7398f7dfe6
commit
e462e68806
15 changed files with 132 additions and 68 deletions
|
|
@ -253,17 +253,17 @@ public class Queue {
|
|||
queueStandardData(consumerId, currentConsumer, new String[] { user, null }, new Object[] { block, type });
|
||||
}
|
||||
|
||||
protected static void queueHangingRemove(String user, BlockState block, int delay) {
|
||||
protected static void queueHangingRemove(String user, BlockState block, String blockData, int delay) {
|
||||
int currentConsumer = Consumer.currentConsumer;
|
||||
int consumerId = Consumer.newConsumerId(currentConsumer);
|
||||
addConsumer(currentConsumer, new Object[] { consumerId, Process.HANGING_REMOVE, null, 0, null, 0, delay, null });
|
||||
addConsumer(currentConsumer, new Object[] { consumerId, Process.HANGING_REMOVE, null, 0, null, 0, delay, blockData });
|
||||
queueStandardData(consumerId, currentConsumer, new String[] { user, null }, block);
|
||||
}
|
||||
|
||||
protected static void queueHangingSpawn(String user, BlockState block, Material type, int data, int delay) {
|
||||
protected static void queueHangingSpawn(String user, BlockState block, Material type, String blockData, int data, int delay) {
|
||||
int currentConsumer = Consumer.currentConsumer;
|
||||
int consumerId = Consumer.newConsumerId(currentConsumer);
|
||||
addConsumer(currentConsumer, new Object[] { consumerId, Process.HANGING_SPAWN, type, data, null, 0, delay, null });
|
||||
addConsumer(currentConsumer, new Object[] { consumerId, Process.HANGING_SPAWN, type, data, null, 0, delay, blockData });
|
||||
queueStandardData(consumerId, currentConsumer, new String[] { user, null }, block);
|
||||
}
|
||||
|
||||
|
|
@ -281,7 +281,7 @@ public class Queue {
|
|||
queueStandardData(consumerId, currentConsumer, new String[] { null, null }, data);
|
||||
}
|
||||
|
||||
protected static void queueNaturalBlockBreak(String user, BlockState block, Block relative, Material type, int data) {
|
||||
protected static void queueNaturalBlockBreak(String user, BlockState block, Block relative, Material type, String blockData, int data) {
|
||||
List<BlockState> blockStates = new ArrayList<>();
|
||||
if (relative != null) {
|
||||
blockStates.add(relative.getState());
|
||||
|
|
@ -289,7 +289,7 @@ public class Queue {
|
|||
|
||||
int currentConsumer = Consumer.currentConsumer;
|
||||
int consumerId = Consumer.newConsumerId(currentConsumer);
|
||||
addConsumer(currentConsumer, new Object[] { consumerId, Process.NATURAL_BLOCK_BREAK, type, data, null, 0, 0, null });
|
||||
addConsumer(currentConsumer, new Object[] { consumerId, Process.NATURAL_BLOCK_BREAK, type, data, null, 0, 0, blockData });
|
||||
Consumer.consumerBlockList.get(currentConsumer).put(consumerId, blockStates);
|
||||
queueStandardData(consumerId, currentConsumer, new String[] { user, null }, block);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class BlockBreakProcess {
|
|||
SkullBreakLogger.log(preparedStmt, preparedStmtSkulls, batchCount, user, block);
|
||||
}
|
||||
else {
|
||||
BlockBreakLogger.log(preparedStmt, batchCount, user, block.getLocation(), Util.getBlockId(blockType), blockDataId, meta, block.getBlockData().getAsString());
|
||||
BlockBreakLogger.log(preparedStmt, batchCount, user, block.getLocation(), Util.getBlockId(blockType), blockDataId, meta, block.getBlockData().getAsString(), blockData);
|
||||
if (forceData == 5) { // Fix for doors
|
||||
if ((blockType == Material.IRON_DOOR || BlockGroup.DOORS.contains(blockType)) && (replaceType != Material.IRON_DOOR && !BlockGroup.DOORS.contains(replaceType))) {
|
||||
Door door = (Door) block.getBlockData();
|
||||
|
|
@ -33,7 +33,7 @@ class BlockBreakProcess {
|
|||
blockData = door.getAsString();
|
||||
Location location = block.getLocation();
|
||||
location.setY(location.getY() + 1);
|
||||
BlockBreakLogger.log(preparedStmt, batchCount, user, location, Util.getBlockId(blockType), 0, null, blockData);
|
||||
BlockBreakLogger.log(preparedStmt, batchCount, user, location, Util.getBlockId(blockType), 0, null, blockData, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import net.coreprotect.utility.entity.HangingUtil;
|
|||
|
||||
class HangingRemoveProcess {
|
||||
|
||||
static void process(Object object, int delay) {
|
||||
static void process(Object object, String hangingData, int delay) {
|
||||
if (object instanceof BlockState) {
|
||||
BlockState block = (BlockState) object;
|
||||
HangingUtil.removeHanging(block, delay);
|
||||
HangingUtil.removeHanging(block, hangingData, delay);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ import net.coreprotect.utility.entity.HangingUtil;
|
|||
|
||||
class HangingSpawnProcess {
|
||||
|
||||
static void process(Object object, Material type, int data, int delay) {
|
||||
static void process(Object object, Material type, int data, String hangingData, int delay) {
|
||||
if (object instanceof BlockState) {
|
||||
BlockState block = (BlockState) object;
|
||||
HangingUtil.spawnHanging(block, type, data, delay);
|
||||
HangingUtil.spawnHanging(block, type, hangingData, data, delay);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import net.coreprotect.utility.Util;
|
|||
|
||||
class NaturalBlockBreakProcess {
|
||||
|
||||
static void process(Statement statement, PreparedStatement preparedStmt, int batchCount, int processId, int id, String user, Object object, Material blockType, int blockData) {
|
||||
static void process(Statement statement, PreparedStatement preparedStmt, int batchCount, int processId, int id, String user, Object object, Material blockType, int blockData, String overrideData) {
|
||||
if (object instanceof BlockState) {
|
||||
BlockState block = (BlockState) object;
|
||||
Map<Integer, List<BlockState>> blockLists = Consumer.consumerBlockList.get(processId);
|
||||
|
|
@ -28,7 +28,7 @@ class NaturalBlockBreakProcess {
|
|||
}
|
||||
}
|
||||
blockLists.remove(id);
|
||||
BlockBreakLogger.log(preparedStmt, batchCount, user, block.getLocation(), Util.getBlockId(blockType), blockData, null, block.getBlockData().getAsString());
|
||||
BlockBreakLogger.log(preparedStmt, batchCount, user, block.getLocation(), Util.getBlockId(blockType), blockData, null, block.getBlockData().getAsString(), overrideData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,13 +196,13 @@ public class Process {
|
|||
EntitySpawnProcess.process(statement, object, forceData);
|
||||
break;
|
||||
case Process.HANGING_REMOVE:
|
||||
HangingRemoveProcess.process(object, forceData);
|
||||
HangingRemoveProcess.process(object, (String) data[7], forceData);
|
||||
break;
|
||||
case Process.HANGING_SPAWN:
|
||||
HangingSpawnProcess.process(object, blockType, blockData, forceData);
|
||||
HangingSpawnProcess.process(object, blockType, blockData, (String) data[7], forceData);
|
||||
break;
|
||||
case Process.NATURAL_BLOCK_BREAK:
|
||||
NaturalBlockBreakProcess.process(statement, preparedStmtBlocks, i, processId, id, user, object, blockType, blockData);
|
||||
NaturalBlockBreakProcess.process(statement, preparedStmtBlocks, i, processId, id, user, object, blockType, blockData, (String) data[7]);
|
||||
break;
|
||||
case Process.MATERIAL_INSERT:
|
||||
MaterialInsertProcess.process(preparedStmtMaterials, statement, i, object, forceData);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class StructureGrowthProcess {
|
|||
int count = 0;
|
||||
for (BlockState blockState : blockStates) {
|
||||
if (count < replaceBlockCount) {
|
||||
BlockBreakLogger.log(preparedStmt, batchCount, user, blockState.getLocation(), Util.getBlockId(blockState.getType()), 0, null, blockState.getBlockData().getAsString());
|
||||
BlockBreakLogger.log(preparedStmt, batchCount, user, blockState.getLocation(), Util.getBlockId(blockState.getType()), 0, null, blockState.getBlockData().getAsString(), null);
|
||||
}
|
||||
else {
|
||||
BlockPlaceLogger.log(preparedStmt, batchCount, user, blockState, 0, 0, null, -1, false, null, null, null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue