literally disable the entire thing
This commit is contained in:
parent
aa8773a67e
commit
b484e6fa3f
@ -378,6 +378,13 @@ public final class Settings {
|
|||||||
*/
|
*/
|
||||||
public final Setting<Boolean> pruneRegionsFromRAM = new Setting<>(false);
|
public final Setting<Boolean> pruneRegionsFromRAM = new Setting<>(false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remember the contents of containers (chests, echests, furnaces)
|
||||||
|
* <p>
|
||||||
|
* Really buggy since the packet stuff is multithreaded badly thanks to brady
|
||||||
|
*/
|
||||||
|
public final Setting<Boolean> containerMemory = new Setting<>(false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print all the debug messages to chat
|
* Print all the debug messages to chat
|
||||||
*/
|
*/
|
||||||
|
@ -65,6 +65,9 @@ public final class MemoryBehavior extends Behavior {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void onTick(TickEvent event) {
|
public synchronized void onTick(TickEvent event) {
|
||||||
|
if (!Baritone.settings().containerMemory.get()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (event.getType() == TickEvent.Type.OUT) {
|
if (event.getType() == TickEvent.Type.OUT) {
|
||||||
enderChestWindowId = null;
|
enderChestWindowId = null;
|
||||||
futureInventories.clear();
|
futureInventories.clear();
|
||||||
@ -80,6 +83,9 @@ public final class MemoryBehavior extends Behavior {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void onSendPacket(PacketEvent event) {
|
public synchronized void onSendPacket(PacketEvent event) {
|
||||||
|
if (!Baritone.settings().containerMemory.get()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Packet p = event.getPacket();
|
Packet p = event.getPacket();
|
||||||
|
|
||||||
if (event.getState() == EventState.PRE) {
|
if (event.getState() == EventState.PRE) {
|
||||||
@ -116,6 +122,9 @@ public final class MemoryBehavior extends Behavior {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void onReceivePacket(PacketEvent event) {
|
public synchronized void onReceivePacket(PacketEvent event) {
|
||||||
|
if (!Baritone.settings().containerMemory.get()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Packet p = event.getPacket();
|
Packet p = event.getPacket();
|
||||||
|
|
||||||
if (event.getState() == EventState.PRE) {
|
if (event.getState() == EventState.PRE) {
|
||||||
@ -162,6 +171,9 @@ public final class MemoryBehavior extends Behavior {
|
|||||||
|
|
||||||
|
|
||||||
private void updateInventory() {
|
private void updateInventory() {
|
||||||
|
if (!Baritone.settings().containerMemory.get()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
int windowId = ctx.player().openContainer.windowId;
|
int windowId = ctx.player().openContainer.windowId;
|
||||||
if (enderChestWindowId != null) {
|
if (enderChestWindowId != null) {
|
||||||
if (windowId == enderChestWindowId) {
|
if (windowId == enderChestWindowId) {
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
package baritone.cache;
|
package baritone.cache;
|
||||||
|
|
||||||
|
import baritone.Baritone;
|
||||||
import baritone.api.cache.IContainerMemory;
|
import baritone.api.cache.IContainerMemory;
|
||||||
import baritone.api.cache.IRememberedInventory;
|
import baritone.api.cache.IRememberedInventory;
|
||||||
import baritone.api.utils.IPlayerContext;
|
import baritone.api.utils.IPlayerContext;
|
||||||
@ -69,6 +70,9 @@ public class ContainerMemory implements IContainerMemory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void save() throws IOException {
|
public synchronized void save() throws IOException {
|
||||||
|
if (!Baritone.settings().containerMemory.get()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
ByteBuf buf = Unpooled.buffer(0, Integer.MAX_VALUE);
|
ByteBuf buf = Unpooled.buffer(0, Integer.MAX_VALUE);
|
||||||
PacketBuffer out = new PacketBuffer(buf);
|
PacketBuffer out = new PacketBuffer(buf);
|
||||||
out.writeInt(inventories.size());
|
out.writeInt(inventories.size());
|
||||||
|
Loading…
Reference in New Issue
Block a user