use of com.minecolonies.api.colony.event.ClientChunkUpdatedEvent in project minecolonies by ldtteam.
the class ChunkClientDataHelper method applyCap.
/**
* Applies the data tuple to the respective chunk
*
* @param chunkCapData colony data to apply
* @param chunk the chunk to apply to
*/
public static void applyCap(final ChunkCapData chunkCapData, final Chunk chunk) {
final IColonyTagCapability cap = chunk.getCapability(CLOSE_COLONY_CAP, null).orElseGet(null);
if (cap != null) {
cap.setOwningColony(chunkCapData.owningColony, chunk);
cap.setCloseColonies(chunkCapData.closeColonies);
}
MinecraftForge.EVENT_BUS.post(new ClientChunkUpdatedEvent(chunk));
}
use of com.minecolonies.api.colony.event.ClientChunkUpdatedEvent in project minecolonies by Minecolonies.
the class ChunkClientDataHelper method applyCap.
/**
* Applies the data tuple to the respective chunk
*
* @param chunkCapData colony data to apply
* @param chunk the chunk to apply to
*/
public static void applyCap(final ChunkCapData chunkCapData, final Chunk chunk) {
final IColonyTagCapability cap = chunk.getCapability(CLOSE_COLONY_CAP, null).orElseGet(null);
if (cap != null) {
cap.setOwningColony(chunkCapData.owningColony, chunk);
cap.setCloseColonies(chunkCapData.closeColonies);
}
MinecraftForge.EVENT_BUS.post(new ClientChunkUpdatedEvent(chunk));
}
Aggregations