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

项目:CustomWorldGen    文件:AnimationItemOverrideList.java   
public AnimationItemOverrideList(IModel model, IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter, List<ItemOverride> overrides)
{
    super(overrides);
    this.model = model;
    this.state = state;
    this.format = format;
    this.bakedTextureGetter = bakedTextureGetter;
}
项目: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 );
        }
    };
}
项目:MCAnm    文件:ModelDescription.java   
private List<ItemOverride> getItemOverrides(
        JsonObject object,
        JsonDeserializationContext deserializationContext) {
    List<ItemOverride> list = Lists.<ItemOverride>newArrayList();

    if (object.has("overrides")) {
        for (JsonElement jsonelement : JsonUtils.getJsonArray(object, "overrides")) {
            list.add((ItemOverride) deserializationContext.deserialize(jsonelement, ItemOverride.class));
        }
    }

    return list;
}
项目:MCAnm    文件:ModelDescription.java   
@Override
public ModelDescription deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
        throws JsonParseException {
    JsonObject jsonObject = json.getAsJsonObject();
    int version = jsonObject.get("version").getAsInt();
    // Currently version is ignored
    if (version != 0 && version != 1) {
        throw new JsonParseException("Unsupported model version");
    }
    boolean isLegacy = version == 0;
    ISkeleton skeleton = loadSkeleton(isLegacy, jsonObject);

    ResourceLocation modelLocation = new ResourceLocation(jsonObject.get("mesh").getAsString());
    ModelMCMD mesh = ClientLoader.loadModel(modelLocation, skeleton);

    ImmutableMap<String, ResourceLocation> textureLocatons = ImmutableMap.of();
    if (version != 0) {
        Builder<String, ResourceLocation> builder = ImmutableMap.builder();
        JsonObject textureMap = jsonObject.getAsJsonObject("textures");
        for (Entry<String, JsonElement> texEntry : textureMap.entrySet()) {
            String slotName = texEntry.getKey();
            if (!slotName.startsWith("#")) {
                throw new JsonParseException("Slot names must begin with '#'");
            }
            ResourceLocation textureLocation = new ResourceLocation(texEntry.getValue().getAsString());
            builder.put(slotName, textureLocation);
        }
        textureLocatons = builder.build();
    }
    ImmutableMap<TransformType, TRSRTransformation> viewMapping = parseViewMapping(jsonObject, context);
    List<ItemOverride> itemOverrides = getItemOverrides(jsonObject, context);
    return new ModelDescription(mesh, skeleton, textureLocatons, viewMapping, itemOverrides);
}
项目: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 static Set<ResourceLocation> getDependencies(BakedModelWrapper bakedModel) {
    Set<ResourceLocation> overrideLocations = new HashSet<>();
    for (ItemOverride override : bakedModel.getOverrides().getOverrides()) {
        ResourceLocation overrideLocation = override.getLocation();
        overrideLocations.add(overrideLocation);
    }
    return overrideLocations;
}
项目:OpenBlocks    文件:StencilItemOverride.java   
public StencilItemOverride(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
    super(Collections.<ItemOverride> emptyList());
    this.state = state;
    this.format = format;
    this.bakedTextureGetter = bakedTextureGetter;

    final ResourceLocation emptyStencilTexture = StencilTextureManager.INSTANCE.getEmptyStencilTextureLocation(BACKGROUND_TEXTURE);
    this.emptyBakedModel = createItemModel(emptyStencilTexture);
}
项目:OpenModsLib    文件:TexturedItemOverrides.java   
public TexturedItemOverrides(IBakedModel untexturedModel, IModel texturedModel, List<ItemOverride> texturedModelOverrides, Set<String> texturesToReplace, IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
    super(Lists.reverse(texturedModelOverrides));
    this.untexturedModel = untexturedModel;
    this.texturedModel = texturedModel;
    this.texturesToReplace = ImmutableSet.copyOf(texturesToReplace);
    this.state = state;
    this.format = format;
    this.bakedTextureGetter = bakedTextureGetter;
}
项目:Infernum    文件:ModelSpellPage.java   
public SpellPageOverrideList() {
    super(ImmutableList.<ItemOverride>of());
    this.cache = new HashMap<String, IBakedModel>();
}
项目:Infernum    文件:ModelKnowledgeBook.java   
public KnowledgeBookOverrideList() {
    super(ImmutableList.<ItemOverride>of());
    this.cache = new HashMap<String, IBakedModel>();
}
项目:Adventurers-Toolbox    文件:MaceModel.java   
private BakedMaceOverrideHandler() {
    super(ImmutableList.<ItemOverride>of());
}
项目:Adventurers-Toolbox    文件:DaggerModel.java   
private BakedDaggerOverrideHandler() {
    super(ImmutableList.<ItemOverride>of());
}
项目:Adventurers-Toolbox    文件:HoeModel.java   
private BakedHoeOverrideHandler() {
    super(ImmutableList.<ItemOverride>of());
}
项目:Adventurers-Toolbox    文件:PickaxeModel.java   
private BakedPickaxeOverrideHandler() {
    super(ImmutableList.<ItemOverride>of());
}
项目:Adventurers-Toolbox    文件:AxeModel.java   
private BakedAxeOverrideHandler() {
    super(ImmutableList.<ItemOverride>of());
}
项目:Adventurers-Toolbox    文件:HammerModel.java   
private BakedHammerOverrideHandler() {
    super(ImmutableList.<ItemOverride>of());
}
项目:Adventurers-Toolbox    文件:ShovelModel.java   
private BakedShovelOverrideHandler() {
    super(ImmutableList.<ItemOverride>of());
}
项目:Adventurers-Toolbox    文件:SwordModel.java   
private BakedSwordOverrideHandler() {
    super(ImmutableList.<ItemOverride>of());
}
项目:Adventurers-Toolbox    文件:HandpickModel.java   
private BakedHandpickOverrideHandler() {
    super(ImmutableList.<ItemOverride>of());
}
项目:CustomWorldGen    文件:ModelDynBucket.java   
private BakedDynBucketOverrideHandler()
{
    super(ImmutableList.<ItemOverride>of());
}
项目:CrystalMod    文件:ModelWrappedFood.java   
private BakedOverrideHandler()
{
    super(ImmutableList.<ItemOverride>of());
}
项目:CrystalMod    文件:ModelSeed.java   
private BakedSeedOverrideHandler()
{
    super(ImmutableList.<ItemOverride>of());
}
项目:CrystalMod    文件:CustomItemModelFactory.java   
public ModelOverride() {
    super(new ArrayList<ItemOverride>());
}
项目:CrystalMod    文件:DynamicItemAndBlockModel.java   
public ItemOverrides() {
    super(Collections.<ItemOverride>emptyList());
}
项目:Malgra    文件:ExtractorItemOverrides.java   
private ExtractorItemOverrides() {
    super(ImmutableList.<ItemOverride>of());
}
项目:DrawersBits    文件:BitDrawerModel.java   
public ItemHandler () {
    super(ImmutableList.<ItemOverride>of());
}
项目:MrCrayfishSkateboardingMod    文件:BakedModelCornerSlope.java   
@Override
public ItemOverrideList getOverrides() 
{
    return new ItemOverrideList(Collections.<ItemOverride>emptyList());
}
项目:MrCrayfishSkateboardingMod    文件:BakedModelSlope.java   
@Override
public ItemOverrideList getOverrides() 
{
    return new ItemOverrideList(Lists.<ItemOverride>newArrayList());
}
项目:MrCrayfishSkateboardingMod    文件:BakedModelStair.java   
@Override
public ItemOverrideList getOverrides() 
{
    return new ItemOverrideList(Lists.<ItemOverride>newArrayList());
}
项目:CreativeBlocks    文件:BlockPlacerOverrideList.java   
public BlockPlacerOverrideList(List<ItemOverride> overridesIn)
{
    super(ImmutableList.<ItemOverride>of());
}
项目:Hard-Science    文件:SuperModelItemOverrideList.java   
public SuperModelItemOverrideList(SuperDispatcher dispatcher) {
    super(Lists.<ItemOverride>newArrayList());
    this.dispatcher = dispatcher;
}
项目:MrCrayfishSkateboardingMod    文件:BakedModelCornerSlope.java   
@Override
public ItemOverrideList getOverrides() 
{
    return new ItemOverrideList(Collections.<ItemOverride>emptyList());
}
项目:MrCrayfishSkateboardingMod    文件:BakedModelSlope.java   
@Override
public ItemOverrideList getOverrides() 
{
    return new ItemOverrideList(Lists.<ItemOverride>newArrayList());
}
项目:MrCrayfishSkateboardingMod    文件:BakedModelStair.java   
@Override
public ItemOverrideList getOverrides() 
{
    return new ItemOverrideList(Lists.<ItemOverride>newArrayList());
}
项目:enderutilities    文件:ModelEnderBucket.java   
private BakedEnderBucketOverrideHandler()
{
    super(ImmutableList.<ItemOverride>of());
}
项目:enderutilities    文件:ModelEnderTools.java   
private BakedEnderToolOverrideHandler()
{
    super(ImmutableList.<ItemOverride>of());
}
项目:enderutilities    文件:ModelNullifierBaked.java   
private ModelNullifierBakedOverrideHandler()
{
    super(ImmutableList.<ItemOverride>of());
}
项目:OpenModsLib    文件:ItemStateOverrideList.java   
public ItemStateOverrideList(Map<State, IBakedModel> models) {
    super(ImmutableList.<ItemOverride> of());
    this.models = ImmutableMap.copyOf(models);
}
项目:EnderIO    文件:EnderItemOverrideList.java   
public EnderItemOverrideList() {
  super(Collections.<ItemOverride> emptyList());
}