Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/generated/resources/assets/anvilcraft/lang/en_ud.json
Original file line number Diff line number Diff line change
Expand Up @@ -1034,9 +1034,11 @@
"screen.anvilcraft.resonator.pickaxe": "ǝxɐʞɔᴉԀ",
"screen.anvilcraft.resonator.shovel": "ꞁǝʌoɥS",
"screen.anvilcraft.resonator.title": "ǝpoɯ ǝʇɐuosǝɹ ɥɔʇᴉʍS",
"screen.anvilcraft.royal_grindstone.remove_curse_count": "%2$s / %1$s :sǝsɹnɔ pǝʌoɯǝᴚ",
"screen.anvilcraft.royal_grindstone.remove_repair_cost": "%2$s / %1$s :ʇsoɔ ɹᴉɐdǝɹ pǝʌoɯǝᴚ",
"screen.anvilcraft.royal_grindstone.curse_count": "%2$s / %1$s :sǝsɹnƆ",
"screen.anvilcraft.royal_grindstone.gold_cost": "%1$s :ʇsoɔ pꞁo⅁",
"screen.anvilcraft.royal_grindstone.repair_cost": "%2$s / %1$s :ʇsoɔ ɹᴉɐdǝᴚ",
"screen.anvilcraft.royal_grindstone.title": "ʇsoɔ ɹᴉɐdǝɹ puɐ ǝsɹnɔ ǝʌoɯǝᴚ",
"screen.anvilcraft.royal_grindstone.will_remove": ":ǝʌoɯǝɹ ꞁꞁᴉM",
"screen.anvilcraft.royal_steel_upgrade_smithing_template": "ǝpɐɹᵷd∩ ꞁǝǝʇS ꞁɐʎoᴚ",
"screen.anvilcraft.slot.disable.tooltip": "ɹǝʇꞁᴉɟ ʇǝs oʇ sʞɔᴉꞁɔ ɯǝʇᴉ ǝs∩",
"screen.anvilcraft.smithing_template.ember_metal_upgrade_smithing_template.additions_slot_description": "ʞɔoꞁᗺ ꞁɐʇǝW ɹǝqɯƎ ɹo ʇoᵷuI ꞁɐʇǝW ɹǝqɯƎ ǝɥʇ ʇnԀ",
Expand Down
6 changes: 4 additions & 2 deletions src/generated/resources/assets/anvilcraft/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -1034,9 +1034,11 @@
"screen.anvilcraft.resonator.pickaxe": "Pickaxe",
"screen.anvilcraft.resonator.shovel": "Shovel",
"screen.anvilcraft.resonator.title": "Switch resonate mode",
"screen.anvilcraft.royal_grindstone.remove_curse_count": "Removed curses: %1$s / %2$s",
"screen.anvilcraft.royal_grindstone.remove_repair_cost": "Removed repair cost: %1$s / %2$s",
"screen.anvilcraft.royal_grindstone.curse_count": "Curses: %1$s / %2$s",
"screen.anvilcraft.royal_grindstone.gold_cost": "Gold cost: %1$s",
"screen.anvilcraft.royal_grindstone.repair_cost": "Repair cost: %1$s / %2$s",
"screen.anvilcraft.royal_grindstone.title": "Remove curse and repair cost",
"screen.anvilcraft.royal_grindstone.will_remove": "Will remove:",
"screen.anvilcraft.royal_steel_upgrade_smithing_template": "Royal Steel Upgrade",
"screen.anvilcraft.slot.disable.tooltip": "Use item clicks to set filter",
"screen.anvilcraft.smithing_template.ember_metal_upgrade_smithing_template.additions_slot_description": "Put the Ember Metal Ingot or Ember Metal Block",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ public ActiveSilencerScreen(ActiveSilencerMenu menu, Inventory playerInventory,
@Override
protected void init() {
super.init();

this.titleLabelX = (this.imageWidth - this.font.width(this.title)) / 2;
this.titleLabelY = 3;
int buttonTop = topPos + 35;
for (int l = 0; l < 8; ++l) {
this.addRenderableWidget(new SilencerButton(
Expand Down Expand Up @@ -245,30 +246,30 @@ protected void init() {

private boolean mouseInLeft(double mouseX, double mouseY, int leftPos, int topPos) {
return mouseX >= leftPos + START_LEFT_X
&& mouseX <= leftPos + SCROLL_BAR_START_LEFT_X + SCROLL_BAR_WIDTH
&& mouseY >= topPos + SCROLL_BAR_TOP_POS_Y
&& mouseY <= topPos + SCROLL_BAR_TOP_POS_Y + SCROLL_BAR_HEIGHT;
&& mouseX <= leftPos + SCROLL_BAR_START_LEFT_X + SCROLL_BAR_WIDTH
&& mouseY >= topPos + SCROLL_BAR_TOP_POS_Y
&& mouseY <= topPos + SCROLL_BAR_TOP_POS_Y + SCROLL_BAR_HEIGHT;
}

private boolean mouseInRight(double mouseX, double mouseY, int leftPos, int topPos) {
return mouseX >= leftPos + START_RIGHT_X
&& mouseX <= leftPos + SCROLL_BAR_START_RIGHT_X + SCROLL_BAR_WIDTH
&& mouseY >= topPos + SCROLL_BAR_TOP_POS_Y
&& mouseY <= topPos + SCROLL_BAR_TOP_POS_Y + SCROLL_BAR_HEIGHT;
&& mouseX <= leftPos + SCROLL_BAR_START_RIGHT_X + SCROLL_BAR_WIDTH
&& mouseY >= topPos + SCROLL_BAR_TOP_POS_Y
&& mouseY <= topPos + SCROLL_BAR_TOP_POS_Y + SCROLL_BAR_HEIGHT;
}

private boolean mouseInLeftSlider(double mouseX, double mouseY, int leftPos, int topPos) {
return mouseX >= leftPos + SCROLL_BAR_START_LEFT_X
&& mouseX <= leftPos + SCROLL_BAR_START_LEFT_X + SCROLL_BAR_WIDTH
&& mouseY >= topPos + SCROLL_BAR_TOP_POS_Y
&& mouseY <= topPos + SCROLL_BAR_TOP_POS_Y + SCROLL_BAR_HEIGHT;
&& mouseX <= leftPos + SCROLL_BAR_START_LEFT_X + SCROLL_BAR_WIDTH
&& mouseY >= topPos + SCROLL_BAR_TOP_POS_Y
&& mouseY <= topPos + SCROLL_BAR_TOP_POS_Y + SCROLL_BAR_HEIGHT;
}

private boolean mouseInRightSlider(double mouseX, double mouseY, int leftPos, int topPos) {
return mouseX >= leftPos + SCROLL_BAR_START_RIGHT_X
&& mouseX <= leftPos + SCROLL_BAR_START_RIGHT_X + SCROLL_BAR_WIDTH
&& mouseY >= topPos + SCROLL_BAR_TOP_POS_Y
&& mouseY <= topPos + SCROLL_BAR_TOP_POS_Y + SCROLL_BAR_HEIGHT;
&& mouseX <= leftPos + SCROLL_BAR_START_RIGHT_X + SCROLL_BAR_WIDTH
&& mouseY >= topPos + SCROLL_BAR_TOP_POS_Y
&& mouseY <= topPos + SCROLL_BAR_TOP_POS_Y + SCROLL_BAR_HEIGHT;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ public void onClose() {
protected void init() {
super.init();
this.clearWidgets();
this.titleLabelX = (this.imageWidth - this.font.width(this.title)) / 2;
this.titleLabelY = 3;
SwitchableButton compareMode = new SwitchableButton(
this.leftPos + 8,
this.topPos + 24,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public BaseMachineScreen(T menu, Inventory inventory, Component title, int outpu
protected void init() {
super.init();
this.titleLabelX = (this.imageWidth - this.font.width(this.title)) / 2;
this.titleLabelY = 2;
this.titleLabelY = 3;
this.directionButton = directionButtonSupplier.apply(this.leftPos, this.topPos);
this.addRenderableWidget(directionButton);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public EmberAnvilScreen(EmberAnvilMenu menu, Inventory playerInventory, Componen
protected void init() {
super.init();
this.titleLabelX = (this.imageWidth - this.font.width(this.title)) / 2;
this.titleLabelY = 3;
}

@Override
Expand Down Expand Up @@ -96,7 +97,7 @@ private void onNameChanged(String name) {

@Override
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
super.renderLabels(guiGraphics, mouseX, mouseY);
guiGraphics.drawString(this.font, this.title, this.titleLabelX, this.titleLabelY, 4210752, false);
int i = this.menu.getCost();
if (this.menu.result.noCostInRenaming && this.menu.result.onlyRenaming || i > 0) {
Component component;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ protected void containerTick() {
protected void init() {
super.init();
this.titleLabelX = (this.imageWidth - this.font.width(this.title)) / 2;
this.titleLabelY = 3;
}

@Override
Expand Down Expand Up @@ -124,7 +125,7 @@ protected void renderEnchantmentSelectingArea(GuiGraphics guiGraphics, int mouse

@Override
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
super.renderLabels(guiGraphics, mouseX, mouseY);
guiGraphics.drawString(this.font, this.title, this.titleLabelX, this.titleLabelY, 4210752, false);

int cost = this.menu.getCost();
if (cost <= 0) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,16 @@ public EmberSmithingScreen(EmberSmithingMenu menu, Inventory inventory, Componen
super(menu, inventory, title, BACKGROUND);
}

@Override
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
guiGraphics.drawString(this.font, this.title, this.titleLabelX, this.titleLabelY, 4210752, false);
}

@Override
protected void init() {
super.init();
this.titleLabelX = (this.imageWidth - this.font.width(this.title)) / 2;
this.titleLabelY = 3;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,17 @@ protected void containerTick() {
super.containerTick();
}

@Override
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
guiGraphics.drawString(this.font, this.title, this.titleLabelX, this.titleLabelY, 4210752, false);
}

@Override
protected void init() {
super.init();
this.imageHeight = 175;
this.titleLabelX = (this.imageWidth - this.font.width(this.title)) / 2;
this.inventoryLabelY = 72;
this.titleLabelY = 3;

this.addRenderableWidget(new TexturedButton(
this.leftPos + 152,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,15 @@ public FilterScreen(FilterMenu menu, Inventory playerInventory, Component title)
super(menu, playerInventory, title);
}

@Override
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
guiGraphics.drawString(this.font, this.title, this.titleLabelX, this.titleLabelY, 4210752, false);
}

@Override
protected void init() {
super.init();

this.titleLabelY = 3;
FilterContainer container = this.getMenu().getContainer();

this.addRenderableWidget(new SwitchableButton(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public FrostAnvilScreen(FrostAnvilMenu menu, Inventory playerInventory, Componen
protected void init() {
super.init();
this.titleLabelX = (this.imageWidth - this.font.width(this.title)) / 2;
this.titleLabelY = 3;
}

@Override
Expand Down Expand Up @@ -91,7 +92,14 @@ private void onNameChanged(String name) {

@Override
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
super.renderLabels(guiGraphics, mouseX, mouseY);
guiGraphics.drawString(
this.font,
this.title,
this.titleLabelX,
this.titleLabelY,
4210752,
false
);
int i = this.menu.getCost();
if (this.menu.result.noCostInRenaming && this.menu.result.onlyRenaming || i > 0) {
Component component;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,16 @@ protected void containerTick() {
super.containerTick();
}

@Override
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
guiGraphics.drawString(this.font, this.title, this.titleLabelX, this.titleLabelY, 4210752, false);
}

@Override
protected void init() {
super.init();
this.titleLabelX = (this.imageWidth - this.font.width(this.title)) / 2;
this.titleLabelY = 3;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,16 @@ public FrostSmithingScreen(FrostSmithingMenu menu, Inventory playerInventory, Co
super(menu, playerInventory, title, BACKGROUND);
}

@Override
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
guiGraphics.drawString(this.font, this.title, this.titleLabelX, this.titleLabelY, 4210752, false);
}

@Override
protected void init() {
super.init();
this.titleLabelX = (this.imageWidth - this.font.width(this.title)) / 2;

this.titleLabelY = 3;
this.left = this.addRenderableWidget(new TexturedButton(
this.leftPos + 102,
this.topPos + 32,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ public ItemCollectorScreen(ItemCollectorMenu menu, Inventory inventory, Componen
this.minecraft = Minecraft.getInstance();
}

@Override
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
guiGraphics.drawString(this.font, this.title, this.titleLabelX, this.titleLabelY, 4210752, false);
}

@Override
protected void init() {
super.init();
this.titleLabelY = 3;
this.enableFilterButton = this.enableFilterButtonSupplier.apply(this.leftPos, this.topPos);
this.addRenderableWidget(this.enableFilterButton);
if (this.minecraft == null) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public ItemDetectorScreen(ItemDetectorMenu menu, Inventory playerInventory, Comp
this.minecraft = Minecraft.getInstance();
}

@Override
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
guiGraphics.drawString(this.font, this.title, this.titleLabelX, this.titleLabelY, 4210752, false);
}

@Override
protected void renderBg(GuiGraphics guiGraphics, float partialTick, int mouseX, int mouseY) {
int i = (this.width - this.imageWidth) / 2;
Expand All @@ -55,6 +60,8 @@ protected void renderBg(GuiGraphics guiGraphics, float partialTick, int mouseX,
@Override
protected void init() {
super.init();
this.titleLabelX = (this.imageWidth - this.font.width(this.title)) / 2;
this.titleLabelY = 3;
// filter mode
this.cycleFilterModeButton = new CycleFilterModeButton(
leftPos + 75,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,24 @@
import org.lwjgl.glfw.GLFW;

public class JewelCraftingScreen extends AbstractContainerScreen<JewelCraftingMenu> {
private static final ResourceLocation BACKGROUND = SharedTextures.bg("crafting", "jewel_crafting");
private static final ResourceLocation BACKGROUND = SharedTextures.bg("crafting", "jewelcrafting_table");

public JewelCraftingScreen(JewelCraftingMenu menu, Inventory playerInventory, Component title) {
super(menu, playerInventory, title);
}

@Override
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
guiGraphics.drawString(this.font, this.title, this.titleLabelX, this.titleLabelY, 4210752, false);
}

@Override
protected void init() {
super.init();
this.titleLabelX = (this.imageWidth - this.font.width(this.title)) / 2;
this.titleLabelY = 3;
}

@Override
protected void renderBg(GuiGraphics guiGraphics, float partialTick, int mouseX, int mouseY) {
int i = (this.width - this.imageWidth) / 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public void onClose() {
protected void init() {
super.init();
this.clearWidgets();
this.titleLabelX = (this.imageWidth - this.font.width(this.title)) / 2;
this.titleLabelY = 3;
final SwitchableButton startMode = new SwitchableButton(
this.leftPos + 28,
this.topPos + 25,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public RoyalAnvilScreen(RoyalAnvilMenu menu, Inventory playerInventory, Componen
protected void init() {
super.init();
this.titleLabelX = (this.imageWidth - this.font.width(this.title)) / 2;
this.titleLabelY = 3;
}

@Override
Expand Down Expand Up @@ -91,7 +92,7 @@ private void onNameChanged(String name) {

@Override
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
super.renderLabels(guiGraphics, mouseX, mouseY);
guiGraphics.drawString(this.font, this.title, this.titleLabelX, this.titleLabelY, 4210752, false);
int i = this.menu.getCost();
if (this.menu.result.noCostInRenaming && this.menu.result.onlyRenaming || i > 0) {
Component component;
Expand Down
Loading
Loading