当前位置: 首页>>代码示例>>Java>>正文


Java IStateMapper类代码示例

本文整理汇总了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);
}
 
开发者ID:The-Fireplace-Minecraft-Mods,项目名称:Overlord,代码行数:23,代码来源:Overlord.java

示例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);
        }
    }
}
 
开发者ID:Glitchfiend,项目名称:HomeSweetHome,代码行数:17,代码来源:ClientProxy.java

示例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());
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:11,代码来源:ModelLoader.java

示例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"));
}
  }
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:9,代码来源:BlockCrystalLadder.java

示例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);
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:8,代码来源:BlockCustomDoor.java

示例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"));
}
  }
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:9,代码来源:BlockFancyLadder2.java

示例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"));
}
  }
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:9,代码来源:BlockFancyLadder.java

示例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);
}
 
开发者ID:Bartz24,项目名称:UsefulNullifiers,代码行数:8,代码来源:ModRenderers.java

示例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;
		}
	};
}
 
开发者ID:coolAlias,项目名称:ZeldaSwordSkills,代码行数:14,代码来源:BlockDungeonStone.java

示例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);
		}
	};
}
 
开发者ID:coolAlias,项目名称:ZeldaSwordSkills,代码行数:16,代码来源:BlockPedestal.java

示例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");
		}
	};
}
 
开发者ID:coolAlias,项目名称:ZeldaSwordSkills,代码行数:11,代码来源:BlockChestInvisible.java

示例12: registerBlockWithStateMapper

import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
public void registerBlockWithStateMapper(Block assoc, IStateMapper stateMapper)
{
    this.blockStateMapper.registerBlockStateMapper(assoc, stateMapper);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:BlockModelShapes.java

示例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);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:8,代码来源:ModelLoader.java

示例14: registerBlockStateMapper

import net.minecraft.client.renderer.block.statemap.IStateMapper; //导入依赖的package包/类
private static void registerBlockStateMapper(Block block, IStateMapper mapper) {
    ModelLoader.setCustomStateMapper(block, mapper);
}
 
开发者ID:GoodTimeStudio,项目名称:Production-Line,代码行数:4,代码来源:PLModelRegistry.java

示例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();
}
 
开发者ID:coolAlias,项目名称:ZeldaSwordSkills,代码行数:6,代码来源:BlockAncientTablet.java


注:本文中的net.minecraft.client.renderer.block.statemap.IStateMapper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。