chomens moment #69420

it took 69 hours
This commit is contained in:
Chayapak 2023-08-01 19:45:50 +07:00
parent 8f5d1cc6ae
commit 85d1241a48

View file

@ -201,7 +201,7 @@ public class CorePlugin extends PositionPlugin.Listener {
final Vector3i position = entry.getPosition();
if (isCore(position)) shouldRefill = true;
if (isCore(position) && !isCommandBlockUpdate(entry.getBlock())) shouldRefill = true;
}
public void packetReceived (ClientboundSectionBlocksUpdatePacket packet) {
@ -212,14 +212,16 @@ public class CorePlugin extends PositionPlugin.Listener {
for (BlockChangeEntry entry : entries) {
final Vector3i position = entry.getPosition();
if (isCommandBlockUpdate(entry.getBlock())) continue;
if (isCore(position)) willRefill = true;
if (isCore(position) && !isCommandBlockUpdate(entry.getBlock())) willRefill = true;
}
if (willRefill) shouldRefill = true;
}
public void packetReceived (ClientboundLevelChunkWithLightPacket packet) {
shouldRefill = true; // worst fix
}
private boolean isCommandBlockUpdate(int blockState) {
return
// command block
@ -241,10 +243,6 @@ public class CorePlugin extends PositionPlugin.Listener {
);
}
public void packetReceived (ClientboundLevelChunkWithLightPacket packet) {
shouldRefill = true; // TODO: improve, this is probably the worst way to check
}
// ported from chomens bot js
private boolean isCore (Vector3i position) {
return