Skip to content

Commit 9fa33c7

Browse files
committed
feat: finally get things functional
1 parent 7b59e7c commit 9fa33c7

File tree

6 files changed

+5
-87
lines changed

6 files changed

+5
-87
lines changed

build.gradle

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ plugins {
22
id 'eclipse'
33
id 'maven-publish'
44
id 'net.neoforged.gradle.userdev' version '7.0.+'
5-
id 'net.neoforged.gradle.mixin' version '7.0.+'
65
id 'io.github.0ffz.github-packages' version '[1,2)'
76
id 'com.matthewprenger.cursegradle' version '[1.4,1.5)'
87
id 'com.modrinth.minotaur' version '[2,3)'
@@ -17,8 +16,6 @@ base {
1716

1817
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
1918

20-
minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')
21-
2219
runs {
2320
configureEach {
2421
workingDirectory project.file('run')
@@ -59,8 +56,6 @@ subsystems {
5956

6057
dependencies {
6158
implementation "net.neoforged:neoforge:${project.neoforge_version}"
62-
63-
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
6459
}
6560

6661
repositories {
@@ -81,10 +76,6 @@ tasks.named('jar', Jar).configure {
8176
}
8277
}
8378

84-
tasks.named(sourceSets.main.compileJavaTaskName) {
85-
outputs.file("${it.temporaryDir}/${it.name}-refmap.json").withPropertyName("mixin refmap")
86-
}
87-
8879
compileJava {
8980
options.incremental = false
9081
}

src/main/java/com/aetherteam/cumulus/client/gui/component/MenuSelectionList.java

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@
77
import net.minecraft.client.gui.Font;
88
import net.minecraft.client.gui.GuiGraphics;
99
import net.minecraft.client.gui.components.ObjectSelectionList;
10-
import net.minecraft.client.gui.screens.Screen;
11-
import net.minecraft.client.renderer.RenderType;
1210
import net.minecraft.network.chat.Component;
1311
import net.minecraft.util.FormattedCharSequence;
14-
import net.minecraft.util.Mth;
1512

1613
import java.util.List;
1714

@@ -26,52 +23,6 @@ public MenuSelectionList(MenuSelectionScreen parent, int width, int height, int
2623
this.refreshList();
2724
}
2825

29-
@Override
30-
public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) {
31-
this.hovered = this.isMouseOver((double)pMouseX, (double)pMouseY) ? this.getEntryAtPosition((double)pMouseX, (double)pMouseY) : null;
32-
boolean j1;
33-
if (this.renderBackground) {
34-
pGuiGraphics.setColor(0.125F, 0.125F, 0.125F, 1.0F);
35-
j1 = true;
36-
pGuiGraphics.blit(Screen.BACKGROUND_LOCATION, this.x0, this.y0, (float)this.x1, (float)(this.y1 + (int)this.getScrollAmount()), this.x1 - this.x0, this.y1 - this.y0, 32, 32);
37-
pGuiGraphics.setColor(1.0F, 1.0F, 1.0F, 1.0F);
38-
}
39-
40-
this.enableScissor(pGuiGraphics);
41-
int l1;
42-
int k1;
43-
if (this.renderHeader) {
44-
k1 = this.getRowLeft();
45-
l1 = this.y0 + 4 - (int)this.getScrollAmount();
46-
this.renderHeader(pGuiGraphics, k1, l1);
47-
}
48-
49-
this.renderList(pGuiGraphics, pMouseX, pMouseY, pPartialTick);
50-
pGuiGraphics.disableScissor();
51-
if (this.renderBackground) {
52-
j1 = true;
53-
pGuiGraphics.fillGradient(RenderType.guiOverlay(), this.x0, this.y0, this.x1, this.y0 + 4, -16777216, 0, 0);
54-
pGuiGraphics.fillGradient(RenderType.guiOverlay(), this.x0, this.y1 - 4, this.x1, this.y1, 0, -16777216, 0);
55-
}
56-
57-
k1 = this.getMaxScroll();
58-
if (k1 > 0) {
59-
l1 = this.getScrollbarPosition();
60-
int k = (int)((float)((this.y1 - this.y0) * (this.y1 - this.y0)) / (float)this.getMaxPosition());
61-
k = Mth.clamp(k, 32, this.y1 - this.y0 - 8);
62-
int l = (int)this.getScrollAmount() * (this.y1 - this.y0 - k) / k1 + this.y0;
63-
if (l < this.y0) {
64-
l = this.y0;
65-
}
66-
67-
pGuiGraphics.fill(l1, this.y0, l1 + 6, this.y1, -16777216);
68-
pGuiGraphics.blitSprite(SCROLLER_SPRITE, l1, l, 6, k);
69-
}
70-
71-
this.renderDecorations(pGuiGraphics, pMouseX, pMouseY);
72-
RenderSystem.disableBlend();
73-
}
74-
7526
@Override
7627
protected void renderSelection(GuiGraphics guiGraphics, int top, int width, int height, int outerColor, int innerColor) {
7728
int i = this.x0 + (this.width - width) / 2;

src/main/java/com/aetherteam/cumulus/client/gui/screen/MenuSelectionScreen.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public MenuSelectionScreen(Screen parentScreen) {
5252
@Override
5353
public void init() {
5454
this.menuList = new MenuSelectionList(this, this.frameWidth - (EXTERIOR_WIDTH_PADDING * 2), this.frameHeight, (this.height / 2) - (this.frameHeight / 2) + EXTERIOR_TOP_PADDING, (this.height / 2) + (this.frameHeight / 2) - EXTERIOR_BOTTOM_PADDING, 24);
55-
// this.menuList.setRenderBackground(false); //todo fix
55+
this.menuList.setRenderBackground(false);
5656
this.menuList.setLeftPos((this.width / 2) - (this.frameWidth / 2) + EXTERIOR_WIDTH_PADDING);
5757
this.addRenderableWidget(this.menuList);
5858

@@ -86,6 +86,10 @@ public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partia
8686
super.render(guiGraphics, mouseX, mouseY, partialTick);
8787
}
8888

89+
@Override
90+
public void renderBackground(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) { }
91+
92+
@Override
8993
public void renderDirtBackground(GuiGraphics guiGraphics) {
9094
RenderSystem.setShaderColor(1.75F, 1.75F, 1.75F, 1.0F);
9195
guiGraphics.blit(CreateWorldScreen.LIGHT_DIRT_BACKGROUND, 0, 0, 0, 0.0F, 0.0F, this.width, this.height, 32, 32);

src/main/java/com/aetherteam/cumulus/mixin/mixins/client/accessor/AbstractSelectionListAccessor.java

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/main/resources/META-INF/accesstransformer.cfg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/main/resources/cumulus_menus.mixins.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
},
1212
"client": [
1313
"client.MusicManagerMixin",
14-
"client.accessor.AbstractSelectionListAccessor",
1514
"client.accessor.CreateWorldScreenAccessor",
1615
"client.accessor.RealmsPlayerScreenAccessor",
1716
"client.accessor.ScreenAccessor",

0 commit comments

Comments
 (0)