本文整理匯總了Java中net.minecraft.crash.CrashReportCategory.addBlockInfo方法的典型用法代碼示例。如果您正苦於以下問題:Java CrashReportCategory.addBlockInfo方法的具體用法?Java CrashReportCategory.addBlockInfo怎麽用?Java CrashReportCategory.addBlockInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.crash.CrashReportCategory
的用法示例。
在下文中一共展示了CrashReportCategory.addBlockInfo方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: renderModel
import net.minecraft.crash.CrashReportCategory; //導入方法依賴的package包/類
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);
}
}
示例2: renderModel
import net.minecraft.crash.CrashReportCategory; //導入方法依賴的package包/類
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);
}
}
示例3: renderModel
import net.minecraft.crash.CrashReportCategory; //導入方法依賴的package包/類
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);
}
}
示例4: renderModel
import net.minecraft.crash.CrashReportCategory; //導入方法依賴的package包/類
public boolean renderModel(IBlockAccess worldIn, IBakedModel modelIn, IBlockState stateIn, BlockPos posIn, VertexBuffer buffer, boolean checkSides, long rand)
{
boolean flag = Minecraft.isAmbientOcclusionEnabled() && stateIn.getLightValue() == 0 && modelIn.isAmbientOcclusion();
try
{
return flag ? this.renderModelSmooth(worldIn, modelIn, stateIn, posIn, buffer, checkSides, rand) : this.renderModelFlat(worldIn, modelIn, stateIn, posIn, buffer, checkSides, rand);
}
catch (Throwable throwable)
{
CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Tesselating block model");
CrashReportCategory crashreportcategory = crashreport.makeCategory("Block model being tesselated");
CrashReportCategory.addBlockInfo(crashreportcategory, posIn, stateIn);
crashreportcategory.addCrashSection("Using AO", Boolean.valueOf(flag));
throw new ReportedException(crashreport);
}
}
示例5: notifyBlockOfStateChange
import net.minecraft.crash.CrashReportCategory; //導入方法依賴的package包/類
public void notifyBlockOfStateChange(BlockPos pos, final Block blockIn)
{
if (!this.isRemote)
{
IBlockState iblockstate = this.getBlockState(pos);
try
{
iblockstate.getBlock().onNeighborBlockChange(this, pos, iblockstate, blockIn);
}
catch (Throwable throwable)
{
CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Exception while updating neighbours");
CrashReportCategory crashreportcategory = crashreport.makeCategory("Block being updated");
crashreportcategory.addCrashSectionCallable("Source block type", new Callable<String>()
{
public String call() throws Exception
{
try
{
return String.format("ID #%d (%s // %s)", new Object[] {Integer.valueOf(Block.getIdFromBlock(blockIn)), blockIn.getUnlocalizedName(), blockIn.getClass().getCanonicalName()});
}
catch (Throwable var2)
{
return "ID #" + Block.getIdFromBlock(blockIn);
}
}
});
CrashReportCategory.addBlockInfo(crashreportcategory, pos, iblockstate);
throw new ReportedException(crashreport);
}
}
}
示例6: func_190529_b
import net.minecraft.crash.CrashReportCategory; //導入方法依賴的package包/類
public void func_190529_b(BlockPos p_190529_1_, final Block p_190529_2_, BlockPos p_190529_3_)
{
if (!this.isRemote)
{
IBlockState iblockstate = this.getBlockState(p_190529_1_);
if (iblockstate.getBlock() == Blocks.field_190976_dk)
{
try
{
((BlockObserver)iblockstate.getBlock()).func_190962_b(iblockstate, this, p_190529_1_, p_190529_2_, p_190529_3_);
}
catch (Throwable throwable)
{
CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Exception while updating neighbours");
CrashReportCategory crashreportcategory = crashreport.makeCategory("Block being updated");
crashreportcategory.setDetail("Source block type", new ICrashReportDetail<String>()
{
public String call() throws Exception
{
try
{
return String.format("ID #%d (%s // %s)", new Object[] {Integer.valueOf(Block.getIdFromBlock(p_190529_2_)), p_190529_2_.getUnlocalizedName(), p_190529_2_.getClass().getCanonicalName()});
}
catch (Throwable var2)
{
return "ID #" + Block.getIdFromBlock(p_190529_2_);
}
}
});
CrashReportCategory.addBlockInfo(crashreportcategory, p_190529_1_, iblockstate);
throw new ReportedException(crashreport);
}
}
}
}
示例7: doBlockCollisions
import net.minecraft.crash.CrashReportCategory; //導入方法依賴的package包/類
protected void doBlockCollisions()
{
BlockPos blockpos = new BlockPos(this.getEntityBoundingBox().minX + 0.001D, this.getEntityBoundingBox().minY + 0.001D, this.getEntityBoundingBox().minZ + 0.001D);
BlockPos blockpos1 = new BlockPos(this.getEntityBoundingBox().maxX - 0.001D, this.getEntityBoundingBox().maxY - 0.001D, this.getEntityBoundingBox().maxZ - 0.001D);
if (this.worldObj.isAreaLoaded(blockpos, blockpos1))
{
for (int i = blockpos.getX(); i <= blockpos1.getX(); ++i)
{
for (int j = blockpos.getY(); j <= blockpos1.getY(); ++j)
{
for (int k = blockpos.getZ(); k <= blockpos1.getZ(); ++k)
{
BlockPos blockpos2 = new BlockPos(i, j, k);
IBlockState iblockstate = this.worldObj.getBlockState(blockpos2);
try
{
iblockstate.getBlock().onEntityCollidedWithBlock(this.worldObj, blockpos2, iblockstate, this);
}
catch (Throwable throwable)
{
CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Colliding entity with block");
CrashReportCategory crashreportcategory = crashreport.makeCategory("Block being collided with");
CrashReportCategory.addBlockInfo(crashreportcategory, blockpos2, iblockstate);
throw new ReportedException(crashreport);
}
}
}
}
}
}
示例8: doBlockCollisions
import net.minecraft.crash.CrashReportCategory; //導入方法依賴的package包/類
protected void doBlockCollisions()
{
AxisAlignedBB axisalignedbb = this.getEntityBoundingBox();
BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos = BlockPos.PooledMutableBlockPos.retain(axisalignedbb.minX + 0.001D, axisalignedbb.minY + 0.001D, axisalignedbb.minZ + 0.001D);
BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos1 = BlockPos.PooledMutableBlockPos.retain(axisalignedbb.maxX - 0.001D, axisalignedbb.maxY - 0.001D, axisalignedbb.maxZ - 0.001D);
BlockPos.PooledMutableBlockPos blockpos$pooledmutableblockpos2 = BlockPos.PooledMutableBlockPos.retain();
if (this.worldObj.isAreaLoaded(blockpos$pooledmutableblockpos, blockpos$pooledmutableblockpos1))
{
for (int i = blockpos$pooledmutableblockpos.getX(); i <= blockpos$pooledmutableblockpos1.getX(); ++i)
{
for (int j = blockpos$pooledmutableblockpos.getY(); j <= blockpos$pooledmutableblockpos1.getY(); ++j)
{
for (int k = blockpos$pooledmutableblockpos.getZ(); k <= blockpos$pooledmutableblockpos1.getZ(); ++k)
{
blockpos$pooledmutableblockpos2.setPos(i, j, k);
IBlockState iblockstate = this.worldObj.getBlockState(blockpos$pooledmutableblockpos2);
try
{
iblockstate.getBlock().onEntityCollidedWithBlock(this.worldObj, blockpos$pooledmutableblockpos2, iblockstate, this);
}
catch (Throwable throwable)
{
CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Colliding entity with block");
CrashReportCategory crashreportcategory = crashreport.makeCategory("Block being collided with");
CrashReportCategory.addBlockInfo(crashreportcategory, blockpos$pooledmutableblockpos2, iblockstate);
throw new ReportedException(crashreport);
}
}
}
}
}
blockpos$pooledmutableblockpos.release();
blockpos$pooledmutableblockpos1.release();
blockpos$pooledmutableblockpos2.release();
}
示例9: renderBlock
import net.minecraft.crash.CrashReportCategory; //導入方法依賴的package包/類
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);
}
}
示例10: func_190524_a
import net.minecraft.crash.CrashReportCategory; //導入方法依賴的package包/類
public void func_190524_a(BlockPos p_190524_1_, final Block p_190524_2_, BlockPos p_190524_3_)
{
if (!this.isRemote)
{
IBlockState iblockstate = this.getBlockState(p_190524_1_);
try
{
iblockstate.neighborChanged(this, p_190524_1_, p_190524_2_, p_190524_3_);
}
catch (Throwable throwable)
{
CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Exception while updating neighbours");
CrashReportCategory crashreportcategory = crashreport.makeCategory("Block being updated");
crashreportcategory.setDetail("Source block type", new ICrashReportDetail<String>()
{
public String call() throws Exception
{
try
{
return String.format("ID #%d (%s // %s)", new Object[] {Integer.valueOf(Block.getIdFromBlock(p_190524_2_)), p_190524_2_.getUnlocalizedName(), p_190524_2_.getClass().getCanonicalName()});
}
catch (Throwable var2)
{
return "ID #" + Block.getIdFromBlock(p_190524_2_);
}
}
});
CrashReportCategory.addBlockInfo(crashreportcategory, p_190524_1_, iblockstate);
throw new ReportedException(crashreport);
}
}
}
示例11: tickUpdates
import net.minecraft.crash.CrashReportCategory; //導入方法依賴的package包/類
/**
* Runs through the list of updates to run and ticks them
*/
public boolean tickUpdates(boolean p_72955_1_)
{
if (this.worldInfo.getTerrainType() == WorldType.DEBUG_WORLD)
{
return false;
}
else
{
int i = this.pendingTickListEntriesTreeSet.size();
if (i != this.pendingTickListEntriesHashSet.size())
{
throw new IllegalStateException("TickNextTick list out of synch");
}
else
{
if (i > 1000)
{
i = 1000;
}
this.theProfiler.startSection("cleaning");
for (int j = 0; j < i; ++j)
{
NextTickListEntry nextticklistentry = (NextTickListEntry)this.pendingTickListEntriesTreeSet.first();
if (!p_72955_1_ && nextticklistentry.scheduledTime > this.worldInfo.getWorldTotalTime())
{
break;
}
this.pendingTickListEntriesTreeSet.remove(nextticklistentry);
this.pendingTickListEntriesHashSet.remove(nextticklistentry);
this.pendingTickListEntriesThisTick.add(nextticklistentry);
}
this.theProfiler.endSection();
this.theProfiler.startSection("ticking");
Iterator<NextTickListEntry> iterator = this.pendingTickListEntriesThisTick.iterator();
while (iterator.hasNext())
{
NextTickListEntry nextticklistentry1 = (NextTickListEntry)iterator.next();
iterator.remove();
int k = 0;
if (this.isAreaLoaded(nextticklistentry1.position.add(-k, -k, -k), nextticklistentry1.position.add(k, k, k)))
{
IBlockState iblockstate = this.getBlockState(nextticklistentry1.position);
if (iblockstate.getBlock().getMaterial() != Material.air && Block.isEqualTo(iblockstate.getBlock(), nextticklistentry1.getBlock()))
{
try
{
iblockstate.getBlock().updateTick(this, nextticklistentry1.position, iblockstate, this.rand);
}
catch (Throwable throwable)
{
CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Exception while ticking a block");
CrashReportCategory crashreportcategory = crashreport.makeCategory("Block being ticked");
CrashReportCategory.addBlockInfo(crashreportcategory, nextticklistentry1.position, iblockstate);
throw new ReportedException(crashreport);
}
}
}
else
{
this.scheduleUpdate(nextticklistentry1.position, nextticklistentry1.getBlock(), 0);
}
}
this.theProfiler.endSection();
this.pendingTickListEntriesThisTick.clear();
return !this.pendingTickListEntriesTreeSet.isEmpty();
}
}
}
示例12: renderModel
import net.minecraft.crash.CrashReportCategory; //導入方法依賴的package包/類
public boolean renderModel(IBlockAccess worldIn, IBakedModel modelIn, IBlockState stateIn, BlockPos posIn, VertexBuffer buffer, boolean checkSides, long rand)
{
boolean flag = Minecraft.isAmbientOcclusionEnabled() && stateIn.getLightValue() == 0 && modelIn.isAmbientOcclusion();
try
{
if (Config.isShaders())
{
SVertexBuilder.pushEntity(stateIn, posIn, worldIn, buffer);
}
if (!Config.isAlternateBlocks())
{
rand = 0L;
}
RenderEnv renderenv = buffer.getRenderEnv(worldIn, stateIn, posIn);
modelIn = BlockModelCustomizer.getRenderModel(modelIn, stateIn, renderenv);
boolean flag1 = flag ? this.renderModelSmooth(worldIn, modelIn, stateIn, posIn, buffer, checkSides, rand) : this.renderModelFlat(worldIn, modelIn, stateIn, posIn, buffer, checkSides, rand);
if (flag1)
{
this.renderOverlayModels(worldIn, modelIn, stateIn, posIn, buffer, checkSides, rand, renderenv, flag);
}
if (Config.isShaders())
{
SVertexBuilder.popEntity(buffer);
}
return flag1;
}
catch (Throwable throwable)
{
CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Tesselating block model");
CrashReportCategory crashreportcategory = crashreport.makeCategory("Block model being tesselated");
CrashReportCategory.addBlockInfo(crashreportcategory, posIn, stateIn);
crashreportcategory.addCrashSection("Using AO", Boolean.valueOf(flag));
throw new ReportedException(crashreport);
}
}
示例13: renderBlock
import net.minecraft.crash.CrashReportCategory; //導入方法依賴的package包/類
public boolean renderBlock(IBlockState state, BlockPos pos, IBlockAccess blockAccess, VertexBuffer worldRendererIn)
{
try
{
EnumBlockRenderType enumblockrendertype = state.getRenderType();
if (enumblockrendertype == EnumBlockRenderType.INVISIBLE)
{
return false;
}
else
{
if (blockAccess.getWorldType() != WorldType.DEBUG_WORLD)
{
try
{
state = state.getActualState(blockAccess, pos);
}
catch (Exception var8)
{
;
}
}
switch (enumblockrendertype)
{
case MODEL:
IBakedModel model = this.getModelForState(state);
state = state.getBlock().getExtendedState(state, blockAccess, pos);
return this.blockModelRenderer.renderModel(blockAccess, model, state, pos, worldRendererIn, true);
case ENTITYBLOCK_ANIMATED:
return false;
case LIQUID:
return this.fluidRenderer.renderFluid(blockAccess, 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);
}
}
示例14: renderBlock
import net.minecraft.crash.CrashReportCategory; //導入方法依賴的package包/類
public boolean renderBlock(IBlockState state, BlockPos pos, IBlockAccess blockAccess, VertexBuffer worldRendererIn)
{
try
{
EnumBlockRenderType enumblockrendertype = state.getRenderType();
if (enumblockrendertype == EnumBlockRenderType.INVISIBLE)
{
return false;
}
else
{
if (blockAccess.getWorldType() != WorldType.DEBUG_WORLD)
{
try
{
state = state.getActualState(blockAccess, pos);
}
catch (Exception var8)
{
;
}
}
switch (enumblockrendertype)
{
case MODEL:
return this.blockModelRenderer.renderModel(blockAccess, this.getModelForState(state), state, pos, worldRendererIn, true);
case ENTITYBLOCK_ANIMATED:
return false;
case LIQUID:
return this.fluidRenderer.renderFluid(blockAccess, 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);
}
}