Fixed exclusion zones for many screens.
This commit is contained in:
+2
-2
@@ -144,13 +144,13 @@ dependencies {
|
|||||||
modApi "teamreborn:energy:${tr_energy_version}"
|
modApi "teamreborn:energy:${tr_energy_version}"
|
||||||
include "teamreborn:energy:${tr_energy_version}"
|
include "teamreborn:energy:${tr_energy_version}"
|
||||||
|
|
||||||
modCompileOnly("me.shedaniel:RoughlyEnoughItems:5.0.2-unstable") {
|
modCompileOnly("me.shedaniel:RoughlyEnoughItems:${rei_version}") {
|
||||||
exclude group: "net.fabricmc.fabric-api"
|
exclude group: "net.fabricmc.fabric-api"
|
||||||
}
|
}
|
||||||
modCompileOnly("mcp.mobius.waila:Hwyla:1.16.1-1.9.22-75") {
|
modCompileOnly("mcp.mobius.waila:Hwyla:1.16.1-1.9.22-75") {
|
||||||
exclude group: "net.fabricmc.fabric-api"
|
exclude group: "net.fabricmc.fabric-api"
|
||||||
}
|
}
|
||||||
modRuntime("me.shedaniel:RoughlyEnoughItems:5.0.2-unstable") {
|
modRuntime("me.shedaniel:RoughlyEnoughItems:${rei_version}") {
|
||||||
exclude group: "net.fabricmc.fabric-api"
|
exclude group: "net.fabricmc.fabric-api"
|
||||||
}
|
}
|
||||||
modRuntime("TechReborn:TechReborn-1.16:3.5.1+build.101") {
|
modRuntime("TechReborn:TechReborn-1.16:3.5.1+build.101") {
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ fabric_kotlin_version=1.3.61+build.1
|
|||||||
# Dependencies
|
# Dependencies
|
||||||
libblockattributes_version=0.8.0
|
libblockattributes_version=0.8.0
|
||||||
tr_energy_version=0.1.0
|
tr_energy_version=0.1.0
|
||||||
|
rei_version=5.2.10
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
# Deployment #
|
# Deployment #
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.common.base.Stopwatch;
|
import com.google.common.base.Stopwatch;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
@@ -58,6 +59,7 @@ import net.minecraft.util.Identifier;
|
|||||||
import alexiil.mc.lib.attributes.fluid.render.FluidRenderFace;
|
import alexiil.mc.lib.attributes.fluid.render.FluidRenderFace;
|
||||||
import alexiil.mc.lib.attributes.fluid.render.FluidVolumeRenderer;
|
import alexiil.mc.lib.attributes.fluid.render.FluidVolumeRenderer;
|
||||||
import alexiil.mc.lib.attributes.fluid.volume.FluidVolume;
|
import alexiil.mc.lib.attributes.fluid.volume.FluidVolume;
|
||||||
|
import me.shedaniel.math.Rectangle;
|
||||||
|
|
||||||
import appeng.api.storage.data.IAEFluidStack;
|
import appeng.api.storage.data.IAEFluidStack;
|
||||||
import appeng.api.storage.data.IAEItemStack;
|
import appeng.api.storage.data.IAEItemStack;
|
||||||
@@ -803,4 +805,7 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends HandledScr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Rectangle> getExclusionZones() {
|
||||||
|
return Lists.newArrayList(new Rectangle(x, y, backgroundWidth, backgroundHeight));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraft.screen.slot.Slot;
|
import net.minecraft.screen.slot.Slot;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
|
||||||
|
import me.shedaniel.math.Rectangle;
|
||||||
|
|
||||||
import appeng.api.config.SearchBoxMode;
|
import appeng.api.config.SearchBoxMode;
|
||||||
import appeng.api.config.Settings;
|
import appeng.api.config.Settings;
|
||||||
import appeng.api.config.SortDir;
|
import appeng.api.config.SortDir;
|
||||||
@@ -519,4 +521,14 @@ public class MEMonitorableScreen<T extends MEMonitorableContainer> extends AEBas
|
|||||||
this.init();
|
this.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Rectangle> getExclusionZones() {
|
||||||
|
List<Rectangle> zones = super.getExclusionZones();
|
||||||
|
// Button toolbar on the left
|
||||||
|
zones.add(new Rectangle(x - 18, y + 8, 18, 160));
|
||||||
|
// View-cells on the right
|
||||||
|
zones.add(new Rectangle(x + 197, y, 46, 128));
|
||||||
|
return zones;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,10 +18,14 @@
|
|||||||
|
|
||||||
package appeng.client.gui.implementations;
|
package appeng.client.gui.implementations;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.entity.player.PlayerInventory;
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
|
||||||
|
import me.shedaniel.math.Rectangle;
|
||||||
|
|
||||||
import appeng.api.config.FuzzyMode;
|
import appeng.api.config.FuzzyMode;
|
||||||
import appeng.api.config.RedstoneMode;
|
import appeng.api.config.RedstoneMode;
|
||||||
import appeng.api.config.SchedulingMode;
|
import appeng.api.config.SchedulingMode;
|
||||||
@@ -146,4 +150,11 @@ public class UpgradeableScreen<T extends UpgradeableContainer> extends AEBaseScr
|
|||||||
return this.bc instanceof ImportBusPart ? GuiText.ImportBus : GuiText.ExportBus;
|
return this.bc instanceof ImportBusPart ? GuiText.ImportBus : GuiText.ExportBus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Rectangle> getExclusionZones() {
|
||||||
|
List<Rectangle> zones = super.getExclusionZones();
|
||||||
|
zones.add(new Rectangle(x - 18, y + 8, 18, 60));
|
||||||
|
return zones;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,7 +146,8 @@ public class QuartzKnifeContainer extends AEBaseContainer {
|
|||||||
if (!inSlot.getSlot(0).extract(1).isEmpty()) {
|
if (!inSlot.getSlot(0).extract(1).isEmpty()) {
|
||||||
final ItemStack item = QuartzKnifeContainer.this.toolInv.getItemStack();
|
final ItemStack item = QuartzKnifeContainer.this.toolInv.getItemStack();
|
||||||
final ItemStack before = item.copy();
|
final ItemStack before = item.copy();
|
||||||
// FIXME FABRIC: Quartz Knife currently is not damageable due to recipe remainder concerns
|
// FIXME FABRIC: Quartz Knife currently is not damageable due to recipe
|
||||||
|
// remainder concerns
|
||||||
item.damage(1, QuartzKnifeContainer.this.getPlayerInv().player, p -> {
|
item.damage(1, QuartzKnifeContainer.this.getPlayerInv().player, p -> {
|
||||||
QuartzKnifeContainer.this.getPlayerInv()
|
QuartzKnifeContainer.this.getPlayerInv()
|
||||||
.setStack(QuartzKnifeContainer.this.getPlayerInv().selectedSlot, ItemStack.EMPTY);
|
.setStack(QuartzKnifeContainer.this.getPlayerInv().selectedSlot, ItemStack.EMPTY);
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ import net.minecraft.screen.slot.SlotActionType;
|
|||||||
import net.minecraft.text.LiteralText;
|
import net.minecraft.text.LiteralText;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
|
||||||
|
import me.shedaniel.math.Rectangle;
|
||||||
|
|
||||||
import appeng.api.config.Settings;
|
import appeng.api.config.Settings;
|
||||||
import appeng.api.config.SortDir;
|
import appeng.api.config.SortDir;
|
||||||
import appeng.api.config.SortOrder;
|
import appeng.api.config.SortOrder;
|
||||||
@@ -331,4 +333,11 @@ public class FluidTerminalScreen extends AEBaseMEScreen<FluidTerminalContainer>
|
|||||||
return "guis/terminal.png";
|
return "guis/terminal.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Rectangle> getExclusionZones() {
|
||||||
|
List<Rectangle> zones = super.getExclusionZones();
|
||||||
|
zones.add(new Rectangle(x - 18, y, 18, 40));
|
||||||
|
return zones;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ package appeng.integration.modules.jei;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -158,7 +159,7 @@ public class ReiPlugin implements REIPluginV0 {
|
|||||||
|
|
||||||
baseBoundsHandler.registerExclusionZones(AEBaseScreen.class, () -> {
|
baseBoundsHandler.registerExclusionZones(AEBaseScreen.class, () -> {
|
||||||
AEBaseScreen<?> screen = (AEBaseScreen<?>) MinecraftClient.getInstance().currentScreen;
|
AEBaseScreen<?> screen = (AEBaseScreen<?>) MinecraftClient.getInstance().currentScreen;
|
||||||
return ImmutableList.of(new Rectangle(screen.getX(), screen.getY(), screen.width, screen.height));
|
return screen != null ? screen.getExclusionZones() : Collections.emptyList();
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user