Example usage for net.minecraftforge.event.world ChunkEvent ChunkEvent

List of usage examples for net.minecraftforge.event.world ChunkEvent ChunkEvent

Introduction

In this page you can find the example usage for net.minecraftforge.event.world ChunkEvent ChunkEvent.

Prototype

public ChunkEvent(IChunk chunk) 

Source Link

Usage

From source file:org.spongepowered.mod.event.SpongeForgeEventFactory.java

License:MIT License

public static ChunkEvent createChunkEvent(Event event) {
    if (!(event instanceof TargetChunkEvent)) {
        throw new IllegalArgumentException("Event is not a valid TargetChunkEvent.");
    }//from  w w w  .j av a2 s. c o m

    TargetChunkEvent spongeEvent = (TargetChunkEvent) event;
    ChunkEvent forgeEvent = new ChunkEvent(((Chunk) spongeEvent.getTargetChunk()));
    return forgeEvent;
}