private void preTransform(ItemStack stack) { IBakedModel ibakedmodel = this.itemModelMesher.getItemModel(stack); Item item = stack.getItem(); if (item != null) { boolean flag = ibakedmodel.isGui3d(); if (!flag) { GlStateManager.scale(2.0F, 2.0F, 2.0F); } GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); } }
protected void renderItemModelTransform(ItemStack stack, IBakedModel model, ItemCameraTransforms.TransformType cameraTransformType) { this.textureManager.bindTexture(TextureMap.locationBlocksTexture); this.textureManager.getTexture(TextureMap.locationBlocksTexture).setBlurMipmap(false, false); this.preTransform(stack); GlStateManager.enableRescaleNormal(); GlStateManager.alphaFunc(516, 0.1F); GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); GlStateManager.pushMatrix(); ItemCameraTransforms itemcameratransforms = model.getItemCameraTransforms(); itemcameratransforms.applyTransform(cameraTransformType); if (this.func_183005_a(itemcameratransforms.getTransform(cameraTransformType))) { GlStateManager.cullFace(1028); } this.renderItem(stack, model); GlStateManager.cullFace(1029); GlStateManager.popMatrix(); GlStateManager.disableRescaleNormal(); GlStateManager.disableBlend(); this.textureManager.bindTexture(TextureMap.locationBlocksTexture); this.textureManager.getTexture(TextureMap.locationBlocksTexture).restoreLastBlurMipmap(); }
public void renderItemIntoGUI(ItemStack stack, int x, int y) { IBakedModel ibakedmodel = this.itemModelMesher.getItemModel(stack); GlStateManager.pushMatrix(); this.textureManager.bindTexture(TextureMap.locationBlocksTexture); this.textureManager.getTexture(TextureMap.locationBlocksTexture).setBlurMipmap(false, false); GlStateManager.enableRescaleNormal(); GlStateManager.enableAlpha(); GlStateManager.alphaFunc(516, 0.1F); GlStateManager.enableBlend(); GlStateManager.blendFunc(770, 771); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.setupGuiTransform(x, y, ibakedmodel.isGui3d()); ibakedmodel.getItemCameraTransforms().applyTransform(ItemCameraTransforms.TransformType.GUI); this.renderItem(stack, ibakedmodel); GlStateManager.disableAlpha(); GlStateManager.disableRescaleNormal(); GlStateManager.disableLighting(); GlStateManager.popMatrix(); this.textureManager.bindTexture(TextureMap.locationBlocksTexture); this.textureManager.getTexture(TextureMap.locationBlocksTexture).restoreLastBlurMipmap(); }
public IBakedModel getModelFromBlockState(IBlockState state, IBlockAccess worldIn, BlockPos pos) { Block block = state.getBlock(); if (worldIn.getWorldType() != WorldType.DEBUG_WORLD) { try { state = block.getActualState(state, worldIn, pos); } catch (Exception var6) { ; } } IBakedModel ibakedmodel = this.blockModelShapes.getModelForState(state); if (pos != null && this.gameSettings.allowBlockAlternatives && ibakedmodel instanceof WeightedBakedModel) { ibakedmodel = ((WeightedBakedModel)ibakedmodel).getAlternativeModel(MathHelper.getPositionRandom(pos)); } return ibakedmodel; }
public void renderBlockBrightness(IBlockState state, float brightness) { int i = state.getBlock().getRenderType(); if (i != -1) { switch (i) { case 1: default: break; case 2: this.chestRenderer.renderChestBrightness(state.getBlock(), brightness); break; case 3: IBakedModel ibakedmodel = this.getBakedModel(state, (BlockPos)null); this.blockModelRenderer.renderModelBrightness(ibakedmodel, state, brightness, true); } } }
public boolean renderModel(IBlockAccess blockAccessIn, IBakedModel modelIn, IBlockState blockStateIn, BlockPos blockPosIn, WorldRenderer worldRendererIn, boolean checkSides) { boolean flag = Minecraft.isAmbientOcclusionEnabled() && blockStateIn.getBlock().getLightValue() == 0 && modelIn.isAmbientOcclusion(); try { Block block = blockStateIn.getBlock(); return flag ? this.renderModelAmbientOcclusion(blockAccessIn, modelIn, block, blockPosIn, worldRendererIn, checkSides) : this.renderModelStandard(blockAccessIn, modelIn, block, blockPosIn, worldRendererIn, checkSides); } catch (Throwable throwable) { CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Tesselating block model"); CrashReportCategory crashreportcategory = crashreport.makeCategory("Block model being tesselated"); CrashReportCategory.addBlockInfo(crashreportcategory, blockPosIn, blockStateIn); crashreportcategory.addCrashSection("Using AO", Boolean.valueOf(flag)); throw new ReportedException(crashreport); } }
public void renderModelBrightness(IBakedModel p_178266_1_, IBlockState p_178266_2_, float p_178266_3_, boolean p_178266_4_) { Block block = p_178266_2_.getBlock(); block.setBlockBoundsForItemRender(); GlStateManager.rotate(90.0F, 0.0F, 1.0F, 0.0F); int i = block.getRenderColor(block.getStateForEntityRender(p_178266_2_)); if (EntityRenderer.anaglyphEnable) { i = TextureUtil.anaglyphColor(i); } float f = (float)(i >> 16 & 255) / 255.0F; float f1 = (float)(i >> 8 & 255) / 255.0F; float f2 = (float)(i & 255) / 255.0F; if (!p_178266_4_) { GlStateManager.color(p_178266_3_, p_178266_3_, p_178266_3_, 1.0F); } this.renderModelBrightnessColor(p_178266_1_, p_178266_3_, f, f1, f2); }
public static void dbgModel(IBakedModel p_dbgModel_0_) { if (p_dbgModel_0_ != null) { Config.dbg("Model: " + p_dbgModel_0_ + ", ao: " + p_dbgModel_0_.isAmbientOcclusion() + ", gui3d: " + p_dbgModel_0_.isGui3d() + ", builtIn: " + p_dbgModel_0_.isBuiltInRenderer() + ", particle: " + p_dbgModel_0_.getParticleTexture()); EnumFacing[] aenumfacing = EnumFacing.VALUES; for (int i = 0; i < aenumfacing.length; ++i) { EnumFacing enumfacing = aenumfacing[i]; List list = p_dbgModel_0_.getFaceQuads(enumfacing); dbgQuads(enumfacing.getName(), list, " "); } List list1 = p_dbgModel_0_.getGeneralQuads(); dbgQuads("General", list1, " "); } }
public static IBakedModel duplicateModel(IBakedModel p_duplicateModel_0_) { List list = duplicateQuadList(p_duplicateModel_0_.getGeneralQuads()); EnumFacing[] aenumfacing = EnumFacing.VALUES; List list1 = new ArrayList(); for (int i = 0; i < aenumfacing.length; ++i) { EnumFacing enumfacing = aenumfacing[i]; List list2 = p_duplicateModel_0_.getFaceQuads(enumfacing); List list3 = duplicateQuadList(list2); list1.add(list3); } SimpleBakedModel simplebakedmodel = new SimpleBakedModel(list, list1, p_duplicateModel_0_.isAmbientOcclusion(), p_duplicateModel_0_.isGui3d(), p_duplicateModel_0_.getParticleTexture(), p_duplicateModel_0_.getItemCameraTransforms()); return simplebakedmodel; }
public static IBakedModel getCustomItemModel(ItemStack p_getCustomItemModel_0_, IBakedModel p_getCustomItemModel_1_, ModelResourceLocation p_getCustomItemModel_2_) { if (p_getCustomItemModel_1_.isGui3d()) { return p_getCustomItemModel_1_; } else if (itemProperties == null) { return p_getCustomItemModel_1_; } else { CustomItemProperties customitemproperties = getCustomItemProperties(p_getCustomItemModel_0_, 1); return customitemproperties == null ? p_getCustomItemModel_1_ : customitemproperties.getModel(p_getCustomItemModel_2_); } }
public static IBakedModel makeModelCube(TextureAtlasSprite p_makeModelCube_0_, int p_makeModelCube_1_) { List list = new ArrayList(); EnumFacing[] aenumfacing = EnumFacing.VALUES; List list1 = new ArrayList(aenumfacing.length); for (int i = 0; i < aenumfacing.length; ++i) { EnumFacing enumfacing = aenumfacing[i]; List list2 = new ArrayList(); list2.add(makeBakedQuad(enumfacing, p_makeModelCube_0_, p_makeModelCube_1_)); list1.add(list2); } IBakedModel ibakedmodel = new SimpleBakedModel(list, list1, true, true, p_makeModelCube_0_, ItemCameraTransforms.DEFAULT); return ibakedmodel; }
public IBakedModel getModel(ModelResourceLocation p_getModel_1_) { if (p_getModel_1_ != null && this.mapTextures != null) { String s = p_getModel_1_.getResourcePath(); if (this.mapModels != null) { IBakedModel ibakedmodel = (IBakedModel)this.mapModels.get(s); if (ibakedmodel != null) { return ibakedmodel; } } } return this.model; }
public IBakedModel getItemModel(ItemStack stack) { Item item = stack.getItem(); IBakedModel ibakedmodel = this.getItemModel(item, this.getMetadata(stack)); if (ibakedmodel == null) { ItemMeshDefinition itemmeshdefinition = (ItemMeshDefinition)this.shapers.get(item); if (itemmeshdefinition != null) { ibakedmodel = this.modelManager.getModel(itemmeshdefinition.getModelLocation(stack)); } } if (ibakedmodel == null) { ibakedmodel = this.modelManager.getMissingModel(); } return ibakedmodel; }
public boolean renderModel(IBlockAccess blockAccessIn, IBakedModel modelIn, IBlockState blockStateIn, BlockPos blockPosIn, WorldRenderer worldRendererIn, boolean checkSides) { boolean flag = Minecraft.isAmbientOcclusionEnabled() && blockStateIn.getBlock().getLightValue() == 0 && modelIn.isAmbientOcclusion(); try { Block block = blockStateIn.getBlock(); if (Config.isTreesSmart() && blockStateIn.getBlock() instanceof BlockLeavesBase) { modelIn = SmartLeaves.getLeavesModel(modelIn); } return flag ? this.renderModelAmbientOcclusion(blockAccessIn, modelIn, block, blockStateIn, blockPosIn, worldRendererIn, checkSides) : this.renderModelStandard(blockAccessIn, modelIn, block, blockStateIn, blockPosIn, worldRendererIn, checkSides); } catch (Throwable throwable) { CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Tesselating block model"); CrashReportCategory crashreportcategory = crashreport.makeCategory("Block model being tesselated"); CrashReportCategory.addBlockInfo(crashreportcategory, blockPosIn, blockStateIn); crashreportcategory.addCrashSection("Using AO", Boolean.valueOf(flag)); throw new ReportedException(crashreport); } }
public boolean renderModel(IBlockAccess blockAccessIn, IBakedModel modelIn, IBlockState blockStateIn, BlockPos blockPosIn, WorldRenderer worldRendererIn, boolean checkSides) { boolean flag = Minecraft.isAmbientOcclusionEnabled() && blockStateIn.getBlock().getLightValue() == 0 && modelIn.isAmbientOcclusion(); try { Block block = blockStateIn.getBlock(); return flag ? this.renderModelAmbientOcclusion(blockAccessIn, modelIn, block, blockStateIn, blockPosIn, worldRendererIn, checkSides) : this.renderModelStandard(blockAccessIn, modelIn, block, blockStateIn, blockPosIn, worldRendererIn, checkSides); } catch (Throwable throwable) { CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Tesselating block model"); CrashReportCategory crashreportcategory = crashreport.makeCategory("Block model being tesselated"); CrashReportCategory.addBlockInfo(crashreportcategory, blockPosIn, blockStateIn); crashreportcategory.addCrashSection("Using AO", Boolean.valueOf(flag)); throw new ReportedException(crashreport); } }
/** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doe */ public void doRender(EntityFallingBlock entity, double x, double y, double z, float entityYaw, float partialTicks) { if (entity.getBlock() != null) { this.bindTexture(TextureMap.locationBlocksTexture); IBlockState iblockstate = entity.getBlock(); Block block = iblockstate.getBlock(); BlockPos blockpos = new BlockPos(entity); World world = entity.getWorldObj(); if (iblockstate != world.getBlockState(blockpos) && block.getRenderType() != -1) { if (block.getRenderType() == 3) { GlStateManager.pushMatrix(); GlStateManager.translate((float)x, (float)y, (float)z); GlStateManager.disableLighting(); Tessellator tessellator = Tessellator.getInstance(); WorldRenderer worldrenderer = tessellator.getWorldRenderer(); worldrenderer.begin(7, DefaultVertexFormats.BLOCK); int i = blockpos.getX(); int j = blockpos.getY(); int k = blockpos.getZ(); worldrenderer.setTranslation((double)((float)(-i) - 0.5F), (double)(-j), (double)((float)(-k) - 0.5F)); BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher(); IBakedModel ibakedmodel = blockrendererdispatcher.getModelFromBlockState(iblockstate, world, (BlockPos)null); blockrendererdispatcher.getBlockModelRenderer().renderModel(world, ibakedmodel, iblockstate, blockpos, worldrenderer, false); worldrenderer.setTranslation(0.0D, 0.0D, 0.0D); tessellator.draw(); GlStateManager.enableLighting(); GlStateManager.popMatrix(); super.doRender(entity, x, y, z, entityYaw, partialTicks); } } } }
private int func_177077_a(EntityItem itemIn, double p_177077_2_, double p_177077_4_, double p_177077_6_, float p_177077_8_, IBakedModel p_177077_9_) { ItemStack itemstack = itemIn.getEntityItem(); Item item = itemstack.getItem(); if (item == null) { return 0; } else { boolean flag = p_177077_9_.isGui3d(); int i = this.func_177078_a(itemstack); float f = 0.25F; float f1 = MathHelper.sin(((float)itemIn.getAge() + p_177077_8_) / 10.0F + itemIn.hoverStart) * 0.1F + 0.1F; float f2 = p_177077_9_.getItemCameraTransforms().getTransform(ItemCameraTransforms.TransformType.GROUND).scale.y; GlStateManager.translate((float)p_177077_2_, (float)p_177077_4_ + f1 + 0.25F * f2, (float)p_177077_6_); if (flag || this.renderManager.options != null) { float f3 = (((float)itemIn.getAge() + p_177077_8_) / 20.0F + itemIn.hoverStart) * (180F / (float)Math.PI); GlStateManager.rotate(f3, 0.0F, 1.0F, 0.0F); } if (!flag) { float f6 = -0.0F * (float)(i - 1) * 0.5F; float f4 = -0.0F * (float)(i - 1) * 0.5F; float f5 = -0.046875F * (float)(i - 1) * 0.5F; GlStateManager.translate(f6, f4, f5); } GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); return i; } }
private void renderModel(IBakedModel model, int color, ItemStack stack) { Tessellator tessellator = Tessellator.getInstance(); WorldRenderer worldrenderer = tessellator.getWorldRenderer(); worldrenderer.begin(7, DefaultVertexFormats.ITEM); for (EnumFacing enumfacing : EnumFacing.values()) { this.renderQuads(worldrenderer, model.getFaceQuads(enumfacing), color, stack); } this.renderQuads(worldrenderer, model.getGeneralQuads(), color, stack); tessellator.draw(); }
public void renderItem(ItemStack stack, IBakedModel model) { if (stack != null) { GlStateManager.pushMatrix(); GlStateManager.scale(0.5F, 0.5F, 0.5F); if (model.isBuiltInRenderer()) { GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F); GlStateManager.translate(-0.5F, -0.5F, -0.5F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.enableRescaleNormal(); TileEntityItemStackRenderer.instance.renderByItem(stack); } else { GlStateManager.translate(-0.5F, -0.5F, -0.5F); this.renderModel(model, stack); if (stack.hasEffect()) { this.renderEffect(model); } } GlStateManager.popMatrix(); } }
private void renderEffect(IBakedModel model) { GlStateManager.depthMask(false); GlStateManager.depthFunc(514); GlStateManager.disableLighting(); GlStateManager.blendFunc(768, 1); this.textureManager.bindTexture(RES_ITEM_GLINT); GlStateManager.matrixMode(5890); GlStateManager.pushMatrix(); GlStateManager.scale(8.0F, 8.0F, 8.0F); float f = (float)(Minecraft.getSystemTime() % 3000L) / 3000.0F / 8.0F; GlStateManager.translate(f, 0.0F, 0.0F); GlStateManager.rotate(-50.0F, 0.0F, 0.0F, 1.0F); this.renderModel(model, -8372020); GlStateManager.popMatrix(); GlStateManager.pushMatrix(); GlStateManager.scale(8.0F, 8.0F, 8.0F); float f1 = (float)(Minecraft.getSystemTime() % 4873L) / 4873.0F / 8.0F; GlStateManager.translate(-f1, 0.0F, 0.0F); GlStateManager.rotate(10.0F, 0.0F, 0.0F, 1.0F); this.renderModel(model, -8372020); GlStateManager.popMatrix(); GlStateManager.matrixMode(5888); GlStateManager.blendFunc(770, 771); GlStateManager.enableLighting(); GlStateManager.depthFunc(515); GlStateManager.depthMask(true); this.textureManager.bindTexture(TextureMap.locationBlocksTexture); }
public void func_181564_a(ItemStack p_181564_1_, ItemCameraTransforms.TransformType p_181564_2_) { if (p_181564_1_ != null) { IBakedModel ibakedmodel = this.itemModelMesher.getItemModel(p_181564_1_); this.renderItemModelTransform(p_181564_1_, ibakedmodel, p_181564_2_); } }
public IBakedModel getModelForState(IBlockState state) { IBakedModel ibakedmodel = (IBakedModel)this.bakedModelStore.get(state); if (ibakedmodel == null) { ibakedmodel = this.modelManager.getMissingModel(); } return ibakedmodel; }
public void renderBlockDamage(IBlockState state, BlockPos pos, TextureAtlasSprite texture, IBlockAccess blockAccess) { Block block = state.getBlock(); int i = block.getRenderType(); if (i == 3) { state = block.getActualState(state, blockAccess, pos); IBakedModel ibakedmodel = this.blockModelShapes.getModelForState(state); IBakedModel ibakedmodel1 = (new SimpleBakedModel.Builder(ibakedmodel, texture)).makeBakedModel(); this.blockModelRenderer.renderModel(blockAccess, ibakedmodel1, state, pos, Tessellator.getInstance().getWorldRenderer()); } }
public boolean renderBlock(IBlockState state, BlockPos pos, IBlockAccess blockAccess, WorldRenderer worldRendererIn) { try { int i = state.getBlock().getRenderType(); if (i == -1) { return false; } else { switch (i) { case 1: return this.fluidRenderer.renderFluid(blockAccess, state, pos, worldRendererIn); case 2: return false; case 3: IBakedModel ibakedmodel = this.getModelFromBlockState(state, blockAccess, pos); return this.blockModelRenderer.renderModel(blockAccess, ibakedmodel, state, pos, worldRendererIn); default: return false; } } } catch (Throwable throwable) { CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Tesselating block in world"); CrashReportCategory crashreportcategory = crashreport.makeCategory("Block being tesselated"); CrashReportCategory.addBlockInfo(crashreportcategory, pos, state.getBlock(), state.getBlock().getMetaFromState(state)); throw new ReportedException(crashreport); } }
private IBakedModel getBakedModel(IBlockState state, BlockPos pos) { IBakedModel ibakedmodel = this.blockModelShapes.getModelForState(state); if (pos != null && this.gameSettings.allowBlockAlternatives && ibakedmodel instanceof WeightedBakedModel) { ibakedmodel = ((WeightedBakedModel)ibakedmodel).getAlternativeModel(MathHelper.getPositionRandom(pos)); } return ibakedmodel; }
/** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doe */ public void doRender(EntityItemFrame entity, double x, double y, double z, float entityYaw, float partialTicks) { GlStateManager.pushMatrix(); BlockPos blockpos = entity.getHangingPosition(); double d0 = (double)blockpos.getX() - entity.posX + x; double d1 = (double)blockpos.getY() - entity.posY + y; double d2 = (double)blockpos.getZ() - entity.posZ + z; GlStateManager.translate(d0 + 0.5D, d1 + 0.5D, d2 + 0.5D); GlStateManager.rotate(180.0F - entity.rotationYaw, 0.0F, 1.0F, 0.0F); this.renderManager.renderEngine.bindTexture(TextureMap.locationBlocksTexture); BlockRendererDispatcher blockrendererdispatcher = this.mc.getBlockRendererDispatcher(); ModelManager modelmanager = blockrendererdispatcher.getBlockModelShapes().getModelManager(); IBakedModel ibakedmodel; if (entity.getDisplayedItem() != null && entity.getDisplayedItem().getItem() == Items.filled_map) { ibakedmodel = modelmanager.getModel(this.mapModel); } else { ibakedmodel = modelmanager.getModel(this.itemFrameModel); } GlStateManager.pushMatrix(); GlStateManager.translate(-0.5F, -0.5F, -0.5F); blockrendererdispatcher.getBlockModelRenderer().renderModelBrightnessColor(ibakedmodel, 1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.popMatrix(); GlStateManager.translate(0.0F, 0.0F, 0.4375F); this.renderItem(entity); GlStateManager.popMatrix(); this.renderName(entity, x + (double)((float)entity.facingDirection.getFrontOffsetX() * 0.3F), y - 0.25D, z + (double)((float)entity.facingDirection.getFrontOffsetZ() * 0.3F)); }
public boolean renderModelAmbientOcclusion(IBlockAccess blockAccessIn, IBakedModel modelIn, Block blockIn, BlockPos blockPosIn, WorldRenderer worldRendererIn, boolean checkSides) { boolean flag = false; float[] afloat = new float[EnumFacing.values().length * 2]; BitSet bitset = new BitSet(3); BlockModelRenderer.AmbientOcclusionFace blockmodelrenderer$ambientocclusionface = new BlockModelRenderer.AmbientOcclusionFace(); for (EnumFacing enumfacing : EnumFacing.values()) { List<BakedQuad> list = modelIn.getFaceQuads(enumfacing); if (!list.isEmpty()) { BlockPos blockpos = blockPosIn.offset(enumfacing); if (!checkSides || blockIn.shouldSideBeRendered(blockAccessIn, blockpos, enumfacing)) { this.renderModelAmbientOcclusionQuads(blockAccessIn, blockIn, blockPosIn, worldRendererIn, list, afloat, bitset, blockmodelrenderer$ambientocclusionface); flag = true; } } } List<BakedQuad> list1 = modelIn.getGeneralQuads(); if (list1.size() > 0) { this.renderModelAmbientOcclusionQuads(blockAccessIn, blockIn, blockPosIn, worldRendererIn, list1, afloat, bitset, blockmodelrenderer$ambientocclusionface); flag = true; } return flag; }
public boolean renderModelStandard(IBlockAccess blockAccessIn, IBakedModel modelIn, Block blockIn, BlockPos blockPosIn, WorldRenderer worldRendererIn, boolean checkSides) { boolean flag = false; BitSet bitset = new BitSet(3); for (EnumFacing enumfacing : EnumFacing.values()) { List<BakedQuad> list = modelIn.getFaceQuads(enumfacing); if (!list.isEmpty()) { BlockPos blockpos = blockPosIn.offset(enumfacing); if (!checkSides || blockIn.shouldSideBeRendered(blockAccessIn, blockpos, enumfacing)) { int i = blockIn.getMixedBrightnessForBlock(blockAccessIn, blockpos); this.renderModelStandardQuads(blockAccessIn, blockIn, blockPosIn, enumfacing, i, false, worldRendererIn, list, bitset); flag = true; } } } List<BakedQuad> list1 = modelIn.getGeneralQuads(); if (list1.size() > 0) { this.renderModelStandardQuads(blockAccessIn, blockIn, blockPosIn, (EnumFacing)null, -1, true, worldRendererIn, list1, bitset); flag = true; } return flag; }
public void renderModelBrightnessColor(IBakedModel bakedModel, float p_178262_2_, float p_178262_3_, float p_178262_4_, float p_178262_5_) { for (EnumFacing enumfacing : EnumFacing.values()) { this.renderModelBrightnessColorQuads(p_178262_2_, p_178262_3_, p_178262_4_, p_178262_5_, bakedModel.getFaceQuads(enumfacing)); } this.renderModelBrightnessColorQuads(p_178262_2_, p_178262_3_, p_178262_4_, p_178262_5_, bakedModel.getGeneralQuads()); }
public void updateModel(TextureMap p_updateModel_1_, ItemModelGenerator p_updateModel_2_) { String[] astring = this.getModelTextures(); boolean flag = this.isUseTint(); this.model = makeBakedModel(p_updateModel_1_, p_updateModel_2_, astring, flag); if (this.type == 1 && this.mapTextures != null) { for (String s : this.mapTextures.keySet()) { String s1 = (String)this.mapTextures.get(s); String s2 = StrUtils.removePrefix(s, "texture."); if (s2.startsWith("bow") || s2.startsWith("fishing_rod")) { String[] astring1 = new String[] {s1}; IBakedModel ibakedmodel = makeBakedModel(p_updateModel_1_, p_updateModel_2_, astring1, flag); if (this.mapModels == null) { this.mapModels = new HashMap(); } this.mapModels.put(s2, ibakedmodel); } } } }
private static IBakedModel makeBakedModel(TextureMap p_makeBakedModel_0_, ItemModelGenerator p_makeBakedModel_1_, String[] p_makeBakedModel_2_, boolean p_makeBakedModel_3_) { ModelBlock modelblock = makeModelBlock(p_makeBakedModel_2_); ModelBlock modelblock1 = p_makeBakedModel_1_.makeItemModel(p_makeBakedModel_0_, modelblock); IBakedModel ibakedmodel = bakeModel(p_makeBakedModel_0_, modelblock1, p_makeBakedModel_3_); return ibakedmodel; }