use of com.wuest.prefab.Config.Structures.StructureConfiguration in project MC-Prefab by Brian-Wuest.
the class StructureHandler method onMessage.
@Override
public IMessage onMessage(final StructureTagMessage message, final MessageContext ctx) {
// Or Minecraft.getMinecraft() on the client.
IThreadListener mainThread = (WorldServer) ctx.getServerHandler().player.world;
mainThread.addScheduledTask(new Runnable() {
@Override
public void run() {
// This is server side. Build the structure.
EnumStructureConfiguration structureConfig = message.getStructureConfig();
StructureConfiguration configuration = structureConfig.structureConfig.ReadFromNBTTagCompound(message.getMessageTag());
configuration.BuildStructure(ctx.getServerHandler().player, ctx.getServerHandler().player.world);
}
});
// no response in this case
return null;
}
Aggregations