public class SidesIconProvider extends java.lang.Object implements IBlockIconProvider.ISidesIconProvider
IIconProvider allows a Block to have different icons for its sides.DirectionalComponent.HORIZONTAL property to determine the facing of the block and rotate the
icons accordingly.IBlockIconProvider.ISidesIconProvider, IBlockIconProvider.IStatesIconProvider| Constructor and Description |
|---|
SidesIconProvider(Icon defaultIcon) |
SidesIconProvider(Icon defaultIcon,
Icon[] sideIcons) |
SidesIconProvider(java.lang.String defaultName) |
SidesIconProvider(java.lang.String defaultName,
java.lang.String[] sideNames) |
| Modifier and Type | Method and Description |
|---|---|
Icon |
getIcon()
Gets the
Icon to use. |
Icon |
getIcon(net.minecraft.util.EnumFacing side)
Gets the
Icon associated with a side. |
Icon |
getIcon(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.util.EnumFacing side)
Gets the
Icon for the side for the block in world. |
Icon |
getIcon(net.minecraft.item.ItemStack itemStack,
net.minecraft.util.EnumFacing side)
Gets the
Icon for the side for the block in inventory. |
void |
setDefaultIcon(Icon icon)
Sets the default
Icon to use if no icon is set for a side of the block. |
void |
setDefaultIcon(java.lang.String name)
Sets the default
Icon to use if no icon is set for a face. |
void |
setSideIcon(net.minecraft.util.EnumFacing side,
Icon icon) |
void |
setSideIcon(net.minecraft.util.EnumFacing side,
java.lang.String name) |
void |
setSideIcons(Icon[] icons)
Sets the
Icon to use for each side of the block. |
void |
setSideIcons(java.lang.String[] names)
Sets the
Icon to use for each side of the block. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetIcongetParticleIconcreate, create, create, create, isClientComponentgetComponent, getDependenciespublic SidesIconProvider(java.lang.String defaultName,
java.lang.String[] sideNames)
public SidesIconProvider(java.lang.String defaultName)
public SidesIconProvider(Icon defaultIcon)
public void setDefaultIcon(java.lang.String name)
Icon to use if no icon is set for a face.name - the new default iconpublic void setDefaultIcon(Icon icon)
Icon to use if no icon is set for a side of the block.icon - the new default iconpublic void setSideIcons(java.lang.String[] names)
Icon to use for each side of the block.EnumFacing.getIndex() value.defaultIcon will be used instead.names - the new side iconspublic void setSideIcons(Icon[] icons)
Icon to use for each side of the block.EnumFacing.getIndex() value.defaultIcon will be used instead.icons - the new side iconspublic void setSideIcon(net.minecraft.util.EnumFacing side,
Icon icon)
public void setSideIcon(net.minecraft.util.EnumFacing side,
java.lang.String name)
public Icon getIcon(net.minecraft.util.EnumFacing side)
Icon associated with a side.getIcon in interface IBlockIconProvider.ISidesIconProviderside - the dirpublic Icon getIcon(net.minecraft.world.IBlockAccess world, net.minecraft.util.math.BlockPos pos, net.minecraft.block.state.IBlockState state, net.minecraft.util.EnumFacing side)
Icon for the side for the block in world.defaultIcon is used.getIcon in interface IBlockIconProviderworld - the worldpos - the posstate - the stateside - the sidepublic Icon getIcon(net.minecraft.item.ItemStack itemStack, net.minecraft.util.EnumFacing side)
Icon for the side for the block in inventory.defaultIcon is used.getIcon in interface IBlockIconProvideritemStack - the item stackside - the facingpublic Icon getIcon()
IIconProviderIcon to use.getIcon in interface IBlockIconProvidergetIcon in interface IIconProvider