mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 03:49:14 +00:00
Forge 1.19.3
Created a CreativeModeTabEvent to register creative mode tabs and populate entries per tab Moved datapack registries to DataPackRegistryEvent.NewRegistry event instead of tying them to ForgeRegistry Made it easier for mods to datagen datapack builtin entries with DatapackBuiltinEntriesProvider Provided access to lookupProvider for datagen Updated dependencies to match versions used by vanilla and update JarJar to 0.3.18 Added a test mod for the new CreativeModeTabEvent Throws better error message for Forge registries in tag datagen Deleted ForgeRegistryTagsProvider Updated ClientChatReceivedEvent and ServerChatEvent for Mojang changes Added patches for both sign related methods in ModelLayers Changed RegisterShadersEvent to use ResourceProvider Migrated old Mojang math types to JOML Co-authored-by: Marc Hermans <[email protected]> Co-authored-by: LexManos <[email protected]> Co-authored-by: sciwhiz12 <[email protected]> Co-authored-by: coehlrich <[email protected]>
This commit is contained in:
1 parent
617ecb7ad3
commit
8255d7aed3
726 files changed
+7615
-6653
No files matched your search
@@ -6,6 +6,7 @@
|
||||
package net.minecraftforge.event;
|
||||
|
||||
import net.minecraft.client.player.LocalPlayer;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
@@ -42,12 +43,12 @@ public class PlayLevelSoundEvent extends Event
|
||||
private final Level level;
|
||||
private final float originalVolume;
|
||||
private final float originalPitch;
|
||||
private SoundEvent sound;
|
||||
private Holder<SoundEvent> sound;
|
||||
private SoundSource source;
|
||||
private float newVolume;
|
||||
private float newPitch;
|
||||
|
||||
public PlayLevelSoundEvent(@NotNull Level level, @NotNull SoundEvent sound, @NotNull SoundSource source, float volume, float pitch)
|
||||
public PlayLevelSoundEvent(@NotNull Level level, @NotNull Holder<SoundEvent> sound, @NotNull SoundSource source, float volume, float pitch)
|
||||
{
|
||||
this.level = level;
|
||||
this.sound = sound;
|
||||
@@ -71,7 +72,7 @@ public class PlayLevelSoundEvent extends Event
|
||||
* {@return the sound event to be played}
|
||||
*/
|
||||
@Nullable
|
||||
public SoundEvent getSound()
|
||||
public Holder<SoundEvent> getSound()
|
||||
{
|
||||
return this.sound;
|
||||
}
|
||||
@@ -79,7 +80,7 @@ public class PlayLevelSoundEvent extends Event
|
||||
/**
|
||||
* Sets the sound event to be played.
|
||||
*/
|
||||
public void setSound(@Nullable SoundEvent sound)
|
||||
public void setSound(@Nullable Holder<SoundEvent> sound)
|
||||
{
|
||||
this.sound = sound;
|
||||
}
|
||||
@@ -165,7 +166,7 @@ public class PlayLevelSoundEvent extends Event
|
||||
{
|
||||
private final Entity entity;
|
||||
|
||||
public AtEntity(Entity entity, SoundEvent sound, SoundSource source, float volume, float pitch)
|
||||
public AtEntity(Entity entity, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch)
|
||||
{
|
||||
super(entity.level, sound, source, volume, pitch);
|
||||
this.entity = entity;
|
||||
@@ -195,7 +196,7 @@ public class PlayLevelSoundEvent extends Event
|
||||
{
|
||||
private final Vec3 position;
|
||||
|
||||
public AtPosition(Level level, Vec3 position, SoundEvent sound, SoundSource source, float volume, float pitch)
|
||||
public AtPosition(Level level, Vec3 position, Holder<SoundEvent> sound, SoundSource source, float volume, float pitch)
|
||||
{
|
||||
super(level, sound, source, volume, pitch);
|
||||
this.position = position;
|
||||
|
||||
Reference in new issue
Block a user