Examples of WorldManager


Examples of net.minecraft.server.WorldManager

           
            String worldname="testworld";
            long seed=1234;
            world = new WorldServer(null, new ServerNBTManager(new File("tests"),worldname, true), worldname, hell ? -1 : 0, seed, null, null);
            // TerraBukkit end
            world.a(new WorldManager(null, world));
            world.j = mobs ? 1 : 0;
            world.a(mobs, animals);
            // CraftBukkit end
           
            ChunkCoordinates chunkcoordinates = world.m(); // CraftBukkit
View Full Code Here

Examples of net.minecraft.world.WorldManager

        MinecraftServer mcServer = overworld.func_73046_m();
        ISaveHandler savehandler = overworld.getSaveHandler();
        WorldSettings worldSettings = new WorldSettings(overworld.getWorldInfo());

        WorldServer world = (dim == 0 ? overworld : new WorldServerMulti(mcServer, savehandler, overworld.getWorldInfo().getWorldName(), dim, worldSettings, overworld, mcServer.theProfiler));
        world.addWorldAccess(new WorldManager(mcServer, world));
        MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(world));
        if (!mcServer.isSinglePlayer())
        {
            world.getWorldInfo().setGameType(mcServer.getGameType());
        }
View Full Code Here

Examples of org.jdesktop.mtgame.WorldManager

        });
        clip2.setInterpolator(Interpolators.getEasingInstance(0.4f, 0.4f));
        clip2.start();
        // End HUGE HACK.

        WorldManager worldManager = ClientContextJME.getWorldManager();
        worldManager.getRenderManager().setDesiredFrameRate(getDesiredFrameRate());

        createUI(worldManager, width, height);

        // Register our loginUI for login requests
        login = new JmeLoginUI(frame);
View Full Code Here

Examples of org.jdesktop.mtgame.WorldManager

        // get the login manager for the given server
        ServerSessionManager lm = LoginManager.getSessionManager(serverURL);

        // Register physics and phyiscs collision systems for this session
        WorldManager worldManager = ClientContextJME.getWorldManager();
        CollisionManager collisionManager = worldManager.getCollisionManager();
        CollisionSystem collisionSystem = collisionManager.loadCollisionSystem(
                JBulletDynamicCollisionSystem.class);
        JBulletDynamicCollisionSystem jBulletCollisionSystem =
                (JBulletDynamicCollisionSystem) collisionSystem;
        PhysicsManager physicsManager = worldManager.getPhysicsManager();
        JBulletPhysicsSystem jBulletPhysicsSystem =
                (JBulletPhysicsSystem) physicsManager.loadPhysicsSystem(
                JBulletPhysicsSystem.class, jBulletCollisionSystem);
        ClientContextJME.addCollisionSystem(
                lm, "Physics", jBulletCollisionSystem);
View Full Code Here

Examples of org.jdesktop.mtgame.WorldManager

        // accordingly.
        updateListener = new TransformChangeListener() {
            public void transformChanged(final Cell cell, ChangeSource source) {
                // We need to perform this work inside a proper updater, to
                // make sure we are MT thread safe
                final WorldManager wm = ClientContextJME.getWorldManager();
                RenderUpdater u = new RenderUpdater() {
                    public void update(Object obj) {
                        CellTransform transform = cell.getWorldTransform();
                        rootNode.setLocalTranslation(transform.getTranslation(null));
      rootNode.setLocalRotation(transform.getRotation(null));
                        rootNode.setLocalScale(transform.getScaling(null));
                        wm.addToUpdateList(rootNode);
                    }
                };
                wm.addRenderUpdater(u, this);
            }
        };
        cell.addTransformChangeListener(updateListener);
  setVisible(true);
    }
View Full Code Here

Examples of org.jdesktop.mtgame.WorldManager

     * Sets whether the bounds viewer is visible (true) or invisible (false).
     *
     * @param visible True to make the affordance visible, false to not
     */
    public synchronized void setVisible(boolean visible) {
        WorldManager wm = ClientContextJME.getWorldManager();

        // If we want to make the affordance visible and it already is not
        // visible, then make it visible. We do not need to put add/remove
        // Entities on the MT Game render thread, they are already thread safe.
        if (visible == true && isVisible == false) {
            wm.addEntity(this);
            isVisible = true;
            return;
        }

        // If we want to make the affordance invisible and it already is
        // visible, then make it invisible
        if (visible == false && isVisible == true) {
            wm.removeEntity(this);
            isVisible = false;
            return;
        }
    }
View Full Code Here

Examples of org.jdesktop.mtgame.WorldManager

        RenderUpdater updater = new RenderUpdater() {
            public void update(Object arg0) {
                changeAvatarInternal(avatar);
            }
        };
        WorldManager wm = ClientContextJME.getWorldManager();
        wm.addRenderUpdater(updater, null);
    }
View Full Code Here

Examples of org.jdesktop.mtgame.WorldManager

        logger.info("selectedForInput "+selected);
        selectedForInput = selected;

        if (avatarCharacter!=null) {
             WorldManager wm = ClientContextJME.getWorldManager();

            ((WlAvatarContext) avatarCharacter.getContext()).getBehaviorManager().setEnable(false);

            if (controlScheme == null && selectedForInput) {
                controlScheme = new DefaultCharacterControls(ClientContextJME.getWorldManager());
                ((AvatarControls)wm.getUserData(AvatarControls.class)).setDefault(controlScheme);
            }
            setCollisionController(avatarCharacter);
            if (selectedForInput) {

                // Listen for avatar movement and update the cell
View Full Code Here

Examples of org.jdesktop.mtgame.WorldManager

        // XXX
        try {
            String serverHostAndPort = manager.getServerNameAndPort();
            String baseURL = "wla://avatarbaseart/";
            URL url = AssetUtils.getAssetURL(baseURL, serverHostAndPort);
            WorldManager worldManager = ClientContextJME.getWorldManager();
            worldManager.addUserData(Repository.class, new Repository(worldManager,
                    new WonderlandAvatarCache(url.toExternalForm(),
                    ClientContext.getUserDirectory("AvatarCache"))));
        } catch (MalformedURLException excp) {
            logger.log(Level.WARNING, "Unable to form avatar base URL", excp);
        } catch(Exception e) {
View Full Code Here

Examples of org.jdesktop.mtgame.WorldManager

     * {@inheritDoc]
     */
    @Override
    public void cleanup() {
        // XXX should be done in deactivate XXX
        WorldManager worldManager = ClientContextJME.getWorldManager();
        worldManager.removeUserData(Repository.class);

        ServerSessionManager manager = getSessionManager();
        ClientContextJME.getAvatarRenderManager().unregisterRenderer(manager);
       
        super.cleanup();
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.