Search in sources :

Example 71 with IProperty

use of net.minecraft.block.properties.IProperty in project ImmersiveEngineering by BluSunrize.

the class BlockIEBase method createNotTempBlockState.

protected BlockStateContainer createNotTempBlockState() {
    IProperty[] array = new IProperty[1 + this.additionalProperties.length];
    array[0] = this.property;
    for (int i = 0; i < this.additionalProperties.length; i++) array[1 + i] = this.additionalProperties[i];
    if (this.additionalUnlistedProperties.length > 0)
        return new ExtendedBlockState(this, array, additionalUnlistedProperties);
    return new BlockStateContainer(this, array);
}
Also used : IProperty(net.minecraft.block.properties.IProperty) ExtendedBlockState(net.minecraftforge.common.property.ExtendedBlockState) BlockStateContainer(net.minecraft.block.state.BlockStateContainer)

Example 72 with IProperty

use of net.minecraft.block.properties.IProperty in project ImmersiveEngineering by BluSunrize.

the class ClientProxy method getPropertyString.

public static String getPropertyString(Map<IProperty, Comparable> propertyMap) {
    StringBuilder stringbuilder = new StringBuilder();
    for (Entry<IProperty, Comparable> entry : propertyMap.entrySet()) {
        if (stringbuilder.length() != 0)
            stringbuilder.append(",");
        IProperty iproperty = entry.getKey();
        Comparable comparable = entry.getValue();
        stringbuilder.append(iproperty.getName());
        stringbuilder.append("=");
        stringbuilder.append(iproperty.getName(comparable));
    }
    if (stringbuilder.length() == 0)
        stringbuilder.append("normal");
    return stringbuilder.toString();
}
Also used : IProperty(net.minecraft.block.properties.IProperty)

Aggregations

IProperty (net.minecraft.block.properties.IProperty)72 IBlockState (net.minecraft.block.state.IBlockState)39 Block (net.minecraft.block.Block)20 ResourceLocation (net.minecraft.util.ResourceLocation)14 ModelResourceLocation (net.minecraft.client.renderer.block.model.ModelResourceLocation)11 ItemStack (net.minecraft.item.ItemStack)10 EnumFacing (net.minecraft.util.EnumFacing)10 Map (java.util.Map)9 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)9 ArrayList (java.util.ArrayList)8 BlockStateContainer (net.minecraft.block.state.BlockStateContainer)8 TileEntity (net.minecraft.tileentity.TileEntity)7 BlockPos (net.minecraft.util.math.BlockPos)7 JsonObject (com.google.gson.JsonObject)6 DrawBlock (com.microsoft.Malmo.Schemas.DrawBlock)5 ExtendedBlockState (net.minecraftforge.common.property.ExtendedBlockState)5 JsonArray (com.google.gson.JsonArray)4 JsonElement (com.google.gson.JsonElement)4 List (java.util.List)4 Collectors (java.util.stream.Collectors)4