Get rid of a whole bunch of logspam, make block breaking less janky after world reload?
parent
5a868589f0
commit
30151a0b9e
@ -1,27 +0,0 @@
|
||||
package net.brokenmoon.redcontrol.api;
|
||||
|
||||
import com.simon816.j65el02.Bus;
|
||||
import com.simon816.j65el02.device.Device;
|
||||
import com.simon816.j65el02.device.RedBus;
|
||||
import com.simon816.j65el02.device.RedBusState;
|
||||
import net.brokenmoon.redcontrol.RedControl;
|
||||
|
||||
public class TempBus extends Bus {
|
||||
public TempBus(RedBus redBus) {
|
||||
super(redBus);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(int address, int data, RedBusState state) {
|
||||
Device device = findDevice(address,state);
|
||||
//RedControl.LOGGER.info("Writing to bus with device " + device + "at address " + (address - device.startAddress(state)) + " with data " + data + " with target " + state.activeDeviceId + " and redbus offset of " + state.offset);
|
||||
device.write(address - device.startAddress(state) % 0x2000, data, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(int address, boolean cpuAccess, RedBusState state) {
|
||||
Device device = findDevice(address,state);
|
||||
//RedControl.LOGGER.info("Reading from bus with device " + device + "at address " + (address - device.startAddress(state)) + " with target " + state.activeDeviceId + " and redbus offset of " + state.offset);
|
||||
return device.read(address - device.startAddress(state) % 0x2000, cpuAccess, state) & 0xff;
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
package net.brokenmoon.redcontrol.api;
|
||||
|
||||
import com.simon816.j65el02.device.RedBus;
|
||||
import com.simon816.j65el02.device.RedBusState;
|
||||
import net.brokenmoon.redcontrol.RedControl;
|
||||
|
||||
public class TempRedBus extends RedBus {
|
||||
|
||||
@Override
|
||||
public void write(int address, int data, RedBusState state) {
|
||||
RedControl.LOGGER.info("Writing at " + address);
|
||||
if (!state.enabled) {
|
||||
return;
|
||||
}
|
||||
Peripheral peripheral = this.peripherals[state.activeDeviceId];
|
||||
if (peripheral != null) {
|
||||
peripheral.write(address, data & 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(int address, boolean cpuAccess, RedBusState state) {
|
||||
RedControl.LOGGER.info("Reading at " + address);
|
||||
if (!state.enabled) {
|
||||
return 0;
|
||||
}
|
||||
Peripheral peripheral = this.peripherals[state.activeDeviceId];
|
||||
if (peripheral != null) {
|
||||
return peripheral.read(address);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue