Reduce decompile API blockers
Some checks failed
Build / build (push) Failing after 6m48s

This commit is contained in:
MrSphay
2026-05-04 13:33:41 +02:00
parent e41adca82b
commit 93c8d5efae
40 changed files with 472 additions and 1083 deletions

View File

@@ -98,7 +98,7 @@ extends Screen {
private static final long FORCE_CLOSE_BUFFER_MS = 2000L;
public FirstTimeScreen() {
super((Component)Component.m_237113_((String)"First Time Setup"));
super((Component)Component.literal((String)"First Time Setup"));
}
protected void m_7856_() {
@@ -259,7 +259,7 @@ extends Screen {
if (!musicStillFading) {
ExplosionOverhaul.LOGGER.info("Screen and music fade out complete. Opening TitleScreen.");
this.cleanupAnimators();
Minecraft.m_91087_().m_91152_((Screen)new TitleScreen());
Minecraft.getInstance().m_91152_((Screen)new TitleScreen());
} else {
ExplosionOverhaul.LOGGER.info("Waiting for music to finish fading...");
}
@@ -272,7 +272,7 @@ extends Screen {
this.cleanupAnimators();
this.fadingOut = false;
this.fadeOutStartMillis = -1L;
Minecraft.m_91087_().m_91152_((Screen)new TitleScreen());
Minecraft.getInstance().m_91152_((Screen)new TitleScreen());
return;
}
}
@@ -337,7 +337,7 @@ extends Screen {
}
public void m_88315_(GuiGraphics graphics, int mouseX, int mouseY, float partialTick) {
graphics.m_280509_(0, 0, this.f_96543_, this.f_96544_, -16777216);
graphics.fill(0, 0, this.f_96543_, this.f_96544_, -16777216);
if (this.screenAlpha < 0.01f) {
return;
}
@@ -359,7 +359,7 @@ extends Screen {
private void renderModeSelection(GuiGraphics graphics, int mouseX, int mouseY, float renderAlpha) {
String title = "Choose Your Explosion Style";
int titleWidth = this.f_96547_.m_92895_(title);
int titleWidth = this.f_96547_.width(title);
int titleX = (this.f_96543_ - titleWidth) / 2;
int titleY = this.leftBoxY - 40;
int titleAlpha = (int)(renderAlpha * 255.0f) << 24;
@@ -367,10 +367,10 @@ extends Screen {
graphics.m_280056_(this.f_96547_, title, titleX + 1, titleY + 1, 0xF28B0C | (int)(128.0f * renderAlpha) << 24, false);
graphics.m_280056_(this.f_96547_, title, titleX, titleY, 0xF28B0C | titleAlpha, true);
String subtitle = "You can change this anytime in the config";
int subtitleWidth = this.f_96547_.m_92895_(subtitle);
int subtitleWidth = this.f_96547_.width(subtitle);
graphics.m_280056_(this.f_96547_, subtitle, (this.f_96543_ - subtitleWidth) / 2, titleY + 15, 0xCCCCCC | titleAlpha, false);
String psNote = "P.S. Colors in the game may differ from the animations because compression has altered the colors";
int psWidth = this.f_96547_.m_92895_(psNote);
int psWidth = this.f_96547_.width(psNote);
int psColor = 0x999999 | titleAlpha;
graphics.m_280056_(this.f_96547_, psNote, (this.f_96543_ - psWidth) / 2, titleY + 30, psColor, false);
if (!this.isTransitioning) {
@@ -406,7 +406,7 @@ extends Screen {
private void renderStyleSelection(GuiGraphics graphics, int mouseX, int mouseY, float renderAlpha) {
String title = "Choose Render Style";
int titleWidth = this.f_96547_.m_92895_(title);
int titleWidth = this.f_96547_.width(title);
int titleX = (this.f_96543_ - titleWidth) / 2;
int titleY = this.leftBoxY - 40;
int titleAlpha = (int)(renderAlpha * 255.0f) << 24;
@@ -414,7 +414,7 @@ extends Screen {
graphics.m_280056_(this.f_96547_, title, titleX + 1, titleY + 1, 0xF28B0C | (int)(128.0f * renderAlpha) << 24, false);
graphics.m_280056_(this.f_96547_, title, titleX, titleY, 0xF28B0C | titleAlpha, true);
String subtitle = "Higher quality requires more VRAM";
int subtitleWidth = this.f_96547_.m_92895_(subtitle);
int subtitleWidth = this.f_96547_.width(subtitle);
graphics.m_280056_(this.f_96547_, subtitle, (this.f_96543_ - subtitleWidth) / 2, titleY + 15, 0xCCCCCC | titleAlpha, false);
if (!this.isTransitioning) {
boolean wasLeftHovered = this.leftHovered;
@@ -456,10 +456,10 @@ extends Screen {
if (hovered) {
int glowSize = 4;
int glowAlpha = (int)(128.0f * alpha) << 24;
graphics.m_280509_(-glowSize, -glowSize, width + glowSize, height + glowSize, accentColor & 0xFFFFFF | glowAlpha);
graphics.fill(-glowSize, -glowSize, width + glowSize, height + glowSize, accentColor & 0xFFFFFF | glowAlpha);
}
int bgAlpha = (int)(255.0f * alpha) << 24;
graphics.m_280509_(0, 0, width, height, 0x591515 | bgAlpha);
graphics.fill(0, 0, width, height, 0x591515 | bgAlpha);
if (animator != null && animator.getTextureLocation() != null) {
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
@@ -470,21 +470,21 @@ extends Screen {
} else {
int placeholderTextColor = (int)(150.0f * alpha) << 24 | 0xFFFFFFFF;
String placeholder = "[Image not found]";
int placeholderWidth = this.f_96547_.m_92895_(placeholder);
int placeholderWidth = this.f_96547_.width(placeholder);
graphics.m_280056_(this.f_96547_, placeholder, (width - placeholderWidth) / 2, height / 2 - 5, placeholderTextColor, false);
}
int borderColor = hovered ? accentColor : -2529701;
int borderAlpha = (int)(255.0f * alpha) << 24;
int fadedBorderColor = borderColor & 0xFFFFFF | borderAlpha;
graphics.m_280509_(0, 0, width, 2, fadedBorderColor);
graphics.m_280509_(0, height - 2, width, height, fadedBorderColor);
graphics.m_280509_(0, 0, 2, height, fadedBorderColor);
graphics.m_280509_(width - 2, 0, width, height, fadedBorderColor);
graphics.fill(0, 0, width, 2, fadedBorderColor);
graphics.fill(0, height - 2, width, height, fadedBorderColor);
graphics.fill(0, 0, 2, height, fadedBorderColor);
graphics.fill(width - 2, 0, width, height, fadedBorderColor);
graphics.m_280168_().m_85849_();
int labelAlpha = (int)(255.0f * alpha) << 24;
int labelColor = hovered ? accentColor : -1;
int fadedLabelColor = labelColor & 0xFFFFFF | labelAlpha;
int labelWidth = this.f_96547_.m_92895_(label);
int labelWidth = this.f_96547_.width(label);
graphics.m_280056_(this.f_96547_, label, x + (width - labelWidth) / 2, y + height + 10, fadedLabelColor, true);
}
@@ -614,19 +614,19 @@ extends Screen {
}
case EMBER: {
int emberSize = (int)p.size;
graphics.m_280509_((int)p.x - emberSize, (int)p.y - emberSize, (int)p.x + emberSize, (int)p.y + emberSize, colorWithAlpha);
graphics.fill((int)p.x - emberSize, (int)p.y - emberSize, (int)p.x + emberSize, (int)p.y + emberSize, colorWithAlpha);
break;
}
case FLASH: {
int flashSize = (int)(p.size * 0.7f);
int flashColor = colorWithAlpha & 0xFFFFFF | (int)(finalAlpha * 180.0f) << 24;
graphics.m_280509_((int)p.x - flashSize, (int)p.y - flashSize, (int)p.x + flashSize, (int)p.y + flashSize, flashColor);
graphics.fill((int)p.x - flashSize, (int)p.y - flashSize, (int)p.x + flashSize, (int)p.y + flashSize, flashColor);
break;
}
case SMOKE: {
int smokeSize = (int)p.size;
int smokeColor = colorWithAlpha & 0xFFFFFF | (int)(finalAlpha * 60.0f) << 24;
graphics.m_280509_((int)p.x - smokeSize, (int)p.y - smokeSize, (int)p.x + smokeSize, (int)p.y + smokeSize, smokeColor);
graphics.fill((int)p.x - smokeSize, (int)p.y - smokeSize, (int)p.x + smokeSize, (int)p.y + smokeSize, smokeColor);
}
}
}
@@ -636,20 +636,20 @@ extends Screen {
int vignetteAlpha = (int)(ratio * ratio * 180.0f * globalAlpha);
int vignetteColor = vignetteAlpha << 24;
int thickness = 4;
graphics.m_280509_(0, i * thickness, this.f_96543_, (i + 1) * thickness, vignetteColor);
graphics.m_280509_(0, this.f_96544_ - (i + 1) * thickness, this.f_96543_, this.f_96544_ - i * thickness, vignetteColor);
graphics.m_280509_(i * thickness, 0, (i + 1) * thickness, this.f_96544_, vignetteColor);
graphics.m_280509_(this.f_96543_ - (i + 1) * thickness, 0, this.f_96543_ - i * thickness, this.f_96544_, vignetteColor);
graphics.fill(0, i * thickness, this.f_96543_, (i + 1) * thickness, vignetteColor);
graphics.fill(0, this.f_96544_ - (i + 1) * thickness, this.f_96543_, this.f_96544_ - i * thickness, vignetteColor);
graphics.fill(i * thickness, 0, (i + 1) * thickness, this.f_96544_, vignetteColor);
graphics.fill(this.f_96543_ - (i + 1) * thickness, 0, this.f_96543_ - i * thickness, this.f_96544_, vignetteColor);
}
for (i = 0; i < 150; ++i) {
int gx = this.random.m_188503_(this.f_96543_);
int gy = this.random.m_188503_(this.f_96544_);
int grainAlpha = (int)((float)(20 + this.random.m_188503_(30)) * globalAlpha);
int grainColor = grainAlpha << 24 | 0xFFFFFF;
graphics.m_280509_(gx, gy, gx + 1, gy + 1, grainColor);
graphics.fill(gx, gy, gx + 1, gy + 1, grainColor);
}
for (int y = 0; y < this.f_96544_; y += 4) {
graphics.m_280509_(0, y, this.f_96543_, y + 1, 0x8000000);
graphics.fill(0, y, this.f_96543_, y + 1, 0x8000000);
}
RenderSystem.disableBlend();
}
@@ -661,7 +661,7 @@ extends Screen {
int sy = y1 < y2 ? 1 : -1;
int err = dx - dy;
for (int steps = 0; steps < 200; ++steps) {
graphics.m_280509_(x1, y1, x1 + 1, y1 + 1, color);
graphics.fill(x1, y1, x1 + 1, y1 + 1, color);
if (x1 == x2 && y1 == y2) break;
int e2 = 2 * err;
if (e2 > -dy) {
@@ -710,20 +710,20 @@ extends Screen {
if (this.backButtonHovered) {
int glowSize = 3;
int glowAlpha = (int)(128.0f * alpha) << 24;
graphics.m_280509_(-glowSize, -glowSize, this.backButtonW + glowSize, this.backButtonH + glowSize, 0xF28B0C | glowAlpha);
graphics.fill(-glowSize, -glowSize, this.backButtonW + glowSize, this.backButtonH + glowSize, 0xF28B0C | glowAlpha);
}
int bgAlpha = (int)(255.0f * alpha) << 24;
graphics.m_280509_(0, 0, this.backButtonW, this.backButtonH, 0x591515 | bgAlpha);
graphics.fill(0, 0, this.backButtonW, this.backButtonH, 0x591515 | bgAlpha);
int borderColor = this.backButtonHovered ? -881908 : -2529701;
int borderAlpha = (int)(255.0f * alpha) << 24;
int fadedBorderColor = borderColor & 0xFFFFFF | borderAlpha;
graphics.m_280509_(0, 0, this.backButtonW, 2, fadedBorderColor);
graphics.m_280509_(0, this.backButtonH - 2, this.backButtonW, this.backButtonH, fadedBorderColor);
graphics.m_280509_(0, 0, 2, this.backButtonH, fadedBorderColor);
graphics.m_280509_(this.backButtonW - 2, 0, this.backButtonW, this.backButtonH, fadedBorderColor);
graphics.fill(0, 0, this.backButtonW, 2, fadedBorderColor);
graphics.fill(0, this.backButtonH - 2, this.backButtonW, this.backButtonH, fadedBorderColor);
graphics.fill(0, 0, 2, this.backButtonH, fadedBorderColor);
graphics.fill(this.backButtonW - 2, 0, this.backButtonW, this.backButtonH, fadedBorderColor);
graphics.m_280168_().m_85849_();
String buttonText = "BACK";
int textWidth = this.f_96547_.m_92895_(buttonText);
int textWidth = this.f_96547_.width(buttonText);
int textColor = this.backButtonHovered ? -881908 : -1;
int textAlpha = (int)(255.0f * alpha) << 24;
int fadedTextColor = textColor & 0xFFFFFF | textAlpha;
@@ -732,7 +732,7 @@ extends Screen {
private void playButtonSound() {
try {
Minecraft minecraft = Minecraft.m_91087_();
Minecraft minecraft = Minecraft.getInstance();
if (minecraft.m_91106_() != null) {
minecraft.m_91106_().m_120367_((SoundInstance)SimpleSoundInstance.m_119755_((SoundEvent)((SoundEvent)ModSounds.BUTTON_SOUND.get()), (float)1.0f, (float)1.0f));
}