本文整理汇总了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;
}
示例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;
}
}
示例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);
}
示例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;
}
}
示例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 );
}
};
}
示例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;
}
};
}
示例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();
}
};
}
示例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);
}
示例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);
}
示例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");
}
示例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;
}
}
};
}
示例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);
}
示例13: getOverrides
import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
@Override
public ItemOverrideList getOverrides() {
return originalModel.getOverrides();
}
示例14: getOverrides
import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
@Override
public ItemOverrideList getOverrides()
{
return ItemOverrideList.NONE;
}
示例15: getOverrides
import net.minecraft.client.renderer.block.model.ItemOverrideList; //导入依赖的package包/类
@Override
public ItemOverrideList getOverrides() {
return null;
}