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


Java ItemOverrideList类代码示例

本文整理汇总了Java中net.minecraft.client.renderer.block.model.ItemOverrideList的典型用法代码示例。如果您正苦于以下问题:Java ItemOverrideList类的具体用法?Java ItemOverrideList怎么用?Java ItemOverrideList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ItemOverrideList类属于net.minecraft.client.renderer.block.model包,在下文中一共展示了ItemOverrideList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: makeModelCube

import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
public static IBakedModel makeModelCube(TextureAtlasSprite p_makeModelCube_0_, int p_makeModelCube_1_)
{
    List list = new ArrayList();
    EnumFacing[] aenumfacing = EnumFacing.VALUES;
    Map<EnumFacing, List<BakedQuad>> map = new HashMap();

    for (int i = 0; i < aenumfacing.length; ++i)
    {
        EnumFacing enumfacing = aenumfacing[i];
        List list1 = new ArrayList();
        list1.add(makeBakedQuad(enumfacing, p_makeModelCube_0_, p_makeModelCube_1_));
        map.put(enumfacing, list1);
    }

    ItemOverrideList itemoverridelist = new ItemOverrideList(new ArrayList());
    IBakedModel ibakedmodel = new SimpleBakedModel(list, map, true, true, p_makeModelCube_0_, ItemCameraTransforms.DEFAULT, itemoverridelist);
    return ibakedmodel;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:19,代码来源:BlockModelUtils.java

示例2: BakedItemModel

import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
public BakedItemModel(ImmutableList<BakedQuad> quads, TextureAtlasSprite particle, ImmutableMap<TransformType, TRSRTransformation> transforms, ItemOverrideList overrides, IBakedModel otherModel)
{
    this.quads = quads;
    this.particle = particle;
    this.transforms = transforms;
    this.overrides = overrides;
    if(otherModel != null)
    {
        this.otherModel = otherModel;
        this.isCulled = true;
    }
    else
    {
        ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();
        for(BakedQuad quad : quads)
        {
            if(quad.getFace() == EnumFacing.SOUTH)
            {
                builder.add(quad);
            }
        }
        this.otherModel = new BakedItemModel(builder.build(), particle, transforms, overrides, this);
        isCulled = false;
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:26,代码来源:ItemLayerModel.java

示例3: BakedModelWrapper

import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
public BakedModelWrapper(
		ModelMCMD model,
		IModelState state,
		VertexFormat format,
		ImmutableMap<String, TextureAtlasSprite> slotToSprite,
		ItemOverrideList itemOverrides) {
	this.actualModel = Objects.requireNonNull(model);
	this.slotToSprite = Objects.requireNonNull(slotToSprite);
	this.bakedState = Objects.requireNonNull(state);
	this.format = Objects.requireNonNull(format);
	// There is at least the "missingno" texture in the list
	particleSprite = getParticleSprite(slotToSprite);
	this.stateInformation = new ModelStateInformation();
	stateInformation.setAnimation(new AnimationStateProxy(state));
	stateInformation.setFrame(0);
	this.itemOverrides = Objects.requireNonNull(itemOverrides);
}
 
开发者ID:WorldSEnder,项目名称:MCAnm,代码行数:18,代码来源:ModelLoader.java

示例4: BakedItemModel

import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
public BakedItemModel(ModelCustomLayers parent, VertexFormat format, ImmutableList<BakedQuad> quads, TextureAtlasSprite particle, ImmutableMap<TransformType, TRSRTransformation> transforms, ItemOverrideList overrides, @Nullable IBakedModel otherModel)
{
	this.parent = parent;
	this.format = format;
    this.quads = quads;
    this.particle = particle;
    this.transforms = transforms;
    this.overrides = overrides;
    if(otherModel != null)
    {
        this.otherModel = otherModel;
        this.isCulled = true;
    }
    else
    {
        ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();
        for(BakedQuad quad : quads)
        {
            if(quad.getFace() == EnumFacing.SOUTH)
            {
                builder.add(quad);
            }
        }
        this.otherModel = new BakedItemModel(parent, format, builder.build(), particle, transforms, overrides, this);
        isCulled = false;
    }
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:28,代码来源:ModelCustomLayers.java

示例5: getOverrides

import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
@Override
public ItemOverrideList getOverrides()
{
	return new ItemOverrideList(new ArrayList<ItemOverride>()){
		@Override
		public IBakedModel handleItemState( IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity )
		{
			if( !( stack.getItem() == Item.getItemFromBlock(ModBlocks.crystalPipe)) )
			{
				return originalModel;
			}
			return new ModelPipeBaked( stack );
		}
	};
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:16,代码来源:ModelPipeBaked.java

示例6: getOverrides

import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
@Override
public ItemOverrideList getOverrides() {
    return new ItemOverrideList(ImmutableList.of()) {
        @Override
        public IBakedModel handleItemState(IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity) {
            IBakedModel model = ModelBakery.getCachedItemModel(stack);
            if (model == null) {
                return originalModel;
            }
            return model;
        }
    };
}
 
开发者ID:TheCBProject,项目名称:CodeChickenLib,代码行数:14,代码来源:CCBakeryModel.java

示例7: getOverrides

import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
@Override
public ItemOverrideList getOverrides()
{
    return new ItemOverrideList(Collections.emptyList())
    {
        @Override
        public IBakedModel handleItemState(IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity)
        {
            ModelHandle mh = ModelHandle.of(BASE_MODEL);

            if (state != null)
            {
                mh = mh.state(state);
            }

            NBTTagCompound tag = stack.getTagCompound();
            if (tag != null)
            {
                String book = tag.getString("Book");
                BookDocument bookDocument = BookRegistry.get(new ResourceLocation(book));
                if (bookDocument != null)
                {
                    ResourceLocation cover = bookDocument.getBookCover();
                    if (cover != null)
                        mh = mh.replace("#CoverGraphics", cover.toString());
                }
            }

            return mh.get();
        }
    };
}
 
开发者ID:gigaherz,项目名称:Guidebook,代码行数:33,代码来源:BookBakedModel.java

示例8: ModelDescription

import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
private ModelDescription(
		ModelMCMD model,
		ISkeleton skeleton,
		ImmutableMap<String, ResourceLocation> textureMapping,
		ImmutableMap<TransformType, TRSRTransformation> viewMapping,
		List<ItemOverride> itemOverrides) {
	this.model = Objects.requireNonNull(model);
	this.skeleton = Objects.requireNonNull(skeleton);
	this.textureMapping = Objects.requireNonNull(textureMapping);
	this.viewMapping = Objects.requireNonNull(viewMapping);
	this.itemOverrides = new ItemOverrideList(itemOverrides);
}
 
开发者ID:WorldSEnder,项目名称:MCAnm,代码行数:13,代码来源:ModelDescription.java

示例9: ModelWrapper

import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
private ModelWrapper(
		ResourceLocation file,
		ModelMCMD model,
		Map<TransformType, TRSRTransformation> viewTransformations,
		Map<String, ResourceLocation> slotToTex,
		Multimap<ResourceLocation, String> textureToSlot,
		ItemOverrideList itemOverrides) {
	this.modelLocation = Objects.requireNonNull(file);
	this.actualModel = Objects.requireNonNull(model);
	this.viewTransformations = new HashMap<>(viewTransformations);
	this.slotToTexture = new HashMap<>(slotToTex);
	this.textureToSlots = MultimapBuilder.hashKeys().hashSetValues().build(textureToSlot);
	this.itemOverrides = Objects.requireNonNull(itemOverrides);
}
 
开发者ID:WorldSEnder,项目名称:MCAnm,代码行数:15,代码来源:ModelLoader.java

示例10: preInit

import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
@Override
public void preInit() {
	CustomModelLoader.INSTANCE.registerModel(new ResourceLocation("betterchests:models/block/betterchest"), (a, b, c) -> new BuiltInModel(TESRBChest.TRANSFORMS, ItemOverrideList.NONE));
	CustomModelLoader.INSTANCE.registerModel(new ResourceLocation("betterchests:models/item/filter"), new ModelFilter());
	CustomModelLoader.INSTANCE.registerModel(new ResourceLocation("betterchests:models/item/betterportablebarrel"), new ModelPortableBarrel());
	keyBind = new KeyBinding("betterchests.keybind.openbag", Keyboard.KEY_ADD, "betterchests:keybind.category");
}
 
开发者ID:Aroma1997,项目名称:BetterChests,代码行数:8,代码来源:ClientProxy.java

示例11: getOverrides

import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
@Override
public ItemOverrideList getOverrides() {
	return new ItemOverrideList(Collections.emptyList()) {
		@Override
		public IBakedModel handleItemState(IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity) {
			if (ItemFilter.getInventoryFor(stack).isBlacklist()) {
				return blacklist;
			} else {
				return whitelist;
			}
		}
	};
}
 
开发者ID:Aroma1997,项目名称:BetterChests,代码行数:14,代码来源:ModelFilter.java

示例12: bake

import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
@Override
public IBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
	final IModel untexturedModel = getModel(this.untexturedModel);
	final IBakedModel untexturedBakedModel = untexturedModel.bake(new ModelStateComposition(state, untexturedModel.getDefaultState()), format, bakedTextureGetter);

	final IModel texturedModel = getModel(this.texturedModel);
	final IBakedModel texturedBakedModel = texturedModel.bake(new ModelStateComposition(state, texturedModel.getDefaultState()), format, bakedTextureGetter);

	final ItemOverrideList overrides = new TexturedItemOverrides(untexturedBakedModel, texturedModel, texturedBakedModel.getOverrides().getOverrides(), textures, state, format, bakedTextureGetter);

	return new BakedModel(untexturedBakedModel, PerspectiveMapWrapper.getTransforms(state), overrides);
}
 
开发者ID:OpenMods,项目名称:OpenModsLib,代码行数:13,代码来源:TexturedItemModel.java

示例13: getOverrides

import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
@Override
public ItemOverrideList getOverrides() {
    return originalModel.getOverrides();
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:5,代码来源:CamoModel.java

示例14: getOverrides

import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
@Override
public ItemOverrideList getOverrides()
{
    return ItemOverrideList.NONE;
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:6,代码来源:TintedOBJModel.java

示例15: getOverrides

import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
@Override
public ItemOverrideList getOverrides() {
    return null;
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:5,代码来源:PressureGlassBakedModel.java


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