Examples of WorldInfo


Examples of com.bergerkiller.bukkit.mw.WorldInfo

    if (this.handleWorld()) {
      WorldConfig wc = WorldConfig.get(worldname);
      if (time == -1) {
        World w = WorldManager.getWorld(worldname);
        if (w == null) {
          WorldInfo i = wc.getInfo();
          if (i == null) {
            time = 0;
          } else {
            time = i.time;
          }
View Full Code Here

Examples of net.minecraft.src.WorldInfo

      } else if (value instanceof Integer) {
         nbt.setInteger(key, (Integer) value);
      } else if (value instanceof Long) {
         nbt.setLong(key, (Long) value);
      }
      WorldInfo info = new WorldInfo(nbt);
      try {
         Field fields[] = net.minecraft.src.World.class.getDeclaredFields();
         for (Field field : fields) {
            field.setAccessible(true);
            if (field.get(this.world) instanceof WorldInfo) {
View Full Code Here

Examples of net.minecraft.src.WorldInfo

  public UUID getUID() {
    return null;
  }

  public FixedLocation getSpawnLocation() {
    WorldInfo info = handle.worldInfo;
    return new FastLocation(info.getSpawnX(), info.getSpawnY(), info.getSpawnZ(), 0, 0);
  }
View Full Code Here

Examples of net.minecraft.world.storage.WorldInfo

  @Override
  protected void doProcess()
  {
    World w = Minecraft.getMinecraft().theWorld;
    EntityPlayerSP player = Minecraft.getMinecraft().thePlayer;
    WorldInfo info = w.getWorldInfo();
   
    setValue("time_modulo24k", (int) (info.getWorldTime() % 24000L));
    setValue("rain", info.isRaining());
    //setValue("thunder", info.isThundering());
    setValue("thunder", w.getWeightedThunderStrength(0f) > 0.9f);
    setValue("dimension", player.dimension);
    setValue("light_subtracted", w.skylightSubtracted);
    setValue("remote", w.isRemote);
View Full Code Here

Examples of net.minecraft.world.storage.WorldInfo

            /*
           * Weather part
           */
            if (wt.weatherSpecified)
            {
                WorldInfo winfo = e.world.getWorldInfo();
                if (!wt.rain)
                {
                    winfo.setRainTime(20 * 300);
                    winfo.setRaining(false);
                    winfo.setThunderTime(20 * 300);
                    winfo.setThundering(false);
                }
                else if (!wt.storm)
                {
                    winfo.setThunderTime(20 * 300);
                    winfo.setThundering(false);
                }
            }

          /*
           * Time part
View Full Code Here

Examples of net.minecraft.world.storage.WorldInfo

  @Override
  public boolean tickUpdates(boolean runAll) {
    final ArrayList<NextTickListEntry> runningTickListEntries;
    final TreeSet pendingTickListEntries = this.pendingTickListEntries;
    final Random rand = this.rand;
    final WorldInfo worldInfo = this.worldInfo;
    synchronized (pendingTickListEntries) {
      int max = pendingTickListEntries.size();

      if (max == 0) {
        return false;
      }

      runningTickListEntries = new ArrayList<NextTickListEntry>(Math.min(lastTickEntries, max));

      final long worldTime = worldInfo.getWorldTotalTime();

      for (int i = 0; i < max; ++i) {
        NextTickListEntry nextTickListEntry = (NextTickListEntry) pendingTickListEntries.first();

        if (!runAll && nextTickListEntry.scheduledTime > worldTime) {
View Full Code Here

Examples of net.minecraft.world.storage.WorldInfo

  }

  @Override
  public void tick() {
    final Profiler profiler = this.theProfiler;
    final WorldInfo worldInfo = this.worldInfo;
    final int tickCount = ++this.tickCount;
    final boolean hasPlayers = !playerEntities.isEmpty();
    this.updateWeather();
    if (!forcedChunksInited) {
      ForgeChunkManager.loadForcedChunks(this);
    }
    updateEntityTick = 0;
    if (this.difficultySetting < 3 && this.getWorldInfo().isHardcoreModeEnabled()) {
      this.difficultySetting = 3;
    }

    if (tickCount % 120 == 0) {
      redstoneBurnoutMap.clear();
    }

    if (tickCount % 200 == 0) {
      this.provider.worldChunkMgr.cleanupCache();
    }

    if (hasPlayers && this.areAllPlayersAsleep()) {
      long var2 = worldInfo.getWorldTime();
      worldInfo.setWorldTime(var2 + 24000L - (var2 % 24000L));
      this.wakeAllPlayers();
    }

    profiler.startSection("mobSpawner");

    if (hasPlayers && (loadedEntityList.size() / TickThreading.instance.maxEntitiesPerPlayer) < playerEntities.size() && this.getGameRules().getGameRuleBooleanValue("doMobSpawning")) {
      if (TickThreading.instance.shouldFastSpawn(this)) {
        SpawnerAnimals.spawnMobsQuickly(this, spawnHostileMobs && (ticksPerMonsterSpawns != 0 && tickCount % ticksPerMonsterSpawns == 0L), spawnPeacefulMobs && (ticksPerAnimalSpawns != 0 && tickCount % ticksPerAnimalSpawns == 0L), worldInfo.getWorldTotalTime() % 400L == 0L);
      } else {
        animalSpawner.findChunksForSpawning(this, spawnHostileMobs && (ticksPerMonsterSpawns != 0 && tickCount % ticksPerMonsterSpawns == 0L), spawnPeacefulMobs && (ticksPerAnimalSpawns != 0 && tickCount % ticksPerAnimalSpawns == 0L), worldInfo.getWorldTotalTime() % 400L == 0L);
      }
    }

    profiler.endStartSection("chunkSource");
    theChunkProviderServer.unloadQueuedChunks();
    theChunkProviderServer.tick();
    this.skylightSubtracted = this.calculateSkylightSubtracted(1.0F);

    this.sendAndApplyBlockEvents();
    worldInfo.incrementTotalWorldTime(worldInfo.getWorldTotalTime() + 1L);
    worldInfo.setWorldTime(worldInfo.getWorldTime() + 1L);
    profiler.endStartSection("tickPending");
    this.tickUpdates(false);
    profiler.endStartSection("tickTiles");
    this.tickBlocksAndAmbiance();
    profiler.endStartSection("chunkMap");
View Full Code Here

Examples of org.terasology.world.internal.WorldInfo

    @Override
    public List<WorldInfo> getWorldInfoList() {
        List<WorldInfo> result = Lists.newArrayList();

        for (NetData.WorldInfo pbWorldInfo : info.getWorldInfoList()) {
            WorldInfo worldInfo = new WorldInfo();
            worldInfo.setTime(pbWorldInfo.getTime());
            worldInfo.setTitle(pbWorldInfo.getTitle());
            result.add(worldInfo);
        }

        return result;
    }
View Full Code Here

Examples of org.terasology.world.internal.WorldInfo

        CoreRegistry.put(Game.class, game);
        BiomeManager biomeManager = mock(BiomeManager.class);
        when(biomeManager.getBiomes()).thenReturn(Collections.<Biome> emptyList());
        CoreRegistry.put(BiomeManager.class, biomeManager);
        WorldProvider worldProvider = mock(WorldProvider.class);
        when(worldProvider.getWorldInfo()).thenReturn(new WorldInfo());
        CoreRegistry.put(WorldProvider.class, worldProvider);



    }
View Full Code Here

Examples of org.terasology.world.internal.WorldInfo

                    for (Module module : result.getModules()) {
                        gameManifest.addModule(module.getId(), module.getVersion());
                    }

                    float timeOffset = 0.25f + 0.025f// Time at dawn + little offset to spawn in a brighter env.
                    WorldInfo worldInfo = new WorldInfo(TerasologyConstants.MAIN_WORLD, gameManifest.getSeed(),
                            (long) (WorldTime.DAY_LENGTH * timeOffset), worldGenerator.getSelection().getUri());
                    gameManifest.addWorld(worldInfo);

                    gameEngine.changeState(new StateLoading(gameManifest, (loadingAsServer) ? NetworkMode.DEDICATED_SERVER : NetworkMode.NONE));
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.