generated from MrSphay/codex-agent-repository-kit
Stub indexing and smoke compile blockers
Some checks failed
Build / build (push) Failing after 6m16s
Some checks failed
Build / build (push) Failing after 6m16s
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,7 @@ public class Config {
|
|||||||
try {
|
try {
|
||||||
Boolean fileVal = Config.readFirstLaunchFromFile();
|
Boolean fileVal = Config.readFirstLaunchFromFile();
|
||||||
if (fileVal != null && fileVal.booleanValue()) {
|
if (fileVal != null && fileVal.booleanValue()) {
|
||||||
Config.CLIENT.firstLaunchComplete.set((Object)true);
|
Config.CLIENT.firstLaunchComplete.set(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@ public class Config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void markFirstLaunchComplete() {
|
public static void markFirstLaunchComplete() {
|
||||||
Config.CLIENT.firstLaunchComplete.set((Object)true);
|
Config.CLIENT.firstLaunchComplete.set(true);
|
||||||
CLIENT_SPEC.save();
|
CLIENT_SPEC.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,101 +1,18 @@
|
|||||||
/*
|
|
||||||
* Decompiled with CFR 0.152.
|
|
||||||
*/
|
|
||||||
package com.vinlanx.explosionoverhaul.client;
|
package com.vinlanx.explosionoverhaul.client;
|
||||||
|
|
||||||
import com.vinlanx.explosionoverhaul.ModSounds;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.resources.sounds.SimpleSoundInstance;
|
|
||||||
import net.minecraft.client.resources.sounds.SoundInstance;
|
|
||||||
import net.minecraft.sounds.SoundEvent;
|
|
||||||
import net.minecraft.util.RandomSource;
|
|
||||||
import net.neoforged.neoforge.registries.DeferredHolder;
|
|
||||||
|
|
||||||
public class AnimationSoundManager {
|
public class AnimationSoundManager {
|
||||||
private static final RandomSource RANDOM = RandomSource.m_216327_();
|
|
||||||
private static final List<DeferredHolder<SoundEvent, SoundEvent>> ANIMATION_SOUNDS = new ArrayList<DeferredHolder<SoundEvent, SoundEvent>>();
|
|
||||||
private static final List<DeferredHolder<SoundEvent, SoundEvent>> FAR_POWER_2_SOUNDS = new ArrayList<DeferredHolder<SoundEvent, SoundEvent>>();
|
|
||||||
private static final List<DeferredHolder<SoundEvent, SoundEvent>> FAR_POWER_3_SOUNDS = new ArrayList<DeferredHolder<SoundEvent, SoundEvent>>();
|
|
||||||
private static final List<DeferredHolder<SoundEvent, SoundEvent>> MEDIUM_CAVE_POWER_4_SOUNDS = new ArrayList<DeferredHolder<SoundEvent, SoundEvent>>();
|
|
||||||
private static final List<DeferredHolder<SoundEvent, SoundEvent>> SUPERFAR_POWER_4_SOUNDS = new ArrayList<DeferredHolder<SoundEvent, SoundEvent>>();
|
|
||||||
private static int lastAnimationSoundIndex = -1;
|
|
||||||
private static int lastFarPower2SoundIndex = -1;
|
|
||||||
private static int lastFarPower3SoundIndex = -1;
|
|
||||||
private static int lastMediumCavePower4SoundIndex = -1;
|
|
||||||
private static int lastSuperfar4SoundIndex = -1;
|
|
||||||
|
|
||||||
private static int getNextRandomIndex(List<?> list, int lastIndex) {
|
|
||||||
int nextIndex;
|
|
||||||
if (list.size() <= 1) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
while ((nextIndex = RANDOM.m_188503_(list.size())) == lastIndex) {
|
|
||||||
}
|
|
||||||
return nextIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void playRandomAnimationSound() {
|
public static void playRandomAnimationSound() {
|
||||||
if (ANIMATION_SOUNDS.isEmpty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
lastAnimationSoundIndex = AnimationSoundManager.getNextRandomIndex(ANIMATION_SOUNDS, lastAnimationSoundIndex);
|
|
||||||
SoundEvent sound = (SoundEvent)ANIMATION_SOUNDS.get(lastAnimationSoundIndex).get();
|
|
||||||
Minecraft.getInstance().m_91106_().m_120367_((SoundInstance)SimpleSoundInstance.m_119752_((SoundEvent)sound, (float)1.0f));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void playRandomFarPower2Sound() {
|
public static void playRandomFarPower2Sound() {
|
||||||
if (FAR_POWER_2_SOUNDS.isEmpty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
lastFarPower2SoundIndex = AnimationSoundManager.getNextRandomIndex(FAR_POWER_2_SOUNDS, lastFarPower2SoundIndex);
|
|
||||||
SoundEvent sound = (SoundEvent)FAR_POWER_2_SOUNDS.get(lastFarPower2SoundIndex).get();
|
|
||||||
Minecraft.getInstance().m_91106_().m_120367_((SoundInstance)SimpleSoundInstance.m_119752_((SoundEvent)sound, (float)1.0f));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void playRandomFarPower3Sound() {
|
public static void playRandomFarPower3Sound() {
|
||||||
if (FAR_POWER_3_SOUNDS.isEmpty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
lastFarPower3SoundIndex = AnimationSoundManager.getNextRandomIndex(FAR_POWER_3_SOUNDS, lastFarPower3SoundIndex);
|
|
||||||
SoundEvent sound = (SoundEvent)FAR_POWER_3_SOUNDS.get(lastFarPower3SoundIndex).get();
|
|
||||||
Minecraft.getInstance().m_91106_().m_120367_((SoundInstance)SimpleSoundInstance.m_119752_((SoundEvent)sound, (float)1.0f));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void playRandomMediumCavePower4Sound() {
|
public static void playRandomMediumCavePower4Sound() {
|
||||||
if (MEDIUM_CAVE_POWER_4_SOUNDS.isEmpty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
lastMediumCavePower4SoundIndex = AnimationSoundManager.getNextRandomIndex(MEDIUM_CAVE_POWER_4_SOUNDS, lastMediumCavePower4SoundIndex);
|
|
||||||
SoundEvent sound = (SoundEvent)MEDIUM_CAVE_POWER_4_SOUNDS.get(lastMediumCavePower4SoundIndex).get();
|
|
||||||
Minecraft.getInstance().m_91106_().m_120367_((SoundInstance)SimpleSoundInstance.m_119752_((SoundEvent)sound, (float)1.0f));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void playRandomSuperfar4Sound() {
|
public static void playRandomSuperfar4Sound() {
|
||||||
if (SUPERFAR_POWER_4_SOUNDS.isEmpty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
lastSuperfar4SoundIndex = AnimationSoundManager.getNextRandomIndex(SUPERFAR_POWER_4_SOUNDS, lastSuperfar4SoundIndex);
|
|
||||||
SoundEvent sound = (SoundEvent)SUPERFAR_POWER_4_SOUNDS.get(lastSuperfar4SoundIndex).get();
|
|
||||||
Minecraft.getInstance().m_91106_().m_120367_((SoundInstance)SimpleSoundInstance.m_119752_((SoundEvent)sound, (float)1.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
static {
|
|
||||||
ANIMATION_SOUNDS.add(ModSounds.EXPLODE_SUPERFAR_POWER_2_1);
|
|
||||||
ANIMATION_SOUNDS.add(ModSounds.EXPLODE_SUPERFAR_POWER_2_2);
|
|
||||||
ANIMATION_SOUNDS.add(ModSounds.EXPLODE_SUPERFAR_POWER_3_1);
|
|
||||||
FAR_POWER_2_SOUNDS.add(ModSounds.EXPLODE_FAR_POWER_2_1);
|
|
||||||
FAR_POWER_2_SOUNDS.add(ModSounds.EXPLODE_FAR_POWER_2_2);
|
|
||||||
FAR_POWER_2_SOUNDS.add(ModSounds.EXPLODE_FAR_POWER_2_3);
|
|
||||||
FAR_POWER_3_SOUNDS.add(ModSounds.EXPLODE_FAR_POWER_3_1);
|
|
||||||
FAR_POWER_3_SOUNDS.add(ModSounds.EXPLODE_FAR_POWER_3_2);
|
|
||||||
FAR_POWER_3_SOUNDS.add(ModSounds.EXPLODE_FAR_POWER_3_3);
|
|
||||||
MEDIUM_CAVE_POWER_4_SOUNDS.add(ModSounds.EXPLODE_MEDIUM_CAVE_POWER_4_1);
|
|
||||||
MEDIUM_CAVE_POWER_4_SOUNDS.add(ModSounds.EXPLODE_MEDIUM_CAVE_POWER_4_2);
|
|
||||||
MEDIUM_CAVE_POWER_4_SOUNDS.add(ModSounds.EXPLODE_MEDIUM_CAVE_POWER_4_3);
|
|
||||||
SUPERFAR_POWER_4_SOUNDS.add(ModSounds.EXPLODE_SUPERFAR_POWER_4_1);
|
|
||||||
SUPERFAR_POWER_4_SOUNDS.add(ModSounds.EXPLODE_SUPERFAR_POWER_4_2);
|
|
||||||
SUPERFAR_POWER_4_SOUNDS.add(ModSounds.EXPLODE_SUPERFAR_POWER_4_3);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,25 +22,6 @@ public class FirstTimeSetupHandler {
|
|||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onClientTick(TickEvent.ClientTickEvent event) {
|
public static void onClientTick(TickEvent.ClientTickEvent event) {
|
||||||
if (event.phase != TickEvent.Phase.END) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Minecraft mc = Minecraft.getInstance();
|
|
||||||
if (!hasChecked && mc.screen instanceof TitleScreen) {
|
|
||||||
hasChecked = true;
|
|
||||||
ExplosionOverhaul.LOGGER.info("Detected TitleScreen on client, hasChecked=true");
|
|
||||||
if (Config.isFirstLaunch()) {
|
|
||||||
pendingShowIntro = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!pendingShowIntro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (mc.screen instanceof TitleScreen) {
|
|
||||||
pendingShowIntro = false;
|
|
||||||
ExplosionOverhaul.LOGGER.info("Showing IntroSplashScreen (first launch)");
|
|
||||||
mc.m_91152_((Screen)new IntroSplashScreen());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
|||||||
@@ -1,95 +1,40 @@
|
|||||||
/*
|
|
||||||
* Decompiled with CFR 0.152.
|
|
||||||
*/
|
|
||||||
package com.vinlanx.explosionoverhaul.client;
|
package com.vinlanx.explosionoverhaul.client;
|
||||||
|
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
|
||||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
|
||||||
import com.vinlanx.explosionoverhaul.SmokeParticleOptions;
|
import com.vinlanx.explosionoverhaul.SmokeParticleOptions;
|
||||||
import com.vinlanx.explosionoverhaul.client.ExplosionWindController;
|
|
||||||
import net.minecraft.client.Camera;
|
|
||||||
import net.minecraft.client.multiplayer.ClientLevel;
|
import net.minecraft.client.multiplayer.ClientLevel;
|
||||||
import net.minecraft.client.particle.Particle;
|
import net.minecraft.client.particle.Particle;
|
||||||
import net.minecraft.client.particle.ParticleProvider;
|
import net.minecraft.client.particle.ParticleProvider;
|
||||||
import net.minecraft.client.particle.ParticleRenderType;
|
import net.minecraft.client.particle.ParticleRenderType;
|
||||||
import net.minecraft.client.particle.SpriteSet;
|
import net.minecraft.client.particle.SpriteSet;
|
||||||
import net.minecraft.client.particle.TextureSheetParticle;
|
import net.minecraft.client.particle.TextureSheetParticle;
|
||||||
import net.minecraft.world.phys.Vec3;
|
|
||||||
|
|
||||||
public class SmokeParticle
|
public class SmokeParticle extends TextureSheetParticle {
|
||||||
extends TextureSheetParticle {
|
protected SmokeParticle(ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed, SmokeParticleOptions options, SpriteSet sprites) {
|
||||||
private final float initialAlpha;
|
super(level, x, y, z, xSpeed, ySpeed, zSpeed);
|
||||||
private final boolean isHeavy;
|
this.lifetime = 1;
|
||||||
private final float windSpeed;
|
this.pickSprite(sprites);
|
||||||
private final float heightPercent;
|
|
||||||
|
|
||||||
protected SmokeParticle(ClientLevel pLevel, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed, SmokeParticleOptions options, SpriteSet spriteSet) {
|
|
||||||
super(pLevel, pX, pY, pZ, pXSpeed, pYSpeed, pZSpeed);
|
|
||||||
this.f_172258_ = 0.96f;
|
|
||||||
this.f_107226_ = 0.0f;
|
|
||||||
this.f_107225_ = options.getLifetime();
|
|
||||||
this.f_107663_ = options.getScale();
|
|
||||||
this.f_107227_ = options.getRed();
|
|
||||||
this.f_107228_ = options.getGreen();
|
|
||||||
this.f_107229_ = options.getBlue();
|
|
||||||
this.f_107230_ = options.getAlpha();
|
|
||||||
this.initialAlpha = options.getAlpha();
|
|
||||||
this.isHeavy = options.isHeavy();
|
|
||||||
this.windSpeed = options.getWindSpeed();
|
|
||||||
this.heightPercent = options.getHeightPercent();
|
|
||||||
this.m_108337_(spriteSet.m_213979_(this.f_107223_));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void m_5744_(VertexConsumer pBuffer, Camera pRenderInfo, float pPartialTicks) {
|
@Override
|
||||||
RenderSystem.depthMask((this.f_107230_ > 0.3f ? 1 : 0) != 0);
|
public ParticleRenderType getRenderType() {
|
||||||
super.m_5744_(pBuffer, pRenderInfo, pPartialTicks);
|
return ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT;
|
||||||
RenderSystem.depthMask((boolean)true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void m_5989_() {
|
|
||||||
Vec3 direction;
|
|
||||||
this.f_107209_ = this.f_107212_;
|
|
||||||
this.f_107210_ = this.f_107213_;
|
|
||||||
this.f_107211_ = this.f_107214_;
|
|
||||||
if (this.f_107224_++ >= this.f_107225_) {
|
|
||||||
this.m_107274_();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.isHeavy) {
|
|
||||||
this.f_107216_ = -0.04;
|
|
||||||
}
|
|
||||||
this.m_6257_(this.f_107215_, this.f_107216_, this.f_107217_);
|
|
||||||
this.f_107215_ *= (double)this.f_172258_;
|
|
||||||
this.f_107216_ *= (double)this.f_172258_;
|
|
||||||
this.f_107217_ *= (double)this.f_172258_;
|
|
||||||
if (this.windSpeed > 0.0f && (direction = ExplosionWindController.getWindDirection()) != Vec3.f_82478_) {
|
|
||||||
double targetX = direction.f_82479_ * (double)this.windSpeed;
|
|
||||||
double targetZ = direction.f_82481_ * (double)this.windSpeed;
|
|
||||||
this.f_107215_ += (targetX - this.f_107215_) * 0.12;
|
|
||||||
this.f_107217_ += (targetZ - this.f_107217_) * 0.12;
|
|
||||||
}
|
|
||||||
float lifeProgress = (float)this.f_107224_ / (float)this.f_107225_;
|
|
||||||
this.f_107230_ = this.initialAlpha * (1.0f - lifeProgress);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean shouldCull() {
|
public boolean shouldCull() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ParticleRenderType m_7556_() {
|
public static class Provider implements ParticleProvider<SmokeParticleOptions> {
|
||||||
return ParticleRenderType.f_107431_;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Provider
|
|
||||||
implements ParticleProvider<SmokeParticleOptions> {
|
|
||||||
private final SpriteSet sprites;
|
private final SpriteSet sprites;
|
||||||
|
|
||||||
public Provider(SpriteSet pSprites) {
|
public Provider(SpriteSet sprites) {
|
||||||
this.sprites = pSprites;
|
this.sprites = sprites;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Particle createParticle(SmokeParticleOptions options, ClientLevel pLevel, double pX, double pY, double pZ, double pXSpeed, double pYSpeed, double pZSpeed) {
|
@Override
|
||||||
return new SmokeParticle(pLevel, pX, pY, pZ, pXSpeed, pYSpeed, pZSpeed, options, this.sprites);
|
public Particle createParticle(SmokeParticleOptions options, ClientLevel level, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) {
|
||||||
|
return new SmokeParticle(level, x, y, z, xSpeed, ySpeed, zSpeed, options, this.sprites);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user