Package com.pahimar.ee3.reference

Examples of com.pahimar.ee3.reference.Messages$Configuration


            NBTTagList stackMappingTagList = nbtTagCompound.getTagList("stackMappingList", 10);
            for (int i = 0; i < stackMappingTagList.tagCount(); i++)
            {
                NBTTagCompound tagCompound = stackMappingTagList.getCompoundTagAt(i);
                WrappedStack wrappedStack = WrappedStack.fromNBTTagCompound(tagCompound.getCompoundTag("wrappedStack"));
                EnergyValue energyValue = EnergyValue.loadEnergyValueFromNBT(tagCompound.getCompoundTag("energyValue"));
                stackValueMap.put(wrappedStack, energyValue);
            }

            ImmutableSortedMap.Builder<WrappedStack, EnergyValue> stackMappingsBuilder = ImmutableSortedMap.naturalOrder();
            stackMappingsBuilder.putAll(stackValueMap);
            stackMappings = stackMappingsBuilder.build();

            /**
             *  Resolve value stack mappings from the newly loaded stack mappings
             */
            SortedMap<EnergyValue, List<WrappedStack>> tempValueMappings = new TreeMap<EnergyValue, List<WrappedStack>>();

            for (WrappedStack stack : stackMappings.keySet())
            {
                if (stack != null)
                {
                    EnergyValue value = stackMappings.get(stack);

                    if (value != null)
                    {
                        if (tempValueMappings.containsKey(value))
                        {
View Full Code Here


            for (WrappedStack stack : stackMappings.keySet())
            {
                if (stack != null)
                {
                    EnergyValue value = stackMappings.get(stack);

                    if (value != null)
                    {
                        if (tempValueMappings.containsKey(value))
                        {
View Full Code Here

        if (!jsonElement.isJsonPrimitive())
        {
            JsonObject jsonStackValueMapping = (JsonObject) jsonElement;

            WrappedStack wrappedStack = null;
            EnergyValue energyValue = null;

            if (jsonStackValueMapping.get("wrappedStack") != null)
            {
                wrappedStack = new WrappedStack().deserialize(jsonStackValueMapping.get("wrappedStack").getAsJsonObject(), typeOfT, context);
            }

            if (jsonStackValueMapping.get("energyValue") != null)
            {
                energyValue = new EnergyValue().deserialize(jsonStackValueMapping.get("energyValue").getAsJsonObject(), typeOfT, context);
            }

            if (wrappedStack != null && energyValue != null)
            {
                return new EnergyValueStackMapping(wrappedStack, energyValue);
View Full Code Here

      output = new PositionedStack(outputDust, 101, 19);
     
      inputs = new ArrayList<PositionedStack>();

      minEnergyValue = EnergyValueRegistryProxy.getEnergyValue(outputDust);
      maxEnergyValue = (outputDust.getItemDamage() < (ItemAlchemicalDust.getAlchemicalDusts().size() - 1) ? EnergyValueRegistryProxy.getEnergyValue(ItemAlchemicalDust.getAlchemicalDusts().get(outputDust.getItemDamage() + 1)) : new EnergyValue(Float.MAX_VALUE, EnergyType.CORPOREAL));

      for (Object obj : EnergyValueRegistryProxy.getStacksInRange(minEnergyValue, maxEnergyValue))
      {
        if (obj instanceof ItemStack)
        {
View Full Code Here

      inputs = Arrays.asList(new PositionedStack[] { new PositionedStack(inputStack, 40, 0) });

      output = new PositionedStack(outputDust, 101, 19);

      minEnergyValue = EnergyValueRegistryProxy.getEnergyValue(outputDust);
      maxEnergyValue = (outputDust.getItemDamage() < (ItemAlchemicalDust.getAlchemicalDusts().size() - 1) ? EnergyValueRegistryProxy.getEnergyValue(ItemAlchemicalDust.getAlchemicalDusts().get(outputDust.getItemDamage() + 1)) : new EnergyValue(Float.MAX_VALUE, EnergyType.CORPOREAL));
    }
View Full Code Here

            int facing = MathHelper.floor_double(entityLiving.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
            ((TileEntityAlchemyArray) world.getTileEntity(x, y, z)).setRotation(chalkSettings.getRotation(), facing);

            ResourceLocation glyphTexture = GlyphTextureRegistry.getInstance().getRegisteredGlyphAt(chalkSettings.getIndex());

            ((TileEntityAlchemyArray) world.getTileEntity(x, y, z)).addGlyphToAlchemyArray(new Glyph(glyphTexture, GlyphTextureRegistry.getInstance().getRegisteredGlyphTextures().get(glyphTexture)), chalkSettings.getSize());

            CommonSoundHelper.playChalkSoundAt((EntityPlayer) entityLiving);
        }
    }
View Full Code Here

                ChalkSettings chalkSettings = new ChalkSettings();
                chalkSettings.readFromNBT(customEntityData);

                ResourceLocation glyphTexture = GlyphTextureRegistry.getInstance().getRegisteredGlyphAt(chalkSettings.getIndex());

                if (tileEntityAlchemyArray.addGlyphToAlchemyArray(new Glyph(glyphTexture, GlyphTextureRegistry.getInstance().getRegisteredGlyphTextures().get(glyphTexture)), chalkSettings.getSize()))
                {
                    world.markBlockForUpdate(x, y, z);
                    world.getTileEntity(x, y, z).markDirty();
                    CommonSoundHelper.playChalkSoundAt(entityPlayer);
                    return true;
View Full Code Here

    {
        super.registerEventHandlers();
        FMLCommonHandler.instance().bus().register(new KeyInputEventHandler());
        FMLCommonHandler.instance().bus().register(new HUDTickHandler());
        MinecraftForge.EVENT_BUS.register(new ItemTooltipEventHandler());
        MinecraftForge.EVENT_BUS.register(new DrawBlockHighlightEventHandler());
    }
View Full Code Here

    @Override
    public void registerEventHandlers()
    {
        super.registerEventHandlers();
        FMLCommonHandler.instance().bus().register(new KeyInputEventHandler());
        FMLCommonHandler.instance().bus().register(new HUDTickHandler());
        MinecraftForge.EVENT_BUS.register(new ItemTooltipEventHandler());
        MinecraftForge.EVENT_BUS.register(new DrawBlockHighlightEventHandler());
    }
View Full Code Here

    public void registerEventHandlers()
    {
        super.registerEventHandlers();
        FMLCommonHandler.instance().bus().register(new KeyInputEventHandler());
        FMLCommonHandler.instance().bus().register(new HUDTickHandler());
        MinecraftForge.EVENT_BUS.register(new ItemTooltipEventHandler());
        MinecraftForge.EVENT_BUS.register(new DrawBlockHighlightEventHandler());
    }
View Full Code Here

TOP

Related Classes of com.pahimar.ee3.reference.Messages$Configuration

Copyright © 2018 www.massapicom. 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.