Skip to content

Commit

Permalink
remove handlerName fields from slot & tank in favor of using the pre-…
Browse files Browse the repository at this point in the history
…existing `id` field for the same thing
  • Loading branch information
screret committed Dec 9, 2024
1 parent ca156ba commit 6bd2d40
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.gregtechceu.gtceu.api.ui.core.PositionedRectangle;
import com.gregtechceu.gtceu.api.ui.core.Sizing;
import com.gregtechceu.gtceu.api.ui.core.UIGuiGraphics;
import com.gregtechceu.gtceu.api.ui.parsing.UIModel;
import com.gregtechceu.gtceu.api.ui.parsing.UIParsing;
import com.gregtechceu.gtceu.api.ui.util.pond.UISlotExtension;
import com.gregtechceu.gtceu.core.mixins.ui.accessor.SlotAccessor;
Expand All @@ -27,7 +26,6 @@
import org.w3c.dom.Element;

import javax.annotation.Nullable;
import java.util.Map;

@Accessors(fluent = true, chain = true)
public class SlotComponent extends BaseUIComponent {
Expand All @@ -37,9 +35,6 @@ public class SlotComponent extends BaseUIComponent {
private int index;
@Getter
@Setter
protected String handlerName;
@Getter
@Setter
protected MutableSlotWrapper slot;

protected boolean didDraw = false;
Expand Down Expand Up @@ -75,12 +70,6 @@ public void draw(UIGuiGraphics context, int mouseX, int mouseY, float partialTic
scissor[0], scissor[1], scissor[2], scissor[3]));
}

@Override
public void parseProperties(UIModel model, Element element, Map<String, Element> children) {
super.parseProperties(model, element, children);
this.handlerName(element.getAttribute("handler-name").strip());
}

public static SlotComponent parse(Element element) {
UIParsing.expectAttributes(element, "index");
UIParsing.expectAttributes(element, "name");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.gregtechceu.gtceu.api.ui.core.Color;
import com.gregtechceu.gtceu.api.ui.core.Sizing;
import com.gregtechceu.gtceu.api.ui.core.UIGuiGraphics;
import com.gregtechceu.gtceu.api.ui.parsing.UIModel;
import com.gregtechceu.gtceu.api.ui.parsing.UIParsing;
import com.gregtechceu.gtceu.api.ui.util.Observable;

Expand All @@ -24,7 +23,6 @@
import org.w3c.dom.Element;

import java.util.List;
import java.util.Map;

@Accessors(fluent = true, chain = true)
public class TankComponent extends BaseUIComponent {
Expand All @@ -33,9 +31,6 @@ public class TankComponent extends BaseUIComponent {
protected IFluidHandler handler;
@Getter
protected int tank;
@Getter
@Setter
protected String handlerName;
protected Observable<FluidStack> lastFluidInTank = Observable.of(FluidStack.EMPTY);
protected int lastTankCapacity;
@Setter
Expand Down Expand Up @@ -109,12 +104,6 @@ public void draw(UIGuiGraphics graphics, int mouseX, int mouseY, float partialTi
}
}

@Override
public void parseProperties(UIModel model, Element element, Map<String, Element> children) {
super.parseProperties(model, element, children);
this.handlerName(element.getAttribute("handler-name").strip());
}

public static TankComponent parse(Element element) {
UIParsing.expectAttributes(element, "tank");
int tank = UIParsing.parseUnsignedInt(element.getAttributeNode("tank"));
Expand Down

0 comments on commit 6bd2d40

Please sign in to comment.