Add project sources and fix .gitignore for Gradle build

- .gitignore: exclude build/, .gradle/, IDE files, OS files
- Gradle 8.12 multi-version build system (Fabric Loom 1.9.1)
- Full source: JustASplash entrypoint, config, asset cache, keybind, renderer, sound, image loaders (PNG/WebP), WindowMixin
- Resources: fabric.mod.json, mixins, localization (en/ru), default splash.png + sounds, icon
- Refactored from me.sashegdev to net.anomaly.justasplash package
This commit is contained in:
SashegDev
2026-06-08 13:09:56 +00:00
parent 3b859612c1
commit aecbde98b0
28 changed files with 1454 additions and 37 deletions
@@ -0,0 +1,35 @@
package net.anomaly.justasplash;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.sound.SoundEvent;
import net.minecraft.util.Identifier;
import net.anomaly.justasplash.config.SplashConfig;
import net.anomaly.justasplash.splash.SplashAssetCache;
import net.anomaly.justasplash.splash.SplashKeybind;
import net.anomaly.justasplash.splash.SplashManager;
import net.anomaly.justasplash.splash.SplashSound;
import net.anomaly.justasplash.util.Compat;
public class JustASplash implements ClientModInitializer {
public static final Identifier SPLASH_SOUND_ID = Compat.id("justasplash", "splash");
public static SoundEvent SPLASH_SOUND_EVENT;
@Override
public void onInitializeClient() {
SPLASH_SOUND_EVENT = SoundEvent.of(SPLASH_SOUND_ID);
Registry.register(Registries.SOUND_EVENT, SPLASH_SOUND_ID, SPLASH_SOUND_EVENT);
SplashConfig.load();
SplashAssetCache.preload();
SplashKeybind.register();
SplashSound.setup();
ClientTickEvents.END_CLIENT_TICK.register(client -> {
if (SplashKeybind.wasPressed()) SplashManager.show();
SplashManager.tick();
});
}
}