Skip to content

Commit

Permalink
chore: Save a large amount of work
Browse files Browse the repository at this point in the history
I'm not interested in documenting all the work and in progress changes here
  • Loading branch information
Rover656 committed Jan 8, 2025
1 parent 5f809df commit 7c5d8d8
Show file tree
Hide file tree
Showing 134 changed files with 3,075 additions and 1,391 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,35 +55,35 @@ protected void centerAlignTitleLabelX() {
}

@Override
public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) {
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) {
if (menu instanceof LegacyBaseBlockEntityMenu<?> baseBlockEntityMenu
&& baseBlockEntityMenu.getBlockEntity() == null) {
return;
}

super.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick);
super.render(guiGraphics, mouseX, mouseY, partialTick);
}

@Override
protected void renderLabels(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY) {
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
if (shouldRenderLabels) {
super.renderLabels(pGuiGraphics, pMouseX, pMouseY);
super.renderLabels(guiGraphics, mouseX, mouseY);
}

// Move back to screen space rather than aligned to the background coordinates
pGuiGraphics.pose().pushPose();
pGuiGraphics.pose().translate(-leftPos, -topPos, 0.0D);
guiGraphics.pose().pushPose();
guiGraphics.pose().translate(-leftPos, -topPos, 0.0D);

int zOffset = 200;
for (var layer : overlayRenderables.keySet()) {
// Offset deeper for each layer.
pGuiGraphics.pose().pushPose();
guiGraphics.pose().pushPose();
zOffset += 150;
pGuiGraphics.pose().translate(0.0D, 0.0D, zOffset);
guiGraphics.pose().translate(0.0D, 0.0D, zOffset);

for (var overlay : overlayRenderables.get(layer)) {
if (!(overlay instanceof AbstractWidget widget) || widget.isActive()) {
overlay.render(pGuiGraphics, pMouseX, pMouseY,
overlay.render(guiGraphics, mouseX, mouseY,
Minecraft.getInstance().getTimer().getGameTimeDeltaPartialTick(false));

if (overlay instanceof BaseOverlay baseOverlay) {
Expand All @@ -92,19 +92,19 @@ protected void renderLabels(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY)
}
}

pGuiGraphics.pose().popPose();
guiGraphics.pose().popPose();
}

pGuiGraphics.pose().popPose();
guiGraphics.pose().popPose();

pGuiGraphics.pose().translate(0, 0, zOffset);
guiGraphics.pose().translate(0, 0, zOffset);

pGuiGraphics.pose().pushPose();
pGuiGraphics.pose().translate(-leftPos, -topPos, 0.0D);
guiGraphics.pose().pushPose();
guiGraphics.pose().translate(-leftPos, -topPos, 0.0D);

renderTooltip(pGuiGraphics, pMouseX, pMouseY);
renderTooltip(guiGraphics, mouseX, mouseY);

pGuiGraphics.pose().popPose();
guiGraphics.pose().popPose();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public T getBlockEntity() {
}

@Override
public boolean stillValid(Player pPlayer) {
return Container.stillValidBlockEntity(getBlockEntity(), pPlayer);
public boolean stillValid(Player player) {
return Container.stillValidBlockEntity(getBlockEntity(), player);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,12 @@
"gui.enderio.collision.mobs_pass": "Not solid to monsters",
"gui.enderio.collision.players_block": "Only solid to players",
"gui.enderio.collision.players_pass": "Not solid to players",
"gui.enderio.conduit_channel": "Conduit-Channel",
"gui.enderio.confirm": "Confirm",
"gui.enderio.filter": "Filter",
"gui.enderio.filter.blacklist": "BlackList",
"gui.enderio.filter.nbt": "Match NBT",
"gui.enderio.filter.nonbt": "Ignore NBT",
"gui.enderio.filter.whitelist": "Whitelist",
"gui.enderio.fluid_conduit.change_fluid1": "Locked Fluid:",
"gui.enderio.fluid_conduit.change_fluid2": "Click to reset!",
"gui.enderio.fluid_conduit.change_fluid3": "Fluid: %s",
"gui.enderio.ioconfig": "IO Configuration",
"gui.enderio.ioconfig.both": "Push / Pull",
"gui.enderio.ioconfig.disabled": "Disabled",
Expand All @@ -265,13 +261,24 @@
"gui.enderio.redstone.active_with_signal": "Active with Signal",
"gui.enderio.redstone.active_without_signal": "Active without Signal",
"gui.enderio.redstone.always_active": "Always Active",
"gui.enderio.redstone.black": "Black",
"gui.enderio.redstone.blue": "Blue",
"gui.enderio.redstone.brown": "Brown",
"gui.enderio.redstone.cyan": "Cyan",
"gui.enderio.redstone.gray": "Gray",
"gui.enderio.redstone.green": "Green",
"gui.enderio.redstone.light_blue": "Light Blue",
"gui.enderio.redstone.light_gray": "Light Gray",
"gui.enderio.redstone.lime": "Lime",
"gui.enderio.redstone.magenta": "Magenta",
"gui.enderio.redstone.mode": "Redstone Mode",
"gui.enderio.redstone.never_active": "Never Active",
"gui.enderio.redstone_channel": "Redstone-Channel",
"gui.enderio.round_robin.disabled": "Round Robin Disabled",
"gui.enderio.round_robin.enabled": "Round Robin Enabled",
"gui.enderio.self_feed.disabled": "Self Feed Disabled",
"gui.enderio.self_feed.enabled": "Self Feed Enabled",
"gui.enderio.redstone.orange": "Orange",
"gui.enderio.redstone.pink": "Pink",
"gui.enderio.redstone.purple": "Purple",
"gui.enderio.redstone.red": "Red",
"gui.enderio.redstone.white": "White",
"gui.enderio.redstone.yellow": "Yellow",
"gui.enderio.visible.false": "Hidden",
"gui.enderio.visible.true": "Visible",
"guidebook.enderio.book_title": "Book Title",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.enderio.base.client.gui.widget;

import com.enderio.base.client.gui.icon.EIOEnumIcons;
import com.enderio.base.common.lang.EIOEnumLang;
import com.enderio.core.client.gui.widgets.BaseEnumPickerWidget;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
Expand Down Expand Up @@ -39,7 +40,7 @@ public DyeColorPickerWidget(int pX, int pY, Supplier<DyeColor> getter, Consumer<
@Override
@Nullable
public Component getValueTooltip(DyeColor value) {
return null;
return EIOEnumLang.DYE_COLOR.get(value);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.enderio.regilite.Regilite;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.DyeColor;

public class EIOEnumLang {

Expand All @@ -20,6 +21,26 @@ public class EIOEnumLang {
.addTranslation(RedstoneControl.NEVER_ACTIVE, "Never Active")
.build();

public static final EnumTranslationMap<DyeColor> DYE_COLOR = builder(DyeColor.class,
"redstone")
.addTranslation(DyeColor.WHITE, "White")
.addTranslation(DyeColor.ORANGE, "Orange")
.addTranslation(DyeColor.MAGENTA, "Magenta")
.addTranslation(DyeColor.LIGHT_BLUE, "Light Blue")
.addTranslation(DyeColor.YELLOW, "Yellow")
.addTranslation(DyeColor.LIME, "Lime")
.addTranslation(DyeColor.PINK, "Pink")
.addTranslation(DyeColor.GRAY, "Gray")
.addTranslation(DyeColor.LIGHT_GRAY, "Light Gray")
.addTranslation(DyeColor.CYAN, "Cyan")
.addTranslation(DyeColor.PURPLE, "Purple")
.addTranslation(DyeColor.BLUE, "Blue")
.addTranslation(DyeColor.BROWN, "Brown")
.addTranslation(DyeColor.GREEN, "Green")
.addTranslation(DyeColor.RED, "Red")
.addTranslation(DyeColor.BLACK, "Black")
.build();

public static final EnumTranslationMap<GlassCollisionPredicate> GLASS_COLLISION = builder(
GlassCollisionPredicate.class, "collision")
.addTranslation(GlassCollisionPredicate.PLAYERS_PASS, "Not solid to players")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,8 @@ public class EIOLang {
public static final Component TOO_MANY_LEVELS = addTranslation("info", EnderIO.loc("too_many_levels"),
"You have more than 21862 levels, that's too much XP.");

public static final Component CONDUIT_CHANNEL = addTranslation("gui", EnderIO.loc("conduit_channel"),
"Conduit-Channel");
public static final Component REDSTONE_CHANNEL = addTranslation("gui", EnderIO.loc("redstone_channel"),
"Redstone-Channel");
public static final Component REDSTONE_MODE = addTranslation("gui", EnderIO.loc("redstone.mode"),
"Redstone Mode");
public static final Component ROUND_ROBIN_ENABLED = addTranslation("gui", EnderIO.loc("round_robin.enabled"),
"Round Robin Enabled");
public static final Component ROUND_ROBIN_DISABLED = addTranslation("gui", EnderIO.loc("round_robin.disabled"),
"Round Robin Disabled");
public static final Component SELF_FEED_ENABLED = addTranslation("gui", EnderIO.loc("self_feed.enabled"),
"Self Feed Enabled");
public static final Component SELF_FEED_DISABLED = addTranslation("gui", EnderIO.loc("self_feed.disabled"),
"Self Feed Disabled");
public static final Component FLUID_CONDUIT_CHANGE_FLUID1 = addTranslation("gui",
EnderIO.loc("fluid_conduit.change_fluid1"), "Locked Fluid:");
public static final Component FLUID_CONDUIT_CHANGE_FLUID2 = addTranslation("gui",
EnderIO.loc("fluid_conduit.change_fluid2"), "Click to reset!");
public static final MutableComponent FLUID_CONDUIT_CHANGE_FLUID3 = addTranslation("gui",
EnderIO.loc("fluid_conduit.change_fluid3"), "Fluid: %s");
"Redstone Mode");

public static final MutableComponent TANK_EMPTY_STRING = addTranslation("tooltip",
EnderIO.loc("fluid_tank.tank_empty_tooltip"), "Empty tank");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.enderio.conduits.api.Conduit;
import com.enderio.conduits.api.ConduitApi;
import com.enderio.conduits.api.ConduitCapabilities;
import com.enderio.conduits.api.ConduitDataType;
import com.enderio.conduits.api.network.node.legacy.ConduitDataType;
import com.enderio.conduits.api.ConduitType;
import com.enderio.conduits.api.EnderIOConduitsRegistries;
import com.enderio.modconduits.ConduitModule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import appeng.api.networking.IManagedGridNode;
import appeng.api.util.AECableType;
import com.enderio.base.api.network.DumbStreamCodec;
import com.enderio.conduits.api.ConduitData;
import com.enderio.conduits.api.ConduitDataType;
import com.enderio.conduits.api.network.node.legacy.ConduitData;
import com.enderio.conduits.api.network.node.legacy.ConduitDataType;
import com.mojang.serialization.MapCodec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import net.minecraft.core.Direction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import com.enderio.conduits.api.ColoredRedstoneProvider;
import com.enderio.conduits.api.Conduit;
import com.enderio.conduits.api.ConduitMenuData;
import com.enderio.conduits.api.ConduitNetwork;
import com.enderio.conduits.api.ConduitNode;
import com.enderio.conduits.api.network.ConduitNetwork;
import com.enderio.conduits.api.network.node.ConduitNode;
import com.enderio.conduits.api.ConduitType;
import com.enderio.conduits.api.EnderIOConduitsRegistries;
import com.enderio.conduits.api.ticker.ConduitTicker;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import com.enderio.base.api.filter.ResourceFilter;
import com.enderio.conduits.api.Conduit;
import com.enderio.conduits.api.ConduitMenuData;
import com.enderio.conduits.api.ConduitNode;
import com.enderio.conduits.api.network.node.ConduitNode;
import com.enderio.conduits.api.ConduitType;
import com.enderio.conduits.api.SlotType;
import com.enderio.conduits.api.bundle.SlotType;
import com.enderio.conduits.common.init.ConduitLang;
import com.enderio.core.common.util.TooltipUtil;
import com.mojang.serialization.Codec;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.enderio.modconduits.mods.mekanism;

import com.enderio.conduits.api.ConduitData;
import com.enderio.conduits.api.ConduitDataType;
import com.enderio.conduits.api.network.node.legacy.ConduitData;
import com.enderio.conduits.api.network.node.legacy.ConduitDataType;
import com.mojang.serialization.Codec;
import com.mojang.serialization.MapCodec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.enderio.modconduits.mods.mekanism;

import com.enderio.base.api.EnderIO;
import com.enderio.conduits.api.ConduitDataAccessor;
import com.enderio.conduits.api.network.node.legacy.ConduitDataAccessor;
import com.enderio.conduits.api.screen.ConduitScreenExtension;
import com.enderio.core.common.util.TooltipUtil;
import com.mojang.blaze3d.systems.RenderSystem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.enderio.modconduits.mods.mekanism;

import com.enderio.conduits.api.ColoredRedstoneProvider;
import com.enderio.conduits.api.ConduitNetwork;
import com.enderio.conduits.api.ConduitNode;
import com.enderio.conduits.api.network.ConduitNetwork;
import com.enderio.conduits.api.network.node.ConduitNode;
import com.enderio.conduits.api.ticker.CapabilityAwareConduitTicker;
import mekanism.api.Action;
import mekanism.api.chemical.Chemical;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.enderio.modconduits.mods.mekanism;

import com.enderio.conduits.api.ColoredRedstoneProvider;
import com.enderio.conduits.api.ConduitNetwork;
import com.enderio.conduits.api.network.ConduitNetwork;
import com.enderio.conduits.api.ticker.CapabilityAwareConduitTicker;
import mekanism.api.heat.IHeatHandler;
import net.minecraft.core.Direction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.enderio.base.common.init.EIOCreativeTabs;
import com.enderio.base.common.init.EIOItems;
import com.enderio.conduits.api.Conduit;
import com.enderio.conduits.api.ConduitDataType;
import com.enderio.conduits.api.network.node.legacy.ConduitDataType;
import com.enderio.conduits.api.ConduitType;
import com.enderio.conduits.api.EnderIOConduitsRegistries;
import com.enderio.conduits.api.screen.RegisterConduitScreenExtensionsEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import com.enderio.conduits.api.ColoredRedstoneProvider;
import com.enderio.conduits.api.Conduit;
import com.enderio.conduits.api.ConduitNetwork;
import com.enderio.conduits.api.ConduitNode;
import com.enderio.conduits.api.network.ConduitNetwork;
import com.enderio.conduits.api.network.node.ConduitNode;
import com.enderio.conduits.api.ticker.IOAwareConduitTicker;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import com.enderio.conduits.api.ColoredRedstoneProvider;
import com.enderio.conduits.api.Conduit;
import com.enderio.conduits.api.ConduitMenuData;
import com.enderio.conduits.api.ConduitNetwork;
import com.enderio.conduits.api.ConduitNode;
import com.enderio.conduits.api.network.ConduitNetwork;
import com.enderio.conduits.api.network.node.ConduitNode;
import com.enderio.conduits.api.ConduitType;
import com.enderio.conduits.api.ticker.ConduitTicker;
import com.mojang.serialization.MapCodec;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.enderio.modconduits.mods.refinedstorage;

import com.enderio.base.api.network.DumbStreamCodec;
import com.enderio.conduits.api.ConduitData;
import com.enderio.conduits.api.ConduitDataType;
import com.enderio.conduits.api.network.node.legacy.ConduitData;
import com.enderio.conduits.api.network.node.legacy.ConduitDataType;
import com.mojang.serialization.Codec;
import com.mojang.serialization.MapCodec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.enderio.base.common.init.EIOItems;
import com.enderio.conduits.api.Conduit;
import com.enderio.conduits.api.ConduitApi;
import com.enderio.conduits.api.ConduitDataType;
import com.enderio.conduits.api.network.node.legacy.ConduitDataType;
import com.enderio.conduits.api.ConduitType;
import com.enderio.conduits.api.EnderIOConduitsRegistries;
import com.enderio.modconduits.ConduitModule;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
{
"block.enderio.conduit": "Conduit Bundle",
"gui.enderio.conduit.enabled": "Enabled",
"gui.enderio.conduit.extract": "Extract",
"gui.enderio.conduit.input": "Input",
"gui.enderio.conduit.insert": "Insert",
"gui.enderio.conduit.output": "Output",
"gui.enderio.conduit_channel": "Channel",
"gui.enderio.fluid_conduit.change_fluid1": "Locked Fluid:",
"gui.enderio.fluid_conduit.change_fluid2": "Click to reset!",
"gui.enderio.fluid_conduit.change_fluid3": "Fluid: %s",
"gui.enderio.redstone_channel": "Signal Color",
"gui.enderio.round_robin.disabled": "Round Robin Disabled",
"gui.enderio.round_robin.enabled": "Round Robin Enabled",
"gui.enderio.self_feed.disabled": "Self Feed Disabled",
"gui.enderio.self_feed.enabled": "Self Feed Enabled",
"item.enderio.conduit": "<MISSING> Conduit",
"item.enderio.conduit.ender_energy": "Ender Energy Conduit",
"item.enderio.conduit.ender_fluid": "Ender Fluid Conduit",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class EnderIOConduits {
public static Regilite REGILITE = new Regilite(EnderIO.NAMESPACE);

public EnderIOConduits(IEventBus modEventBus, ModContainer modContainer) {
Conduits.register(modEventBus);
Conduits.register();
ConduitTypes.register(modEventBus);
ConduitBlockEntities.register(modEventBus);
ConduitMenus.register(modEventBus);
Expand All @@ -56,6 +56,8 @@ public EnderIOConduits(IEventBus modEventBus, ModContainer modContainer) {
public static void onNewRegistries(NewRegistryEvent event) {
event.register(EnderIOConduitsRegistries.CONDUIT_TYPE);
event.register(EnderIOConduitsRegistries.CONDUIT_DATA_TYPE);
event.register(EnderIOConduitsRegistries.CONDUIT_CONNECTION_CONFIG_TYPE);
event.register(EnderIOConduitsRegistries.CONDUIT_NODE_DATA_TYPE);
event.register(EnderIOConduitsRegistries.CONDUIT_NETWORK_CONTEXT_TYPE);
}

Expand Down
Loading

0 comments on commit 7c5d8d8

Please sign in to comment.