Port first NeoForge API surface
Some checks failed
Build / build (push) Failing after 6m57s

This commit is contained in:
MrSphay
2026-05-04 13:06:40 +02:00
parent 215ab3b080
commit ee922ac831
30 changed files with 543 additions and 472 deletions

View File

@@ -3,6 +3,7 @@
*/
package com.vinlanx.explosionoverhaul.client;
import net.minecraft.core.registries.BuiltInRegistries;
import com.mojang.blaze3d.systems.RenderSystem;
import com.vinlanx.explosionoverhaul.Config;
import com.vinlanx.explosionoverhaul.ModParticles;
@@ -43,8 +44,7 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3;
import net.neoforged.neoforge.client.event.RenderGuiOverlayEvent;
import net.neoforged.neoforge.registries.ForgeRegistries;
import net.neoforged.neoforge.client.event.RenderGuiEvent;
public class ClientEffects {
private static float currentShakeIntensity = 0.0f;
@@ -62,7 +62,7 @@ public class ClientEffects {
private static final List<PendingShake> pendingShakes = new ArrayList<PendingShake>();
public static void addTrackedSound(PlayTrackedSoundPacket msg) {
SoundEvent sound = (SoundEvent)ForgeRegistries.SOUND_EVENTS.getValue(msg.getSoundId());
SoundEvent sound = (SoundEvent)BuiltInRegistries.SOUND_EVENT.getValue(msg.getSoundId());
if (sound != null) {
activeTrackedSounds.add(new TrackedSound(msg.getExplosionPos(), sound, msg.getVolume(), msg.getPitch(), msg.getDelayTicks(), msg.isPlayerInHouse()));
}
@@ -167,7 +167,7 @@ public class ClientEffects {
activeFlashEffects.removeIf(effect -> effect.isFinished());
}
public static void renderFlash(RenderGuiOverlayEvent.Post event) {
public static void renderFlash(RenderGuiEvent.Post event) {
if (!((Boolean)Config.CLIENT.enableFlashEffect.get()).booleanValue()) {
return;
}