Adds in initial registration for a queue
This commit is contained in:
parent
ecb20540e4
commit
a02cd91bcb
3 changed files with 24 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
org.gradle.jvmargs=-Xmx3G
|
||||
org.gradle.daemon=false
|
||||
|
||||
libzontreck=1201.13.041224.0752
|
||||
libzontreck=1201.13.041224.0832
|
||||
|
||||
## Environment Properties
|
||||
|
||||
|
@ -48,7 +48,7 @@ mod_name=Aria's Essentials
|
|||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||
mod_license=GPLv3
|
||||
# The mod version. See https://semver.org/
|
||||
mod_version=1201.2.041224.0757
|
||||
mod_version=1201.2.041224.0854
|
||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||
# This should match the base package used for the mod sources.
|
||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package dev.zontreck.essentials.antiexplode;
|
||||
|
||||
import dev.zontreck.libzontreck.memory.world.BlockRestoreQueue;
|
||||
import dev.zontreck.libzontreck.memory.world.SortedBlockQueue;
|
||||
|
||||
public class CreeperHealQueue extends SortedBlockQueue
|
||||
{
|
||||
@Override
|
||||
public String getRestoreQueueName() {
|
||||
return "creeperheal";
|
||||
}
|
||||
}
|
|
@ -1,12 +1,16 @@
|
|||
package dev.zontreck.essentials.imc;
|
||||
|
||||
import dev.zontreck.essentials.antiexplode.CreeperHealQueue;
|
||||
import dev.zontreck.essentials.commands.teleport.TeleportActioner;
|
||||
import dev.zontreck.essentials.commands.teleport.TeleportContainer;
|
||||
import dev.zontreck.libzontreck.events.BlockRestoreQueueRegistrationEvent;
|
||||
import dev.zontreck.libzontreck.events.TeleportEvent;
|
||||
import net.minecraft.world.phys.Vec2;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
|
||||
public class Events
|
||||
{
|
||||
@SubscribeEvent
|
||||
public static void onTeleportRequest(TeleportEvent ev)
|
||||
{
|
||||
ev.setCanceled(true);
|
||||
|
@ -18,4 +22,10 @@ public class Events
|
|||
TeleportActioner.PerformTeleport(container, false);
|
||||
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onRegisterRestoreQueues (BlockRestoreQueueRegistrationEvent event)
|
||||
{
|
||||
event.register(new CreeperHealQueue());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue