本文整理汇总了Java中net.minecraft.client.renderer.block.statemap.IStateMapper类的典型用法代码示例。如果您正苦于以下问题:Java IStateMapper类的具体用法?Java IStateMapper怎么用?Java IStateMapper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IStateMapper类属于net.minecraft.client.renderer.block.statemap包,在下文中一共展示了IStateMapper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerItemRenders
import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public static void registerItemRenders() {
rmm(skeleton_maker);
rmm(baby_skeleton_maker);
rmm(overlords_seal);
rmm(overlords_stamp);
rmm(squad_editor);
rmm(sans_mask);
rmm(skinsuit);
rmm(skinsuit_mummy);
rmm(warrior_spawner);
rmm(baby_spawner);
rmm(converted_spawner);
rmm(milk_bottle);
rmm(keychain);
rmm(keychain_occupied);
rmm(crown);
rmm(rallying_horn);
IStateMapper skeleton_maker_mapper = new StateMap.Builder().ignore(BlockSkeletonMaker.TRIGGERED).build();
ModelLoader.setCustomStateMapper(skeleton_maker, skeleton_maker_mapper);
ModelLoader.setCustomStateMapper(baby_skeleton_maker, skeleton_maker_mapper);
}
示例2: registerNonRenderingProperties
import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
@Override
public void registerNonRenderingProperties(Block block)
{
if (block instanceof IHSHBlock)
{
IHSHBlock hshBlock = (IHSHBlock)block;
IProperty[] nonRenderingProperties = hshBlock.getNonRenderingProperties();
if (nonRenderingProperties != null)
{
// use a custom state mapper which will ignore the properties specified in the block as being non-rendering
IStateMapper custom_mapper = (new StateMap.Builder()).ignore(nonRenderingProperties).build();
ModelLoader.setCustomStateMapper(block, custom_mapper);
}
}
}
示例3: onRegisterAllBlocks
import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
/**
* Internal, do not use.
*/
public static void onRegisterAllBlocks(BlockModelShapes shapes)
{
for (Entry<RegistryDelegate<Block>, IStateMapper> e : customStateMappers.entrySet())
{
shapes.registerBlockWithStateMapper(e.getKey().get(), e.getValue());
}
}
示例4: initModel
import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public void initModel(){
IStateMapper stateMapper = new StateMap.Builder().build();
ModelLoader.setCustomStateMapper(this, stateMapper);
for(WoodType type : WoodType.values()){
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), type.getMeta(), new ModelResourceLocation(getRegistryName()+"_"+type.getName(), "inventory"));
}
}
示例5: initModel
import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public void initModel() {
IStateMapper stateMapper = new StateMap.Builder().ignore(new IProperty[] {BlockDoor.POWERED}).build();
ModelLoader.setCustomStateMapper(this, stateMapper);
ModBlocks.initBasicModel(this);
}
示例6: initModel
import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public void initModel(){
IStateMapper stateMapper = new StateMap.Builder().build();
ModelLoader.setCustomStateMapper(this, stateMapper);
for(FancyLadderType2 type : FancyLadderType2.values()){
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), type.getMeta(), new ModelResourceLocation(getRegistryName()+"_"+type.getName(), "inventory"));
}
}
示例7: initModel
import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public void initModel(){
IStateMapper stateMapper = new StateMap.Builder().build();
ModelLoader.setCustomStateMapper(this, stateMapper);
for(FancyLadderType type : FancyLadderType.values()){
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), type.getMeta(), new ModelResourceLocation(getRegistryName()+"_"+type.getName(), "inventory"));
}
}
示例8: registerBlockRenderer
import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
public static void registerBlockRenderer(Block block, IStateMapper mapper,
int... metadata)
{
Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
.getModelManager().getBlockModelShapes()
.registerBlockWithStateMapper(block, mapper);
}
示例9: getCustomStateMap
import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
/**
* Always returns the same base texture, since ISmartModel will handle the actual render state
*/
@Override
@SideOnly(Side.CLIENT)
public IStateMapper getCustomStateMap() {
return new StateMapperBase() {
@Override
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
return ModelDungeonBlock.resource;
}
};
}
示例10: getCustomStateMap
import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public IStateMapper getCustomStateMap() {
// can't use this because meta 8 needs to be remapped to 7:
// return (new StateMap.Builder()).addPropertiesToIgnore(UNLOCKED).build();
return new StateMapperBase() {
@Override
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
String resource = getUnlocalizedName();
resource = resource.substring(resource.lastIndexOf(".") + 1) + "#" + PENDANTS.getName() + "=";
int pendants = ((Boolean) state.getValue(UNLOCKED)).booleanValue() ? ALL_PENDANTS : ((Integer) state.getValue(PENDANTS)).intValue();
return new ModelResourceLocation(ModInfo.ID + ":" + resource + pendants);
}
};
}
示例11: getCustomStateMap
import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public IStateMapper getCustomStateMap() {
return new StateMapperBase() {
@Override
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
return new ModelResourceLocation(ModInfo.ID + ":chest_invisible");
}
};
}
示例12: registerBlockWithStateMapper
import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
public void registerBlockWithStateMapper(Block assoc, IStateMapper stateMapper)
{
this.blockStateMapper.registerBlockStateMapper(assoc, stateMapper);
}
示例13: setCustomStateMapper
import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
/**
* Adds a custom IBlockState -> model variant logic.
*/
public static void setCustomStateMapper(Block block, IStateMapper mapper)
{
customStateMappers.put(block.delegate, mapper);
}
示例14: registerBlockStateMapper
import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
private static void registerBlockStateMapper(Block block, IStateMapper mapper) {
ModelLoader.setCustomStateMapper(block, mapper);
}
示例15: getCustomStateMap
import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public IStateMapper getCustomStateMap() {
return (new StateMap.Builder()).ignore(VARIANT).build();
}