本文整理汇总了Java中net.minecraft.client.renderer.block.model.BakedQuad类的典型用法代码示例。如果您正苦于以下问题:Java BakedQuad类的具体用法?Java BakedQuad怎么用?Java BakedQuad使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BakedQuad类属于net.minecraft.client.renderer.block.model包,在下文中一共展示了BakedQuad类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isBreakingAnimation
import net.minecraft.client.renderer.block.model.BakedQuad; //导入依赖的package包/类
public boolean isBreakingAnimation(BakedQuad p_isBreakingAnimation_1_)
{
if (this.breakingAnimation < 0)
{
if (p_isBreakingAnimation_1_ instanceof BakedQuadRetextured)
{
this.breakingAnimation = 1;
}
else
{
this.breakingAnimation = 0;
}
}
return this.breakingAnimation == 1;
}
示例2: renderQuads
import net.minecraft.client.renderer.block.model.BakedQuad; //导入依赖的package包/类
public static void renderQuads(VertexBuffer renderer, List<BakedQuad> quads, int color, ItemStack stack) {
boolean flag = (color == -1) && (!stack.isEmpty());
int i = 0;
for (int j = quads.size(); i < j; i++) {
BakedQuad bakedquad = quads.get(i);
int k = color;
if ((flag) && (bakedquad.hasTintIndex())) {
ItemColors itemColors = Minecraft.getMinecraft().getItemColors();
k = itemColors.getColorFromItemstack(stack, bakedquad.getTintIndex());
if (EntityRenderer.anaglyphEnable) {
k = TextureUtil.anaglyphColor(k);
}
k |= 0xFF000000;
}
LightUtil.renderQuadColor(renderer, bakedquad, k);
}
}
示例3: makeQuad
import net.minecraft.client.renderer.block.model.BakedQuad; //导入依赖的package包/类
private BakedQuad makeQuad(BakedQuad p_makeQuad_1_, int p_makeQuad_2_, boolean p_makeQuad_3_)
{
int[] aint = p_makeQuad_1_.getVertexData();
int i = p_makeQuad_1_.getTintIndex();
EnumFacing enumfacing = p_makeQuad_1_.getFace();
TextureAtlasSprite textureatlassprite = p_makeQuad_1_.getSprite();
if (!this.isFullSprite(p_makeQuad_1_))
{
p_makeQuad_2_ = 0;
}
aint = this.transformVertexData(aint, p_makeQuad_2_, p_makeQuad_3_);
BakedQuad bakedquad = new BakedQuad(aint, i, enumfacing, textureatlassprite);
return bakedquad;
}
示例4: makeModelCube
import net.minecraft.client.renderer.block.model.BakedQuad; //导入依赖的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;
}
示例5: getQuads
import net.minecraft.client.renderer.block.model.BakedQuad; //导入依赖的package包/类
@Override
protected List<BakedQuad> getQuads(IBlockState state) {
List<BakedQuad> quads = new ArrayList<>();
switch(MinecraftForgeClient.getRenderLayer()) {
case SOLID:
//Base
quads.addAll(QuadBuilder.withFormat(format)
.setFrom(0, 0, 0)
.setTo(16, 16, 16)
.addAll(base)
.bake()
);
break;
case CUTOUT_MIPPED:
//Overlay
quads.addAll(QuadBuilder.withFormat(format)
.setFrom(0, 0, 0)
.setTo(16, 16, 16)
.setHasBrightness(true)
.addAll(overlay)
.bake()
);
break;
}
return quads;
}
示例6: getQuads
import net.minecraft.client.renderer.block.model.BakedQuad; //导入依赖的package包/类
@Override
public List<BakedQuad> getQuads(IBlockState blockState, EnumFacing side, long rand)
{
if (side != null) return ImmutableList.of();
if (quads == null)
{
quads = buildQuads(this.state);
}
if (blockState instanceof IExtendedBlockState)
{
IExtendedBlockState exState = (IExtendedBlockState) blockState;
if (exState.getUnlistedNames().contains(Properties.AnimationProperty))
{
IModelState newState = exState.getValue(Properties.AnimationProperty);
if (newState != null)
{
newState = new ModelStateComposition(this.state, newState);
return buildQuads(newState);
}
}
}
return quads;
}
示例7: replaceTexture
import net.minecraft.client.renderer.block.model.BakedQuad; //导入依赖的package包/类
private static void replaceTexture(List<BakedQuad> p_replaceTexture_0_, TextureAtlasSprite p_replaceTexture_1_, TextureAtlasSprite p_replaceTexture_2_)
{
List<BakedQuad> list = new ArrayList();
for (BakedQuad bakedquad : p_replaceTexture_0_)
{
if (bakedquad.getSprite() != p_replaceTexture_1_)
{
list.add(bakedquad);
break;
}
BakedQuad bakedquad1 = new BakedQuadRetextured(bakedquad, p_replaceTexture_2_);
list.add(bakedquad1);
}
p_replaceTexture_0_.clear();
p_replaceTexture_0_.addAll(list);
}
示例8: renderModelBrightnessColorQuads
import net.minecraft.client.renderer.block.model.BakedQuad; //导入依赖的package包/类
private void renderModelBrightnessColorQuads(float p_178264_1_, float p_178264_2_, float p_178264_3_, float p_178264_4_, List<BakedQuad> p_178264_5_)
{
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
for (BakedQuad bakedquad : p_178264_5_)
{
worldrenderer.begin(7, DefaultVertexFormats.ITEM);
worldrenderer.addVertexData(bakedquad.getVertexData());
if (bakedquad.hasTintIndex())
{
worldrenderer.putColorRGB_F4(p_178264_2_ * p_178264_1_, p_178264_3_ * p_178264_1_, p_178264_4_ * p_178264_1_);
}
else
{
worldrenderer.putColorRGB_F4(p_178264_1_, p_178264_1_, p_178264_1_);
}
Vec3i vec3i = bakedquad.getFace().getDirectionVec();
worldrenderer.putNormal((float)vec3i.getX(), (float)vec3i.getY(), (float)vec3i.getZ());
tessellator.draw();
}
}
示例9: getQuads
import net.minecraft.client.renderer.block.model.BakedQuad; //导入依赖的package包/类
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand)
{
BakedFluid model = this;
if(state instanceof IExtendedBlockState)
{
IExtendedBlockState exState = (IExtendedBlockState)state;
int[] cornerRound = getCorners(Optional.of(exState));
int flowRound = getFlow(Optional.of(exState));
long key = flowRound + 1024;
for(int i = 3; i >= 0; i--)
{
key <<= 10;
key |= cornerRound[i];
}
key <<= 1;
key |= 1;
model = modelCache.getUnchecked(key);
}
if(side == null) return ImmutableList.of();
return model.faceQuads.get(side);
}
示例10: makeQuad
import net.minecraft.client.renderer.block.model.BakedQuad; //导入依赖的package包/类
private BakedQuad makeQuad(BakedQuad p_makeQuad_1_, int p_makeQuad_2_, boolean p_makeQuad_3_)
{
int[] aint = p_makeQuad_1_.getVertexData();
int i = p_makeQuad_1_.getTintIndex();
EnumFacing enumfacing = p_makeQuad_1_.getFace();
TextureAtlasSprite textureatlassprite = p_makeQuad_1_.getSprite();
if (!this.isFullSprite(p_makeQuad_1_))
{
return p_makeQuad_1_;
}
else
{
aint = this.transformVertexData(aint, p_makeQuad_2_, p_makeQuad_3_);
BakedQuad bakedquad = new BakedQuad(aint, i, enumfacing, textureatlassprite);
return bakedquad;
}
}
示例11: renderModelBrightnessColorQuads
import net.minecraft.client.renderer.block.model.BakedQuad; //导入依赖的package包/类
private void renderModelBrightnessColorQuads(float brightness, float red, float green, float blue, List<BakedQuad> listQuads)
{
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer vertexbuffer = tessellator.getBuffer();
int i = 0;
for (int j = listQuads.size(); i < j; ++i)
{
BakedQuad bakedquad = (BakedQuad)listQuads.get(i);
vertexbuffer.begin(7, DefaultVertexFormats.ITEM);
vertexbuffer.addVertexData(bakedquad.getVertexData());
if (bakedquad.hasTintIndex())
{
vertexbuffer.putColorRGB_F4(red * brightness, green * brightness, blue * brightness);
}
else
{
vertexbuffer.putColorRGB_F4(brightness, brightness, brightness);
}
Vec3i vec3i = bakedquad.getFace().getDirectionVec();
vertexbuffer.putNormal((float)vec3i.getX(), (float)vec3i.getY(), (float)vec3i.getZ());
tessellator.draw();
}
}
示例12: isBreakingAnimation
import net.minecraft.client.renderer.block.model.BakedQuad; //导入依赖的package包/类
public boolean isBreakingAnimation(BakedQuad p_isBreakingAnimation_1_)
{
if (this.breakingAnimation < 0)
{
if (p_isBreakingAnimation_1_ instanceof BreakingFour)
{
this.breakingAnimation = 1;
}
else
{
this.breakingAnimation = 0;
}
}
return this.breakingAnimation == 1;
}
示例13: renderQuad
import net.minecraft.client.renderer.block.model.BakedQuad; //导入依赖的package包/类
private void renderQuad(WorldRenderer renderer, BakedQuad quad, int color)
{
if (renderer.isMultiTexture())
{
renderer.addVertexData(quad.getVertexDataSingle());
renderer.putSprite(quad.getSprite());
}
else
{
renderer.addVertexData(quad.getVertexData());
}
if (Reflector.IColoredBakedQuad.exists() && Reflector.IColoredBakedQuad.isInstance(quad))
{
forgeHooksClient_putQuadColor(renderer, quad, color);
}
else
{
renderer.putColor4(color);
}
this.putQuadNormal(renderer, quad);
}
示例14: renderQuadColorSlow
import net.minecraft.client.renderer.block.model.BakedQuad; //导入依赖的package包/类
public static void renderQuadColorSlow(VertexBuffer wr, BakedQuad quad, int auxColor)
{
ItemConsumer cons;
if(wr == Tessellator.getInstance().getBuffer())
{
cons = getItemConsumer();
}
else
{
cons = new ItemConsumer(new VertexBufferConsumer(wr));
}
float b = (float)(auxColor & 0xFF) / 0xFF;
float g = (float)((auxColor >>> 8) & 0xFF) / 0xFF;
float r = (float)((auxColor >>> 16) & 0xFF) / 0xFF;
float a = (float)((auxColor >>> 24) & 0xFF) / 0xFF;
cons.setAuxColor(r, g, b, a);
quad.pipe(cons);
}
示例15: getConnectedTexture
import net.minecraft.client.renderer.block.model.BakedQuad; //导入依赖的package包/类
public static synchronized BakedQuad[] getConnectedTexture(IBlockAccess p_getConnectedTexture_0_, IBlockState p_getConnectedTexture_1_, BlockPos p_getConnectedTexture_2_, BakedQuad p_getConnectedTexture_3_, RenderEnv p_getConnectedTexture_4_)
{
TextureAtlasSprite textureatlassprite = p_getConnectedTexture_3_.getSprite();
if (textureatlassprite == null)
{
return p_getConnectedTexture_4_.getArrayQuadsCtm(p_getConnectedTexture_3_);
}
else
{
Block block = p_getConnectedTexture_1_.getBlock();
if (skipConnectedTexture(p_getConnectedTexture_0_, p_getConnectedTexture_1_, p_getConnectedTexture_2_, p_getConnectedTexture_3_, p_getConnectedTexture_4_))
{
p_getConnectedTexture_3_ = getQuad(emptySprite, p_getConnectedTexture_3_);
return p_getConnectedTexture_4_.getArrayQuadsCtm(p_getConnectedTexture_3_);
}
else
{
EnumFacing enumfacing = p_getConnectedTexture_3_.getFace();
BakedQuad[] abakedquad = getConnectedTextureMultiPass(p_getConnectedTexture_0_, p_getConnectedTexture_1_, p_getConnectedTexture_2_, enumfacing, p_getConnectedTexture_3_, p_getConnectedTexture_4_);
return abakedquad;
}
}
}