added source code for ominousdarkness to be ported to 1.20.1, ores are no longer glowing

New project that will take some time but seems to be worth it
This commit is contained in:
2025-05-27 06:42:23 -05:00
parent abab9430fa
commit d0d125303a
38 changed files with 1930 additions and 2 deletions

View File

@ -0,0 +1,43 @@
package dcaedll.ominousdarkness.sound;
import dcaedll.ominousdarkness.config.*;
import net.minecraft.client.resources.sounds.*;
import net.minecraft.sounds.*;
import net.minecraft.world.phys.*;
public class DarknessSoundInstance extends AbstractTickableSoundInstance
{
public float factor = 0;
public float maxVolume = ConfigHandler.getCommonCustom().soundEffectVolume.get().floatValue();
public DarknessSoundInstance(SoundEvent event, SoundSource source)
{
super(event, source);
volume = 0;
delay = 0;
looping = true;
}
@Override
public void tick()
{
volume = factor * maxVolume;
}
public void setPos(Vec3 pos)
{
x = pos.x;
y = pos.y;
z = pos.z;
}
public boolean canStartSilent()
{
return true;
}
public void doStop()
{
stop();
}
}