net.minecraft.world.World.notifyLightSet()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中net.minecraft.world.World.notifyLightSet()方法的一些代码示例,展示了World.notifyLightSet()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。World.notifyLightSet()方法的具体详情如下:
包路径:net.minecraft.world.World
类名称:World
方法名:notifyLightSet

World.notifyLightSet介绍

暂无

代码示例

代码示例来源:origin: SleepyTrousers/EnderIO

@Override
public void notifyLightSet(@Nonnull BlockPos pos) {
 wrapped.notifyLightSet(pos);
}

代码示例来源:origin: amadornes/MCMultiPart

@Override
public void notifyLightSet(BlockPos pos) {
  getActualWorld().notifyLightSet(pos);
}

代码示例来源:origin: OpenModularTurretsTeam/OpenModularTurrets

@Override
  public IMessage onMessage(MessageAdjustLightOpacity messageIn, MessageContext ctxIn) {
    final MessageAdjustLightOpacity message = messageIn;
    final MessageContext ctx = ctxIn;
    ((WorldServer) ctx.getServerHandler().player.getEntityWorld()).addScheduledTask(() -> {
      World world = ctx.getServerHandler().player.getEntityWorld();
      EntityPlayerMP player = ctx.getServerHandler().player;
      BlockPos pos = new BlockPos(message.getX(), message.getY(), message.getZ());
      TileEntity entity = world.getTileEntity(pos);
      TurretBase machine = null;
      if (entity instanceof TurretBase) {
        machine = (TurretBase) entity;
      }
      if (machine != null && PlayerUtil.isPlayerAdmin(player, machine) && machine instanceof ICamoSupport) {
        ((ICamoSupport) machine).getCamoSettings().setLightOpacity(message.value);
        machine.getWorld().notifyLightSet(machine.getPos());
        machine.sendMessageToAllTracking();
        machine.updateCamoSettingsToPlayers();
      }
    });
    return null;
  }
}

代码示例来源:origin: Ellpeck/ActuallyAdditions

world.notifyLightSet(pos);
return true;

相关文章

微信公众号

最新文章

更多

World类方法