Java 类net.minecraft.client.renderer.block.model.ItemOverrideList 实例源码

项目:Backmemed    文件:BlockModelUtils.java   
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;
}
项目:CustomWorldGen    文件:ItemLayerModel.java   
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;
    }
}
项目:MCAnm    文件:ModelLoader.java   
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);
}
项目:CrystalMod    文件:ModelCustomLayers.java   
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;
    }
}
项目:CrystalMod    文件:ModelPipeBaked.java   
@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 );
        }
    };
}
项目:CodeChickenLib    文件:CCBakeryModel.java   
@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;
        }
    };
}
项目:Guidebook    文件:BookBakedModel.java   
@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();
        }
    };
}
项目:MCAnm    文件:ModelDescription.java   
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);
}
项目:MCAnm    文件:ModelLoader.java   
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);
}
项目:BetterChests    文件:ClientProxy.java   
@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");
}
项目:BetterChests    文件:ModelFilter.java   
@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;
            }
        }
    };
}
项目:OpenModsLib    文件:TexturedItemModel.java   
@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);
}
项目:pnc-repressurized    文件:CamoModel.java   
@Override
public ItemOverrideList getOverrides() {
    return originalModel.getOverrides();
}
项目:pnc-repressurized    文件:TintedOBJModel.java   
@Override
public ItemOverrideList getOverrides()
{
    return ItemOverrideList.NONE;
}
项目:pnc-repressurized    文件:PressureGlassBakedModel.java   
@Override
public ItemOverrideList getOverrides() {
    return null;
}
项目:Infernum    文件:ModelSpellPage.java   
@Override
public ItemOverrideList getOverrides() {
    return SpellPageOverrideList.INSTANCE;
}
项目:Infernum    文件:ModelKnowledgeBook.java   
@Override
public ItemOverrideList getOverrides() {
    return KnowledgeBookOverrideList.INSTANCE;
}
项目:Infernum    文件:BakedModelKnowledgeBook.java   
@Override
public ItemOverrideList getOverrides() {
    throw new UnsupportedOperationException("The finalized model does not have an override list.");
}
项目:Infernum    文件:BakedModelSpellPage.java   
@Override
public ItemOverrideList getOverrides() {
    throw new UnsupportedOperationException("The finalized model does not have an override list.");
}
项目:Etheric    文件:PipeModel.java   
@Override
public ItemOverrideList getOverrides() {
    return ItemOverrideList.NONE;
}
项目:DankNull    文件:TESRDankNullDock.java   
@Override
public ItemOverrideList getOverrides() {
    return ItemOverrideList.NONE;
}
项目:DankNull    文件:DankNullRenderer.java   
@Override
public ItemOverrideList getOverrides() {
    return ItemOverrideList.NONE;
}
项目:DankNull    文件:DankNullPanelRenderer.java   
@Override
public ItemOverrideList getOverrides() {
    return ItemOverrideList.NONE;
}
项目:Solar    文件:BakedQuantumMirror.java   
@Override
public ItemOverrideList getOverrides() {
    return overrides;
}
项目:Solar    文件:BakedRender.java   
@Override
public ItemOverrideList getOverrides() {
    return new ItemOverrideList(Collections.emptyList());
}
项目:Solar    文件:BakedBrightness.java   
@Override
public ItemOverrideList getOverrides() {
    return ItemOverrideList.NONE;
}
项目:Adventurers-Toolbox    文件:MaceModel.java   
@Override
public ItemOverrideList getOverrides() {
    return BakedMaceOverrideHandler.INSTANCE;
}
项目:Adventurers-Toolbox    文件:DaggerModel.java   
@Override
public ItemOverrideList getOverrides() {
    return BakedDaggerOverrideHandler.INSTANCE;
}
项目:Adventurers-Toolbox    文件:HoeModel.java   
@Override
public ItemOverrideList getOverrides() {
    return BakedHoeOverrideHandler.INSTANCE;
}
项目:Adventurers-Toolbox    文件:PickaxeModel.java   
@Override
public ItemOverrideList getOverrides() {
    return BakedPickaxeOverrideHandler.INSTANCE;
}
项目:Adventurers-Toolbox    文件:AxeModel.java   
@Override
public ItemOverrideList getOverrides() {
    return BakedAxeOverrideHandler.INSTANCE;
}
项目:Adventurers-Toolbox    文件:HammerModel.java   
@Override
public ItemOverrideList getOverrides() {
    return BakedHammerOverrideHandler.INSTANCE;
}
项目:Adventurers-Toolbox    文件:ShovelModel.java   
@Override
public ItemOverrideList getOverrides() {
    return BakedShovelOverrideHandler.INSTANCE;
}
项目:Adventurers-Toolbox    文件:ToolHeadModel.java   
@Override
public ItemOverrideList getOverrides() {
    return ItemOverrideList.NONE;
}
项目:Adventurers-Toolbox    文件:SwordModel.java   
@Override
public ItemOverrideList getOverrides() {
    return BakedSwordOverrideHandler.INSTANCE;
}
项目:Adventurers-Toolbox    文件:HandpickModel.java   
@Override
public ItemOverrideList getOverrides() {
    return BakedHandpickOverrideHandler.INSTANCE;
}
项目:EndermanEvolution    文件:ItemSkullRenderer.java   
@Override
public ItemOverrideList getOverrides() {
    return ItemOverrideList.NONE;
}
项目:Clef    文件:BakedModelInstrument.java   
@Override
public ItemOverrideList getOverrides() { return BakedModelInstrument.ItemOverrideListHandler.INSTANCE; }
项目:SimpleTubes    文件:AbstractBaked.java   
@Override
public ItemOverrideList getOverrides() {
    return ItemOverrideList.NONE;
}
项目:CustomWorldGen    文件:AnimationItemOverrideList.java   
public AnimationItemOverrideList(IModel model, IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter, ItemOverrideList overrides)
{
    this(model, state, format, bakedTextureGetter, overrides.getOverrides());
}