Examples of GameSettings


Examples of com.jcloisterzone.game.GameSettings

    }


    public void createGame(Snapshot snapshot) {
        if (snapshot == null) {
            game = new GameSettings(getRandomId());
            game.getExpansions().add(Expansion.BASIC);
            for (CustomRule cr : CustomRule.defaultEnabled()) {
                game.getCustomRules().add(cr);
            }
            for (int i = 0; i < slots.length; i++) {
                slots[i] = new ServerPlayerSlot(i);
            }
        } else {
            this.snapshot =  snapshot;
            game = new GameSettings(getRandomId());
            game.getExpansions().addAll(snapshot.getExpansions());
            game.getCustomRules().addAll(snapshot.getCustomRules());
            loadSlotsFromSnapshot();
        }
    }
View Full Code Here

Examples of net.minecraft.client.settings.GameSettings

    public boolean hasCustomLoader(IResourceManager manager, ResourceLocation location) {
        return true;
    }

    public void addFrame(int[] data) {
        GameSettings settings = Minecraft.getMinecraft().gameSettings;
        BufferedImage[] images = new BufferedImage[settings.mipmapLevels+1];
        images[0] = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
        images[0].setRGB(0, 0, width, height, data, 0, width);

        super.loadSprite(images, null, settings.anisotropicFiltering > 1);
View Full Code Here

Examples of net.minecraft.client.settings.GameSettings

      //This code is not for deployables
      if (type.deployable)
        return;
     
     
      GameSettings gameSettings = FMLClientHandler.instance().getClient().gameSettings;
      //If in a GUI
      if(FMLClientHandler.instance().getClient().currentScreen != null)
      {
        if(FlansModClient.currentScope != null)
        {
View Full Code Here

Examples of net.minecraft.client.settings.GameSettings

    return true;
  }

  public void addFrame(int[] data) {

    GameSettings settings = Minecraft.getMinecraft().gameSettings;
    BufferedImage[] images = new BufferedImage[settings.mipmapLevels + 1];
    images[0] = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
    images[0].setRGB(0, 0, width, height, data, 0, width);

    super.loadSprite(images, null, settings.anisotropicFiltering > 1);
View Full Code Here

Examples of net.minecraft.client.settings.GameSettings

        {
            return skyRGBMultiplier;
        }
        skyInit = true;

        GameSettings settings = Minecraft.getMinecraft().gameSettings;
        int[] ranges = ForgeModContainer.blendRanges;
        int distance = 0;
        if (settings.fancyGraphics && settings.renderDistanceChunks >= 0 && settings.renderDistanceChunks < ranges.length)
        {
            distance = ranges[settings.renderDistanceChunks];
View Full Code Here

Examples of net.minecraft.client.settings.GameSettings

    public boolean hasCustomLoader(IResourceManager manager, ResourceLocation location) {
        return true;
    }

    public void addFrame(int[] data, int width, int height) {
        GameSettings settings = Minecraft.getMinecraft().gameSettings;
        BufferedImage[] images = new BufferedImage[settings.mipmapLevels+1];
        images[0] = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
        images[0].setRGB(0, 0, width, height, data, 0, width);

        loadSprite(images, null, settings.anisotropicFiltering > 1);
View Full Code Here

Examples of net.minecraft.client.settings.GameSettings

     * @param keybindName
     * @param keyCode when a value of <0 is parsed, this will function as a getter, with a chance of returning null.
     * @return
     */
    public static KeyBinding setOrAddKeybind(String keybindName, int keyCode){
        GameSettings gameSettings = FMLClientHandler.instance().getClient().gameSettings;
        for(KeyBinding keyBinding : gameSettings.keyBindings) {
            if(keyBinding.getKeyDescription().equals(keybindName)) {
                if(keybindName.equals(keyBinding.getKeyDescription())) {
                    if(keyCode >= 0) {
                        keyBinding.setKeyCode(keyCode);
                        KeyBinding.resetKeyBindingArrayAndHash();
                        gameSettings.saveOptions();
                    }
                    return keyBinding;
                }
            }
        }
        //When the keybind wasn't added yet
        if(keyCode < 0) {
            if(((ClientProxy)PneumaticCraft.proxy).keybindToKeyCodes.containsKey(keybindName)) {//If the keybind can be found in the options file
                keyCode = ((ClientProxy)PneumaticCraft.proxy).keybindToKeyCodes.get(keybindName);
            } else {
                return null;
            }
        }
        KeyBinding keyBinding = new KeyBinding(keybindName, keyCode, Names.PNEUMATIC_KEYBINDING_CATEGORY);
        ClientRegistry.registerKeyBinding(keyBinding);
        KeyBinding.resetKeyBindingArrayAndHash();
        gameSettings.saveOptions();
        return keyBinding;
    }
View Full Code Here

Examples of net.minecraft.src.GameSettings

        {
          EntityClientPlayerMP thePlayer = mc.thePlayer;
         
          //buttons?
          //TODO: move this somewhere sane and make configurable
          GameSettings settings = mc.gameSettings;
 
          if((cont2.buttons & EnumButton.START.mask())>0 &&
            (lastcont2Buttons & EnumButton.START.mask()) == 0)
          {
            if(mc.currentScreen != null)
View Full Code Here

Examples of net.minecraft.src.GameSettings

  }

  @Override
  public boolean conflicts(ControlsBasicItem other) {
    if (other instanceof VanillaBindingItem) {
      GameSettings settings = SpoutClient.getHandle().gameSettings;
      VanillaBindingItem item = (VanillaBindingItem)other;
      boolean flightKey = binding == settings.keyFlyBack ||
        binding == settings.keyFlyLeft ||
        binding == settings.keyFlyForward ||
        binding == settings.keyFlyRight ||
View Full Code Here

Examples of net.minecraft.src.GameSettings

  }

  @Override
  public boolean conflicts(ControlsBasicItem other) {
    if (other instanceof SpoutcraftBindingItem) {
      GameSettings settings = SpoutClient.getHandle().gameSettings;
      SpoutcraftBindingItem item = (SpoutcraftBindingItem)other;
      boolean flightKey = item.binding == settings.keyFlyBack ||
        item.binding == settings.keyFlyLeft ||
        item.binding == settings.keyFlyForward ||
        item.binding == settings.keyFlyRight ||
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.