Java 类net.minecraft.util.CooldownTracker 实例源码

项目:DecompiledMinecraft    文件:BlockState.java   
public BlockState(Block blockIn, IProperty... properties)
{
    this.block = blockIn;
    Arrays.sort(properties, new Comparator<IProperty>()
    {
        public int compare(IProperty p_compare_1_, IProperty p_compare_2_)
        {
            return p_compare_1_.getName().compareTo(p_compare_2_.getName());
        }
    });
    this.properties = ImmutableList.copyOf(properties);
    Map<Map<IProperty, Comparable>, BlockState.StateImplementation> map = Maps.<Map<IProperty, Comparable>, BlockState.StateImplementation>newLinkedHashMap();
    List<BlockState.StateImplementation> list = Lists.<BlockState.StateImplementation>newArrayList();

    for (List<Comparable> list1 : Cartesian.cartesianProduct(this.getAllowedValues()))
    {
        Map<IProperty, Comparable> map1 = MapPopulator.<IProperty, Comparable>createMap(this.properties, list1);
        BlockState.StateImplementation blockstate$stateimplementation = new BlockState.StateImplementation(blockIn, ImmutableMap.copyOf(map1));
        map.put(map1, blockstate$stateimplementation);
        list.add(blockstate$stateimplementation);
    }

    for (BlockState.StateImplementation blockstate$stateimplementation1 : list)
    {
        blockstate$stateimplementation1.buildPropertyValueTable(map);
    }

    this.validStates = ImmutableList.<IBlockState>copyOf(list);
}
项目:DecompiledMinecraft    文件:BlockState.java   
public BlockState(Block blockIn, IProperty... properties)
{
    this.block = blockIn;
    Arrays.sort(properties, new Comparator<IProperty>()
    {
        public int compare(IProperty p_compare_1_, IProperty p_compare_2_)
        {
            return p_compare_1_.getName().compareTo(p_compare_2_.getName());
        }
    });
    this.properties = ImmutableList.copyOf(properties);
    Map<Map<IProperty, Comparable>, BlockState.StateImplementation> map = Maps.<Map<IProperty, Comparable>, BlockState.StateImplementation>newLinkedHashMap();
    List<BlockState.StateImplementation> list = Lists.<BlockState.StateImplementation>newArrayList();

    for (List<Comparable> list1 : Cartesian.cartesianProduct(this.getAllowedValues()))
    {
        Map<IProperty, Comparable> map1 = MapPopulator.<IProperty, Comparable>createMap(this.properties, list1);
        BlockState.StateImplementation blockstate$stateimplementation = new BlockState.StateImplementation(blockIn, ImmutableMap.copyOf(map1));
        map.put(map1, blockstate$stateimplementation);
        list.add(blockstate$stateimplementation);
    }

    for (BlockState.StateImplementation blockstate$stateimplementation1 : list)
    {
        blockstate$stateimplementation1.buildPropertyValueTable(map);
    }

    this.validStates = ImmutableList.<IBlockState>copyOf(list);
}
项目:BaseClient    文件:BlockState.java   
public BlockState(Block blockIn, IProperty... properties)
{
    this.block = blockIn;
    Arrays.sort(properties, new Comparator<IProperty>()
    {
        public int compare(IProperty p_compare_1_, IProperty p_compare_2_)
        {
            return p_compare_1_.getName().compareTo(p_compare_2_.getName());
        }
    });
    this.properties = ImmutableList.copyOf(properties);
    Map<Map<IProperty, Comparable>, BlockState.StateImplementation> map = Maps.<Map<IProperty, Comparable>, BlockState.StateImplementation>newLinkedHashMap();
    List<BlockState.StateImplementation> list = Lists.<BlockState.StateImplementation>newArrayList();

    for (List<Comparable> list1 : Cartesian.cartesianProduct(this.getAllowedValues()))
    {
        Map<IProperty, Comparable> map1 = MapPopulator.<IProperty, Comparable>createMap(this.properties, list1);
        BlockState.StateImplementation blockstate$stateimplementation = new BlockState.StateImplementation(blockIn, ImmutableMap.copyOf(map1));
        map.put(map1, blockstate$stateimplementation);
        list.add(blockstate$stateimplementation);
    }

    for (BlockState.StateImplementation blockstate$stateimplementation1 : list)
    {
        blockstate$stateimplementation1.buildPropertyValueTable(map);
    }

    this.validStates = ImmutableList.<IBlockState>copyOf(list);
}
项目:BaseClient    文件:BlockState.java   
public BlockState(Block blockIn, IProperty... properties)
{
    this.block = blockIn;
    Arrays.sort(properties, new Comparator<IProperty>()
    {
        public int compare(IProperty p_compare_1_, IProperty p_compare_2_)
        {
            return p_compare_1_.getName().compareTo(p_compare_2_.getName());
        }
    });
    this.properties = ImmutableList.copyOf(properties);
    Map<Map<IProperty, Comparable>, BlockState.StateImplementation> map = Maps.<Map<IProperty, Comparable>, BlockState.StateImplementation>newLinkedHashMap();
    List<BlockState.StateImplementation> list = Lists.<BlockState.StateImplementation>newArrayList();

    for (List<Comparable> list1 : Cartesian.cartesianProduct(this.getAllowedValues()))
    {
        Map<IProperty, Comparable> map1 = MapPopulator.<IProperty, Comparable>createMap(this.properties, list1);
        BlockState.StateImplementation blockstate$stateimplementation = new BlockState.StateImplementation(blockIn, ImmutableMap.copyOf(map1));
        map.put(map1, blockstate$stateimplementation);
        list.add(blockstate$stateimplementation);
    }

    for (BlockState.StateImplementation blockstate$stateimplementation1 : list)
    {
        blockstate$stateimplementation1.buildPropertyValueTable(map);
    }

    this.validStates = ImmutableList.<IBlockState>copyOf(list);
}
项目:Backmemed    文件:BlockStateContainer.java   
protected BlockStateContainer(Block p_i9_1_, IProperty<?>[] p_i9_2_, ImmutableMap < IUnlistedProperty<?>, Optional<? >> p_i9_3_)
{
    this.block = p_i9_1_;
    Map < String, IProperty<? >> map = Maps. < String, IProperty<? >> newHashMap();

    for (IProperty<?> iproperty : p_i9_2_)
    {
        validateProperty(p_i9_1_, iproperty);
        map.put(iproperty.getName(), iproperty);
    }

    this.properties = ImmutableSortedMap. < String, IProperty<? >> copyOf(map);
    Map < Map < IProperty<?>, Comparable<? >> , BlockStateContainer.StateImplementation > map2 = Maps. < Map < IProperty<?>, Comparable<? >> , BlockStateContainer.StateImplementation > newLinkedHashMap();
    List<BlockStateContainer.StateImplementation> list = Lists.<BlockStateContainer.StateImplementation>newArrayList();

    for (List < Comparable<? >> list1 : Cartesian.cartesianProduct(this.getAllowedValues()))
    {
        Map < IProperty<?>, Comparable<? >> map1 = MapPopulator. < IProperty<?>, Comparable<? >> createMap(this.properties.values(), list1);
        BlockStateContainer.StateImplementation blockstatecontainer$stateimplementation = this.createState(p_i9_1_, ImmutableMap. < IProperty<?>, Comparable<? >> copyOf(map1), p_i9_3_);
        map2.put(map1, blockstatecontainer$stateimplementation);
        list.add(blockstatecontainer$stateimplementation);
    }

    for (BlockStateContainer.StateImplementation blockstatecontainer$stateimplementation1 : list)
    {
        blockstatecontainer$stateimplementation1.buildPropertyValueTable(map2);
    }

    this.validStates = ImmutableList.copyOf(list);
}
项目:CustomWorldGen    文件:BlockStateContainer.java   
protected BlockStateContainer(Block blockIn, IProperty<?>[] properties, ImmutableMap<net.minecraftforge.common.property.IUnlistedProperty<?>, com.google.common.base.Optional<?>> unlistedProperties)
{
    this.block = blockIn;
    Map < String, IProperty<? >> map = Maps. < String, IProperty<? >> newHashMap();

    for (IProperty<?> iproperty : properties)
    {
        validateProperty(blockIn, iproperty);
        map.put(iproperty.getName(), iproperty);
    }

    this.properties = ImmutableSortedMap. < String, IProperty<? >> copyOf(map);
    Map < Map < IProperty<?>, Comparable<? >> , BlockStateContainer.StateImplementation > map2 = Maps. < Map < IProperty<?>, Comparable<? >> , BlockStateContainer.StateImplementation > newLinkedHashMap();
    List<BlockStateContainer.StateImplementation> list1 = Lists.<BlockStateContainer.StateImplementation>newArrayList();

    for (List < Comparable<? >> list : Cartesian.cartesianProduct(this.getAllowedValues()))
    {
        Map < IProperty<?>, Comparable<? >> map1 = MapPopulator. < IProperty<?>, Comparable<? >> createMap(this.properties.values(), list);
        BlockStateContainer.StateImplementation blockstatecontainer$stateimplementation = createState(blockIn, ImmutableMap.copyOf(map1), unlistedProperties);
        map2.put(map1, blockstatecontainer$stateimplementation);
        list1.add(blockstatecontainer$stateimplementation);
    }

    for (BlockStateContainer.StateImplementation blockstatecontainer$stateimplementation1 : list1)
    {
        blockstatecontainer$stateimplementation1.buildPropertyValueTable(map2);
    }

    this.validStates = ImmutableList.<IBlockState>copyOf(list1);
}
项目:ExpandedRailsMod    文件:BlockStateContainer.java   
protected BlockStateContainer(Block blockIn, IProperty<?>[] properties, ImmutableMap<net.minecraftforge.common.property.IUnlistedProperty<?>, com.google.common.base.Optional<?>> unlistedProperties)
{
    this.block = blockIn;
    Map < String, IProperty<? >> map = Maps. < String, IProperty<? >> newHashMap();

    for (IProperty<?> iproperty : properties)
    {
        validateProperty(blockIn, iproperty);
        map.put(iproperty.getName(), iproperty);
    }

    this.properties = ImmutableSortedMap. < String, IProperty<? >> copyOf(map);
    Map < Map < IProperty<?>, Comparable<? >> , BlockStateContainer.StateImplementation > map2 = Maps. < Map < IProperty<?>, Comparable<? >> , BlockStateContainer.StateImplementation > newLinkedHashMap();
    List<BlockStateContainer.StateImplementation> list1 = Lists.<BlockStateContainer.StateImplementation>newArrayList();

    for (List < Comparable<? >> list : Cartesian.cartesianProduct(this.getAllowedValues()))
    {
        Map < IProperty<?>, Comparable<? >> map1 = MapPopulator. < IProperty<?>, Comparable<? >> createMap(this.properties.values(), list);
        BlockStateContainer.StateImplementation blockstatecontainer$stateimplementation = createState(blockIn, ImmutableMap.copyOf(map1), unlistedProperties);
        map2.put(map1, blockstatecontainer$stateimplementation);
        list1.add(blockstatecontainer$stateimplementation);
    }

    for (BlockStateContainer.StateImplementation blockstatecontainer$stateimplementation1 : list1)
    {
        blockstatecontainer$stateimplementation1.buildPropertyValueTable(map2);
    }

    this.validStates = ImmutableList.<IBlockState>copyOf(list1);
}