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


Java ItemOverride类代码示例

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


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

示例1: AnimationItemOverrideList

import net.minecraft.client.renderer.block.model.ItemOverride; //导入依赖的package包/类
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;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:9,代码来源:AnimationItemOverrideList.java

示例2: getOverrides

import net.minecraft.client.renderer.block.model.ItemOverride; //导入依赖的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

示例3: getItemOverrides

import net.minecraft.client.renderer.block.model.ItemOverride; //导入依赖的package包/类
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;
}
 
开发者ID:WorldSEnder,项目名称:MCAnm,代码行数:14,代码来源:ModelDescription.java

示例4: deserialize

import net.minecraft.client.renderer.block.model.ItemOverride; //导入依赖的package包/类
@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);
}
 
开发者ID:WorldSEnder,项目名称:MCAnm,代码行数:34,代码来源:ModelDescription.java

示例5: ModelDescription

import net.minecraft.client.renderer.block.model.ItemOverride; //导入依赖的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

示例6: getDependencies

import net.minecraft.client.renderer.block.model.ItemOverride; //导入依赖的package包/类
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;
}
 
开发者ID:WorldSEnder,项目名称:MCAnm,代码行数:9,代码来源:ModelLoader.java

示例7: StencilItemOverride

import net.minecraft.client.renderer.block.model.ItemOverride; //导入依赖的package包/类
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);
}
 
开发者ID:OpenMods,项目名称:OpenBlocks,代码行数:10,代码来源:StencilItemOverride.java

示例8: TexturedItemOverrides

import net.minecraft.client.renderer.block.model.ItemOverride; //导入依赖的package包/类
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;
}
 
开发者ID:OpenMods,项目名称:OpenModsLib,代码行数:10,代码来源:TexturedItemOverrides.java

示例9: SpellPageOverrideList

import net.minecraft.client.renderer.block.model.ItemOverride; //导入依赖的package包/类
public SpellPageOverrideList() {
	super(ImmutableList.<ItemOverride>of());
	this.cache = new HashMap<String, IBakedModel>();
}
 
开发者ID:the-realest-stu,项目名称:Infernum,代码行数:5,代码来源:ModelSpellPage.java

示例10: KnowledgeBookOverrideList

import net.minecraft.client.renderer.block.model.ItemOverride; //导入依赖的package包/类
public KnowledgeBookOverrideList() {
	super(ImmutableList.<ItemOverride>of());
	this.cache = new HashMap<String, IBakedModel>();
}
 
开发者ID:the-realest-stu,项目名称:Infernum,代码行数:5,代码来源:ModelKnowledgeBook.java

示例11: BakedMaceOverrideHandler

import net.minecraft.client.renderer.block.model.ItemOverride; //导入依赖的package包/类
private BakedMaceOverrideHandler() {
	super(ImmutableList.<ItemOverride>of());
}
 
开发者ID:the-realest-stu,项目名称:Adventurers-Toolbox,代码行数:4,代码来源:MaceModel.java

示例12: BakedDaggerOverrideHandler

import net.minecraft.client.renderer.block.model.ItemOverride; //导入依赖的package包/类
private BakedDaggerOverrideHandler() {
	super(ImmutableList.<ItemOverride>of());
}
 
开发者ID:the-realest-stu,项目名称:Adventurers-Toolbox,代码行数:4,代码来源:DaggerModel.java

示例13: BakedHoeOverrideHandler

import net.minecraft.client.renderer.block.model.ItemOverride; //导入依赖的package包/类
private BakedHoeOverrideHandler() {
	super(ImmutableList.<ItemOverride>of());
}
 
开发者ID:the-realest-stu,项目名称:Adventurers-Toolbox,代码行数:4,代码来源:HoeModel.java

示例14: BakedPickaxeOverrideHandler

import net.minecraft.client.renderer.block.model.ItemOverride; //导入依赖的package包/类
private BakedPickaxeOverrideHandler() {
	super(ImmutableList.<ItemOverride>of());
}
 
开发者ID:the-realest-stu,项目名称:Adventurers-Toolbox,代码行数:4,代码来源:PickaxeModel.java

示例15: BakedAxeOverrideHandler

import net.minecraft.client.renderer.block.model.ItemOverride; //导入依赖的package包/类
private BakedAxeOverrideHandler() {
	super(ImmutableList.<ItemOverride>of());
}
 
开发者ID:the-realest-stu,项目名称:Adventurers-Toolbox,代码行数:4,代码来源:AxeModel.java


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