Events are defined statically in normal classes and added handler for extensions to add their built-ins

This commit is contained in:
gnembon committed 2020-09-08 23:47:31 -03:00
1 parent 815c75b827
commit 3105d5bb71
11 files changed
+126 -113

No files matched your search

@@ -15,7 +15,6 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.registry.RegistryKey;
import net.minecraft.world.World;
import net.minecraft.world.dimension.DimensionType;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
@@ -72,7 +71,7 @@ public abstract class ServerPlayerEntity_scarpetEventMixin extends PlayerEntity
@Inject(method = "onDeath", at = @At("HEAD"))
private void onDeathEvent(DamageSource source, CallbackInfo ci)
{
((EntityInterface)this).getEventContainer().onEvent(EntityEventsGroup.EntityEventType.ON_DEATH, source.name);
((EntityInterface)this).getEventContainer().onEvent(EntityEventsGroup.Event.ON_DEATH, source.name);
if (PLAYER_DIES.isNeeded())
{
PLAYER_DIES.onPlayerEvent((ServerPlayerEntity) (Object)this);