use of org.spongepowered.mod.interfaces.IMixinEventBus in project SpongeForge by SpongePowered.
the class SpongeForgeEventFactory method callPlayerLoggedInEvent.
private static ClientConnectionEvent.Join callPlayerLoggedInEvent(Event event) {
ClientConnectionEvent.Join spongeEvent = (ClientConnectionEvent.Join) event;
PlayerLoggedInEvent fmlEvent = new PlayerLoggedInEvent((EntityPlayer) spongeEvent.getTargetEntity());
((IMixinEventBus) MinecraftForge.EVENT_BUS).post(fmlEvent, true);
return spongeEvent;
}
use of org.spongepowered.mod.interfaces.IMixinEventBus in project SpongeForge by SpongePowered.
the class SpongeForgeEventFactory method callPlayerLoggedOutEvent.
private static ClientConnectionEvent.Disconnect callPlayerLoggedOutEvent(Event event) {
ClientConnectionEvent.Disconnect spongeEvent = (ClientConnectionEvent.Disconnect) event;
PlayerLoggedOutEvent fmlEvent = new PlayerLoggedOutEvent((EntityPlayer) spongeEvent.getTargetEntity());
((IMixinEventBus) MinecraftForge.EVENT_BUS).post(fmlEvent, true);
return spongeEvent;
}
use of org.spongepowered.mod.interfaces.IMixinEventBus in project SpongeForge by SpongePowered.
the class SpongeForgeEventFactory method callPlayerRespawnEvent.
private static RespawnPlayerEvent callPlayerRespawnEvent(Event event) {
RespawnPlayerEvent spongeEvent = (RespawnPlayerEvent) event;
PlayerRespawnEvent fmlEvent = new PlayerRespawnEvent((EntityPlayer) spongeEvent.getTargetEntity(), !spongeEvent.isDeath());
((IMixinEventBus) MinecraftForge.EVENT_BUS).post(fmlEvent, true);
return spongeEvent;
}
use of org.spongepowered.mod.interfaces.IMixinEventBus in project SpongeForge by SpongePowered.
the class SpongeForgeEventFactory method callChunkUnloadEvent.
private static UnloadChunkEvent callChunkUnloadEvent(Event event) {
UnloadChunkEvent spongeEvent = (UnloadChunkEvent) event;
final net.minecraft.world.chunk.Chunk chunk = (net.minecraft.world.chunk.Chunk) spongeEvent.getTargetChunk();
((IMixinEventBus) MinecraftForge.EVENT_BUS).post(new ChunkEvent.Unload(chunk), true);
return spongeEvent;
}
use of org.spongepowered.mod.interfaces.IMixinEventBus in project SpongeForge by SpongePowered.
the class SpongeForgeEventFactory method callWorldUnloadEvent.
private static UnloadWorldEvent callWorldUnloadEvent(Event event) {
UnloadWorldEvent spongeEvent = (UnloadWorldEvent) event;
((IMixinEventBus) MinecraftForge.EVENT_BUS).post(new WorldEvent.Unload((net.minecraft.world.World) spongeEvent.getTargetWorld()), true);
return spongeEvent;
}
Aggregations