本文整理了Java中net.minecraft.client.Minecraft.addScheduledTask()
方法的一些代码示例,展示了Minecraft.addScheduledTask()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Minecraft.addScheduledTask()
方法的具体详情如下:
包路径:net.minecraft.client.Minecraft
类名称:Minecraft
方法名:addScheduledTask
暂无
代码示例来源:origin: Vazkii/Botania
@Override
public IMessage onMessage(final PacketBotaniaEffect message, final MessageContext ctx) {
Minecraft.getMinecraft().addScheduledTask(new Runnable() {
代码示例来源:origin: McJtyMods/LostCities
@Override
public ListenableFuture<Object> addScheduledTaskClient(Runnable runnableToSchedule) {
return Minecraft.getMinecraft().addScheduledTask(runnableToSchedule);
}
}
代码示例来源:origin: McJtyMods/RFToolsControl
@Override
public ListenableFuture<Object> addScheduledTaskClient(Runnable runnableToSchedule) {
return Minecraft.getMinecraft().addScheduledTask(runnableToSchedule);
}
}
代码示例来源:origin: sinkillerj/ProjectE
@Override
public IMessage onMessage(final StepHeightPKT message, MessageContext ctx)
{
Minecraft.getMinecraft().addScheduledTask(new Runnable() {
@Override
public void run() {
Minecraft.getMinecraft().player.stepHeight = message.value;
}
});
return null;
}
}
代码示例来源:origin: sinkillerj/ProjectE
@Override
public IMessage onMessage(KnowledgeClearPKT pkt, MessageContext ctx)
{
Minecraft.getMinecraft().addScheduledTask(new Runnable() {
@Override
public void run() {
PECore.proxy.clearClientKnowledge();
}
});
return null;
}
}
代码示例来源:origin: raoulvdberge/refinedstorage
@Override
public IMessage onMessage(MessageGridOpen message, MessageContext ctx) {
Minecraft.getMinecraft().addScheduledTask(new GridOpenHandler(message));
return null;
}
}
代码示例来源:origin: lorddusk/HQM
@Override
public IMessage onMessage(FullSyncMessage message, MessageContext ctx) {
Minecraft.getMinecraft().addScheduledTask(() -> handle(message, ctx));
return null;
}
代码示例来源:origin: lorddusk/HQM
@Override
public IMessage onMessage(DeathStatsMessage message, MessageContext ctx) {
Minecraft.getMinecraft().addScheduledTask(() -> handle(message, ctx));
return null;
}
代码示例来源:origin: lorddusk/HQM
@Override
public IMessage onMessage(QuestDataUpdateMessage message, MessageContext ctx) {
Minecraft.getMinecraft().addScheduledTask(() -> handle(message, ctx));
return null;
}
代码示例来源:origin: McJtyMods/TheOneProbe
@Override
public IMessage onMessage(PacketReturnInfo message, MessageContext ctx) {
Minecraft.getMinecraft().addScheduledTask(() -> OverlayRenderer.registerProbeInfo(message.dim, message.pos, message.probeInfo));
return null;
}
}
代码示例来源:origin: lorddusk/HQM
@Override
public IMessage onMessage(CloseBookMessage message, MessageContext ctx) {
Minecraft.getMinecraft().addScheduledTask(() -> handle(message, ctx));
return null;
}
代码示例来源:origin: lorddusk/HQM
@Override
public IMessage onMessage(TeamStatsMessage message, MessageContext ctx) {
Minecraft.getMinecraft().addScheduledTask(() -> handle(message, ctx));
return null;
}
代码示例来源:origin: lorddusk/HQM
@Override
public IMessage onMessage(TeamUpdateMessage message, MessageContext ctx) {
Minecraft.getMinecraft().addScheduledTask(() -> handle(message, ctx));
return null;
}
代码示例来源:origin: lorddusk/HQM
@Override
public IMessage onMessage(BlockSyncMessageClient message, MessageContext ctx) {
Minecraft.getMinecraft().addScheduledTask(() -> handle(message, ctx));
return null;
}
代码示例来源:origin: lorddusk/HQM
@SideOnly(Side.CLIENT)
@Override
public IMessage onMessage(SyncableTileMessage message, MessageContext ctx){
Minecraft.getMinecraft().addScheduledTask(() -> {
if(message.tileToSync instanceof ISyncableTile && message.data != null){
System.out.println(message.tileToSync.getWorld().getTileEntity(message.tileToSync.getPos()).hashCode());
((ISyncableTile) message.tileToSync).onData(message.data);
System.out.println(message.tileToSync.hashCode());
}
});
return null;
}
}
代码示例来源:origin: lorddusk/HQM
@Override
public void receiveData(EntityPlayer player, NBTTagCompound nbt){
Minecraft.getMinecraft().addScheduledTask(() -> GuiQuestBook.displayGui(player, nbt.getBoolean("OP")));
}
},
代码示例来源:origin: lorddusk/HQM
@SideOnly(Side.CLIENT)
@Override
public IMessage onMessage(PlayerDataSyncMessage message, MessageContext ctx) {
Minecraft.getMinecraft().addScheduledTask(() -> handle(message, ctx));
return null;
}
代码示例来源:origin: raoulvdberge/refinedstorage
@Override
@SideOnly(Side.CLIENT)
public IMessage onMessage(MessageGridCraftingStartResponse message, MessageContext ctx) {
Minecraft.getMinecraft().addScheduledTask(() -> {
GuiScreen screen = Minecraft.getMinecraft().currentScreen;
if (screen instanceof GuiGridCraftingSettings) {
((GuiGridCraftingSettings) screen).close();
}
});
return null;
}
}
代码示例来源:origin: cabaletta/baritone
/**
* Send a message to chat regardless of chatDebug (should only be used for critically important messages, or as a direct response to a chat command)
*
* @param message The message to display in chat
*/
default void logDirect(String message) {
ITextComponent component = MESSAGE_PREFIX.createCopy();
component.getStyle().setColor(TextFormatting.GRAY);
component.appendSibling(new TextComponentString(" " + message));
Minecraft.getMinecraft().addScheduledTask(() -> Baritone.settings().logger.get().accept(component));
}
}
代码示例来源:origin: P3pp3rF1y/AncientWarfare2
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onClientPacket(FMLNetworkEvent.ClientCustomPacketEvent evt) throws IOException {
PacketBase packet = PacketBase.readPacket(evt.getPacket().payload());
Minecraft.getMinecraft().addScheduledTask(() -> packet.execute(Minecraft.getMinecraft().player));
}
}
内容来源于网络,如有侵权,请联系作者删除!