Skip to content

Commit

Permalink
More bugfixing
Browse files Browse the repository at this point in the history
  • Loading branch information
sirjonasxx committed Jul 11, 2023
1 parent 60930dc commit e135dce
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import gearth.protocol.HMessage;
import gearth.protocol.HPacket;
import org.json.JSONObject;
import utils.Utils;

import java.util.List;
import java.util.Map;
Expand All @@ -15,6 +16,8 @@ public class PresetWiredAddon extends PresetWiredBase {

public PresetWiredAddon(HPacket packet) {
super(packet);
pickedFurniSources = Utils.readIntList(packet);
pickedUserSources = Utils.readIntList(packet);
}

public PresetWiredAddon(int wiredId, List<Integer> options, String stringConfig, List<Integer> items, List<Integer> pickedFurniSources, List<Integer> pickedUserSources) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public abstract class PresetWiredBase implements PresetJsonConfigurable {
protected String stringConfig;
protected List<Integer> items;

protected List<Integer> pickedFurniSources;
protected List<Integer> pickedFurniSources; // set in subclass
protected List<Integer> pickedUserSources;

public PresetWiredBase(HPacket packet) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import gearth.protocol.HMessage;
import gearth.protocol.HPacket;
import org.json.JSONObject;
import utils.Utils;

import java.util.List;
import java.util.Map;
Expand All @@ -15,6 +16,9 @@ public class PresetWiredCondition extends PresetWiredBase {

public PresetWiredCondition(HPacket packet) {
super(packet);
quantifier = packet.readInteger();
pickedFurniSources = Utils.readIntList(packet);
pickedUserSources = Utils.readIntList(packet);
}

public PresetWiredCondition(int wiredId, List<Integer> options, String stringConfig, List<Integer> items, int quantifier, List<Integer> pickedFurniSources, List<Integer> pickedUserSources) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import gearth.protocol.HMessage;
import gearth.protocol.HPacket;
import org.json.JSONObject;
import utils.Utils;

import java.util.List;
import java.util.Map;
Expand All @@ -16,6 +17,8 @@ public class PresetWiredEffect extends PresetWiredBase {
public PresetWiredEffect(HPacket packet) {
super(packet);
delay = packet.readInteger();
pickedFurniSources = Utils.readIntList(packet);
pickedUserSources = Utils.readIntList(packet);
}

public PresetWiredEffect(int wiredId, List<Integer> options, String stringConfig, List<Integer> items, int delay, List<Integer> pickedFurniSources, List<Integer> pickedUserSources) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import gearth.protocol.HMessage;
import gearth.protocol.HPacket;
import org.json.JSONObject;
import utils.Utils;

import java.util.List;
import java.util.Map;
Expand All @@ -16,6 +17,10 @@ public class PresetWiredSelector extends PresetWiredBase {

public PresetWiredSelector(HPacket packet) {
super(packet);
filter = packet.readBoolean();
invert = packet.readBoolean();
pickedFurniSources = Utils.readIntList(packet);
pickedUserSources = Utils.readIntList(packet);
}

public PresetWiredSelector(int wiredId, List<Integer> options, String stringConfig, List<Integer> items, boolean filter, boolean invert, List<Integer> pickedFurniSources, List<Integer> pickedUserSources) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import gearth.protocol.HMessage;
import gearth.protocol.HPacket;
import org.json.JSONObject;
import utils.Utils;

import java.util.List;
import java.util.Map;
Expand All @@ -15,6 +16,8 @@ public class PresetWiredTrigger extends PresetWiredBase {

public PresetWiredTrigger(HPacket packet) {
super(packet);
pickedFurniSources = Utils.readIntList(packet);
pickedUserSources = Utils.readIntList(packet);
}

public PresetWiredTrigger(int wiredId, List<Integer> options, String stringConfig, List<Integer> items, List<Integer> pickedFurniSources, List<Integer> pickedUserSources) {
Expand Down

0 comments on commit e135dce

Please sign in to comment.