Skip to content

Commit

Permalink
Added changeable panoramas based on current date.
Browse files Browse the repository at this point in the history
  • Loading branch information
VipCoder8 committed Nov 8, 2024
1 parent e369835 commit 908b058
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import net.fyoncle.elysiumdaystweaks.utility.constants.Constants;
import net.fyoncle.elysiumdaystweaks.utility.constants.Textures;
import net.fyoncle.elysiumdaystweaks.utility.other.Flags;
import net.fyoncle.elysiumdaystweaks.utility.other.HolidayChecker;
import net.fyoncle.elysiumdaystweaks.utility.other.Strings;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.TitleScreen;
Expand Down Expand Up @@ -35,7 +36,19 @@ private void addModsButton(CallbackInfo ci) {
addNewUpdateButton(Flags.IS_LATEST_VERSION, button);
}
}
this.PANORAMA_OVERLAY = new Identifier("elysium-days-tweaks", "panoramas/halloween_panorama.png");
changePanoramaBasedOnDate();
}

@Unique
private void changePanoramaBasedOnDate() {
if(HolidayChecker.isHalloween()) {
PANORAMA_OVERLAY = Textures.ED_HALLOWEEN_PANORAMA;
} else if(HolidayChecker.isChristmas()) {
PANORAMA_OVERLAY = Textures.ED_CHRISTMAS_PANORAMA;
}
if(!HolidayChecker.isChristmas() && !HolidayChecker.isHalloween()) {
PANORAMA_OVERLAY = Textures.ED_DEFAULT_PANORAMA;
}
}

@Unique
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,15 @@ public class Textures {
public static final Identifier ED_CHRISTMAS_LOGO = new Identifier("elysium-days-tweaks",
"logos/edchristmaslogo.png");


// Menu Panoramas
public static final Identifier ED_HALLOWEEN_PANORAMA = new Identifier("elysium-days-tweaks",
"panoramas/halloween_panorama.png");

public static final Identifier ED_CHRISTMAS_PANORAMA = new Identifier("elysium-days-tweaks",
"panoramas/christmas_panorama.png");

public static final Identifier ED_DEFAULT_PANORAMA = new Identifier("elysium-days-tweaks",
"panoramas/default_panorama.png");

}

0 comments on commit 908b058

Please sign in to comment.