Update major API Version to add some new interfaces.

This commit is contained in:
Aria 2023-03-18 21:01:18 -07:00
parent 1378a6fb21
commit 5d024f425c
26 changed files with 496 additions and 111 deletions

View file

@ -0,0 +1,23 @@
package dev.zontreck.libzontreck.events;
import dev.zontreck.libzontreck.profiles.Profile;
import net.minecraft.nbt.CompoundTag;
import net.minecraftforge.eventbus.api.Event;
/**
* This class is not cancelable.
* This event is fired while the profile is saving. It is used to acquire misc data.
*
* The only part of this that is modifiable at this stage of saving is the tag.
*/
public class ProfileSavingEvent extends Event
{
public final Profile profile;
public CompoundTag tag;
public ProfileSavingEvent(Profile profile, CompoundTag tag)
{
this.profile=profile;
this.tag=tag;
}
}

View file

@ -0,0 +1,17 @@
package dev.zontreck.libzontreck.events;
import java.util.ArrayList;
import java.util.List;
import dev.zontreck.libzontreck.networking.packets.IPacket;
import net.minecraftforge.eventbus.api.Event;
/**
* Used to register your packets with LibZontreck. Packets must extend IPacket and implement PacketSerializable. This is dispatched on both logical sides, and is considered a final event. It is not cancelable
* @see IPacket
* @see PacketSerializable
*/
public class RegisterPacketsEvent extends Event
{
public final List<IPacket> packets = new ArrayList<>();
}