Skip to content

Commit

Permalink
Merge branch '1.16'
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelHillcox committed Jul 14, 2020
2 parents dd94143 + 61ebf65 commit 6942675
Show file tree
Hide file tree
Showing 13 changed files with 183 additions and 224 deletions.
18 changes: 8 additions & 10 deletions README.md
Expand Up @@ -51,14 +51,15 @@ The [Imgur Album](http://imgur.com/a/23dX5)

## Supports

A quick note on version. I try and support everything I can but with limited time I opt to discontinue every version 2 versions below the current game version. Example: we're currently on 1.14.4 so I will support 1.14.4 and 1.12.2 ( we missed 1.13 ). If you find a very big bug in an old version I might be abe to resolve it if you submit a detailed bug report.
A quick note on versioning. I try to support everything I can but with limited time I opt to discontinue every version 2 versions below the current game version. Example: we're currently on 1.14.4 so I will support 1.14.4 and 1.12.2 ( we missed 1.13 ). If you find a very big bug in an old version I might be abe to resolve it if you submit a detailed bug report.

|Minecraft Version | Mod Version | Branch | Author
|---|---|---|---
|1.15.2 | [2.2.0](https://github.com/MichaelHillcox/XRay-Mod/releases/tag/1.15.2-v2.2.0) | [/master](https://github.com/MichaelHillcox/XRay-Mod/tree/master) | [Michael Hillcox](https://github.com/MichaelHillcox)
|1.15.1 | [2.1.0](https://github.com/MichaelHillcox/XRay-Mod/releases/tag/1.15.1-v2.1.0) | [/master](https://github.com/MichaelHillcox/XRay-Mod/tree/1.15.x) | [Michael Hillcox](https://github.com/MichaelHillcox)
|1.14.4 | [2.0.4](https://github.com/MichaelHillcox/XRay-Mod/releases/tag/1.14.4-v2.0.4) | [/master](https://github.com/MichaelHillcox/XRay-Mod/tree/1.14.x) | [Michael Hillcox](https://github.com/MichaelHillcox)
|1.12.2 | [1.5.0](https://github.com/MichaelHillcox/XRay-Mod/releases/tag/1.12.2-v1.5.0) | [/1.12.2](https://github.com/MichaelHillcox/XRay-Mod/tree/1.12.2) | [Michael Hillcox](https://github.com/MichaelHillcox)
|1.16.1 | [2.3.1](https://github.com/MichaelHillcox/XRay-Mod/releases/tag/1.16-v2.3.1) | [/1.16](https://github.com/MichaelHillcox/XRay-Mod/tree/1.16) | [Michael Hillcox](https://github.com/MichaelHillcox)
|1.15.2 | [2.2.0](https://github.com/MichaelHillcox/XRay-Mod/releases/tag/1.15.2-v2.2.0) | [/1.15.x](https://github.com/MichaelHillcox/XRay-Mod/tree/1.15.x) | [Michael Hillcox](https://github.com/MichaelHillcox)
|1.15.1 | [2.1.0](https://github.com/MichaelHillcox/XRay-Mod/releases/tag/1.15.1-v2.1.0) | [/1.15.x](https://github.com/MichaelHillcox/XRay-Mod/tree/1.15.x) | [Michael Hillcox](https://github.com/MichaelHillcox)
|1.14.4 | [2.0.4 *Limited support*](https://github.com/MichaelHillcox/XRay-Mod/releases/tag/1.14.4-v2.0.4) | [/1.14.x](https://github.com/MichaelHillcox/XRay-Mod/tree/1.14.x) | [Michael Hillcox](https://github.com/MichaelHillcox)
|1.12.2 | [1.5.0 *Discontinued*](https://github.com/MichaelHillcox/XRay-Mod/releases/tag/1.12.2-v1.5.0) | [/1.12.2](https://github.com/MichaelHillcox/XRay-Mod/tree/1.12.2) | [Michael Hillcox](https://github.com/MichaelHillcox)
|1.12.1 | [1.3.4 *Discontinued*](https://github.com/MichaelHillcox/XRay-Mod/releases/tag/1.12.1-v1.3.4) | [/1.12.1](https://github.com/MichaelHillcox/XRay-Mod/tree/1.12.1) | [Michael Hillcox](https://github.com/MichaelHillcox)
|1.12 | [1.3.3 *Discontinued*](https://github.com/MichaelHillcox/XRay-Mod/releases/tag/1.12-v1.3.3) | [/1.12.x](https://github.com/MichaelHillcox/XRay-Mod/tree/1.12.x) | [Michael Hillcox](https://github.com/MichaelHillcox)
|1.11.2 | [1.3.3 *Discontinued*](https://github.com/MichaelHillcox/XRay-Mod/releases/tag/1.11.2-v1.3.3) | [/1.11.x](https://github.com/MichaelHillcox/XRay-Mod/tree/1.11.x) | [Michael Hillcox](https://github.com/MichaelHillcox)
Expand All @@ -68,9 +69,6 @@ A quick note on version. I try and support everything I can but with limited tim
|1.7.10 | [1.0.1.75 - *Discontinued*](https://github.com/MichaelHillcox/XRay-Mod/releases/tag/1.0.1.75) | [/1.7.10](https://github.com/MichaelHillcox/XRay-Mod/tree/1.7.10) | [mcd1992](https://github.com/mcd1992) ([mcd1992 / GitLab](https://gitlab.com/mcd1992)) & [Michael Hillcox](https://github.com/MichaelHillcox)
|1.6.4 | 1.0.0 - *Discontinued* | [/1.6.4](https://github.com/MichaelHillcox/XRay-Mod/tree/1.6.4) | [mcd1992](https://github.com/mcd1992) ([mcd1992 / GitLab](https://gitlab.com/mcd1992))

- Discontinued
- This means the mod will no longer be supported unless a very large bug is reported.
- Limited support
- This means the mod will only receive bug fixes when ones are listed. I will no longer be back porting feature changes unless I get bored
**Discontinued**: This means the mod is longer supported unless a game breaking bug is found.

> A big thanks CJB for his rendering system.
**Limited support**: This means the mod will only receive bug fixes when ones are listed. I will no longer be back porting feature changes unless I get bored and have time to fix them.
6 changes: 6 additions & 0 deletions build.gradle
Expand Up @@ -56,6 +56,12 @@ minecraft {
}
}

repositories {
maven {
url 'https://www.dogforce-games.com/maven/'
}
}

dependencies {
minecraft "net.minecraftforge:forge:${game_version}-${forge_version}"
}
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Expand Up @@ -2,9 +2,9 @@
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G

mod_version=2.3.0
mod_version=2.3.1
game_version=1.16.1

# Forge
forge_version=32.0.24
forge_mappings=20200514-1.16
forge_version=32.0.66
forge_mappings=20200712-1.16.1
8 changes: 4 additions & 4 deletions src/main/java/com/xray/gui/GuiHelp.java
Expand Up @@ -19,9 +19,9 @@ public GuiHelp() {

private List<LinedText> areas = new ArrayList<>();

@Override // @mcp: func_231160_c_ = init
public void func_231160_c_() {
super.func_231160_c_();
@Override
public void init() {
super.init();

areas.clear();
areas.add(new LinedText("xray.message.help.gui"));
Expand All @@ -36,7 +36,7 @@ public void renderExtra(MatrixStack stack, int x, int y, float partialTicks) {
for (LinedText linedText : areas) {
for (String line : linedText.getLines()) {
lineY += 12;
this.getFontRender().func_238405_a_(stack, line,(getWidth() / 2f) - 176, lineY, Color.WHITE.getRGB()); // @mcp: func_238405_a_ = drawtextwithshadow
this.getFontRender().drawStringWithShadow(stack, line,(getWidth() / 2f) - 176, lineY, Color.WHITE.getRGB());
}
lineY += 10;
}
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/com/xray/gui/GuiOverlay.java
Expand Up @@ -28,9 +28,8 @@ public static void RenderGameOverlayEvent(RenderGameOverlayEvent event) {

RenderSystem.color3f(0, 255, 0);
XRay.mc.getTextureManager().bindTexture(circle);
Screen.func_238463_a_(event.getMatrixStack(), 5, 5, 0f, 0f, 5, 5, 5, 5); // @mcp: func_238463_a_ = blit (7 parms) =
Screen.blit(event.getMatrixStack(), 5, 5, 0f, 0f, 5, 5, 5, 5);

// @mcp: func_238405_a_ = drawStringWithShadow
XRay.mc.fontRenderer.func_238405_a_(event.getMatrixStack(), I18n.format("xray.overlay"), 15, 4, 0xffffffff);
XRay.mc.fontRenderer.drawStringWithShadow(event.getMatrixStack(), I18n.format("xray.overlay"), 15, 4, 0xffffffff);
}
}
68 changes: 34 additions & 34 deletions src/main/java/com/xray/gui/GuiSelectionScreen.java
Expand Up @@ -75,18 +75,18 @@ public GuiSelectionScreen() {
this.originalList = this.itemList;
}

@Override // @mcp: func_231160_c_ = init
public void func_231160_c_() {
@Override
public void init() {
if( getMinecraft().player == null )
return;

this.render = this.field_230707_j_; // @mcp: field_230707_j_ = itemRender
this.field_230710_m_.clear(); // @mcp: field_230710_m_ = buttons
this.render = this.itemRenderer;
this.buttons.clear();

this.scrollList = new ScrollingBlockList((getWidth() / 2) - 37, getHeight() / 2 + 10, 203, 185, this.itemList, this);
this.field_230705_e_.add(this.scrollList); // @mcp: field_230705_e_ = children
this.children.add(this.scrollList);

this.search = new TextFieldWidget(getFontRender(), getWidth() / 2 - 137, getHeight() / 2 - 105, 202, 18, StringTextComponent.field_240750_d_); // @mcp: field_240750_d_ = empty
this.search = new TextFieldWidget(getFontRender(), getWidth() / 2 - 137, getHeight() / 2 - 105, 202, 18, StringTextComponent.EMPTY);
this.search.setCanLoseFocus(true);

// side bar buttons
Expand Down Expand Up @@ -137,12 +137,12 @@ public void func_231160_c_() {

addButton(distButtons = new SupportButtonInner((getWidth() / 2) + 79, getHeight() / 2 + 6, 120, 20, I18n.format("xray.input.show-lava", Controller.isLavaActive()), "xray.tooltips.show_lava", button -> {
Controller.toggleLava();
button.func_238482_a_(new TranslationTextComponent("xray.input.show-lava", Controller.isLavaActive())); // @mcp: func_238482_a_ = setMessage
button.setMessage(new TranslationTextComponent("xray.input.show-lava", Controller.isLavaActive()));
}));

addButton(distButtons = new SupportButtonInner((getWidth() / 2) + 79, getHeight() / 2 + 36, 120, 20, I18n.format("xray.input.distance", Controller.getRadius()), "xray.tooltips.distance", button -> {
Controller.incrementCurrentDist();
button.func_238482_a_(new TranslationTextComponent("xray.input.distance", Controller.getRadius())); // @mcp: func_238482_a_ = setMessage
button.setMessage(new TranslationTextComponent("xray.input.distance", Controller.getRadius()));
}));
addButton(new Button(getWidth() / 2 + 79, getHeight() / 2 + 58, 60, 20, new TranslationTextComponent("xray.single.help"), button -> {
getMinecraft().player.closeScreen();
Expand Down Expand Up @@ -174,35 +174,35 @@ private void updateSearch() {
lastSearch = search.getText();
}

@Override // @mcp: func_231023_e_ = tick
public void func_231023_e_() {
super.func_231023_e_();
@Override
public void tick() {
super.tick();
search.tick();

updateSearch();
}

@Override // @mcp: func_231044_a_ = mouseClicked
public boolean func_231044_a_(double x, double y, int mouse) {
if( search.func_231044_a_(x, y, mouse) )
this.func_231035_a_(search); // @mcp: func_231035_a_ = setFocused
@Override
public boolean mouseClicked(double x, double y, int mouse) {
if( search.mouseClicked(x, y, mouse) )
this.setFocused(search);

if (mouse == 1 && distButtons.func_231047_b_(x, y)) { // @mcp: func_231047_b_ = isMouseOver
if (mouse == 1 && distButtons.isMouseOver(x, y)) {
Controller.decrementCurrentDist();
distButtons.func_238482_a_(new TranslationTextComponent("xray.input.distance", Controller.getRadius())); // @mcp: func_238482_a_ = setMessage
distButtons.func_230988_a_(Minecraft.getInstance().getSoundHandler()); // @mcp: func_230988_a_ = PlayDownSound
distButtons.setMessage(new TranslationTextComponent("xray.input.distance", Controller.getRadius()));
distButtons.playDownSound(Minecraft.getInstance().getSoundHandler());
}

return super.func_231044_a_(x, y, mouse);
return super.mouseClicked(x, y, mouse);
}

@Override
public void renderExtra(MatrixStack stack, int x, int y, float partialTicks) {
this.search.func_230430_a_(stack, x, y, partialTicks); // @mcp: func_230430_a_ = render
this.scrollList.func_230430_a_(stack, x, y, partialTicks ); // @mcp: func_230430_a_ = render
// @mcp: func_238405_a_ = drawStringWithShadow
if (!search.func_230999_j_() && search.getText().equals("")) // @mcp: func_230999_j_ = isFocused
XRay.mc.fontRenderer.func_238405_a_(stack, I18n.format("xray.single.search"), (float) getWidth() / 2 - 130, (float) getHeight() / 2 - 101, Color.GRAY.getRGB());
this.search.render(stack, x, y, partialTicks);
this.scrollList.render(stack, x, y, partialTicks );

if (!search.isFocused() && search.getText().equals(""))
XRay.mc.fontRenderer.drawStringWithShadow(stack, I18n.format("xray.single.search"), (float) getWidth() / 2 - 130, (float) getHeight() / 2 - 101, Color.GRAY.getRGB());
}

@Override
Expand Down Expand Up @@ -234,7 +234,7 @@ public void setSelected(@Nullable BlockSlot entry, int mouse) {
if (entry == null)
return;

if( GuiSelectionScreen.func_231173_s_() ) { // @mcp: func_231173_s_ = hasShiftDown
if( GuiSelectionScreen.hasShiftDown() ) {
XRay.mc.player.closeScreen();
XRay.mc.displayGuiScreen( new GuiEdit(entry.block) );
return;
Expand All @@ -245,8 +245,8 @@ public void setSelected(@Nullable BlockSlot entry, int mouse) {
}

void updateEntries(List<BlockData> blocks) {
this.func_230963_j_ (); // @mcp: func_230963_j_ = clearEntries
blocks.forEach(block -> this.func_230513_b_(new BlockSlot(block, this))); // @mcp: func_230513_b_ = addEntry
this.clearEntries ();
blocks.forEach(block -> this.addEntry(new BlockSlot(block, this))); // @mcp: func_230513_b_ = addEntry
}

public static class BlockSlot extends AbstractList.AbstractListEntry<ScrollingBlockList.BlockSlot> {
Expand All @@ -262,8 +262,8 @@ public BlockData getBlock() {
return block;
}

@Override // @mcp: func_230432_a_ = render
public void func_230432_a_(MatrixStack stack, int entryIdx, int top, int left, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean p_194999_5_, float partialTicks) {
@Override
public void render(MatrixStack stack, int entryIdx, int top, int left, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean p_194999_5_, float partialTicks) {
BlockData blockData = this.block;

FontRenderer font = Minecraft.getInstance().fontRenderer;
Expand All @@ -275,12 +275,12 @@ public void func_230432_a_(MatrixStack stack, int entryIdx, int top, int left, i
Minecraft.getInstance().getItemRenderer().renderItemAndEffectIntoGUI(blockData.getItemStack(), left + 15, top + 7);
RenderHelper.disableStandardItemLighting();
if (mouseX > left && mouseX < (left + entryWidth) && mouseY > top && mouseY < (top + entryHeight) && mouseY < (this.parent.getTop() + this.parent.getHeight()) && mouseY > this.parent.getTop()) {
this.parent.parent.func_238654_b_(
this.parent.parent.renderTooltip(
stack,
Arrays.asList(new TranslationTextComponent("xray.tooltips.edit1"), new TranslationTextComponent("xray.tooltips.edit2")),
left + 15,
(entryIdx == this.parent.func_231039_at__().size() - 1 ? (top - (entryHeight - 20)) : (top + (entryHeight + 15))) // @mcp: func_231039_at__ = getEntries
); // @mcp: func_230457_a_ = renderTooltip
(entryIdx == this.parent.children().size() - 1 ? (top - (entryHeight - 20)) : (top + (entryHeight + 15))) // @mcp: func_231039_at__ = getEntries
);
}

RenderSystem.enableAlphaTest();
Expand All @@ -293,8 +293,8 @@ public void func_230432_a_(MatrixStack stack, int entryIdx, int top, int left, i
RenderSystem.disableBlend();
}

@Override // @mcp: func_231044_a_ = mouseClicked
public boolean func_231044_a_(double p_mouseClicked_1_, double p_mouseClicked_3_, int mouse) {
@Override
public boolean mouseClicked(double p_mouseClicked_1_, double p_mouseClicked_3_, int mouse) {
this.parent.setSelected(this, mouse);
return false;
}
Expand Down

0 comments on commit 6942675

Please sign in to comment.