當前位置: 首頁>>代碼示例>>Java>>正文


Java CrashReportCategory類代碼示例

本文整理匯總了Java中net.minecraft.crash.CrashReportCategory的典型用法代碼示例。如果您正苦於以下問題:Java CrashReportCategory類的具體用法?Java CrashReportCategory怎麽用?Java CrashReportCategory使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CrashReportCategory類屬於net.minecraft.crash包,在下文中一共展示了CrashReportCategory類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: readNBT

import net.minecraft.crash.CrashReportCategory; //導入依賴的package包/類
static NBTBase readNBT(byte id, String key, DataInput input, int depth, NBTSizeTracker sizeTracker) throws IOException
{
    NBTBase nbtbase = NBTBase.createNewByType(id);

    try
    {
        nbtbase.read(input, depth, sizeTracker);
        return nbtbase;
    }
    catch (IOException ioexception)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(ioexception, "Loading NBT data");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("NBT Tag");
        crashreportcategory.addCrashSection("Tag name", key);
        crashreportcategory.addCrashSection("Tag type", Byte.valueOf(id));
        throw new ReportedException(crashreport);
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:19,代碼來源:NBTTagCompound.java

示例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);
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:25,代碼來源:BlockModelRenderer.java

示例3: getBlock

import net.minecraft.crash.CrashReportCategory; //導入依賴的package包/類
public Block getBlock(final BlockPos pos)
{
    try
    {
        return this.getBlock0(pos.getX() & 15, pos.getY(), pos.getZ() & 15);
    }
    catch (ReportedException reportedexception)
    {
        CrashReportCategory crashreportcategory = reportedexception.getCrashReport().makeCategory("Block being got");
        crashreportcategory.addCrashSectionCallable("Location", new Callable<String>()
        {
            public String call() throws Exception
            {
                return CrashReportCategory.getCoordinateInfo(pos);
            }
        });
        throw reportedexception;
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:20,代碼來源:Chunk.java

示例4: playAuxSFXAtEntity

import net.minecraft.crash.CrashReportCategory; //導入依賴的package包/類
public void playAuxSFXAtEntity(EntityPlayer player, int sfxType, BlockPos pos, int p_180498_4_)
{
    try
    {
        for (int i = 0; i < this.worldAccesses.size(); ++i)
        {
            ((IWorldAccess)this.worldAccesses.get(i)).playAuxSFX(player, sfxType, pos, p_180498_4_);
        }
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Playing level event");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Level event being played");
        crashreportcategory.addCrashSection("Block coordinates", CrashReportCategory.getCoordinateInfo(pos));
        crashreportcategory.addCrashSection("Event source", player);
        crashreportcategory.addCrashSection("Event type", Integer.valueOf(sfxType));
        crashreportcategory.addCrashSection("Event data", Integer.valueOf(p_180498_4_));
        throw new ReportedException(crashreport);
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:21,代碼來源:World.java

示例5: createCrashReport

import net.minecraft.crash.CrashReportCategory; //導入依賴的package包/類
/**
 * Create a crash report which indicates a NBT read error.
 */
private CrashReport createCrashReport(final String key, final int expectedType, ClassCastException ex)
{
    CrashReport crashreport = CrashReport.makeCrashReport(ex, "Reading NBT data");
    CrashReportCategory crashreportcategory = crashreport.makeCategoryDepth("Corrupt NBT tag", 1);
    crashreportcategory.addCrashSectionCallable("Tag type found", new Callable<String>()
    {
        public String call() throws Exception
        {
            return NBTBase.NBT_TYPES[((NBTBase)NBTTagCompound.this.tagMap.get(key)).getId()];
        }
    });
    crashreportcategory.addCrashSectionCallable("Tag type expected", new Callable<String>()
    {
        public String call() throws Exception
        {
            return NBTBase.NBT_TYPES[expectedType];
        }
    });
    crashreportcategory.addCrashSection("Tag name", key);
    return crashreport;
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:25,代碼來源:NBTTagCompound.java

示例6: captureFramebuffer

import net.minecraft.crash.CrashReportCategory; //導入依賴的package包/類
/**
 * caputres the current framebuffer
 */
public void captureFramebuffer(FrameBuffer p_152846_1_)
{
    try
    {
        this.field_152873_i.captureFrameBuffer_ReadPixels(p_152846_1_);
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Trying to submit a frame to Twitch");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Broadcast State");
        crashreportcategory.addCrashSection("Last reported errors", Arrays.toString(field_152862_C.func_152756_c()));
        crashreportcategory.addCrashSection("Buffer", p_152846_1_);
        crashreportcategory.addCrashSection("Free buffer count", Integer.valueOf(this.field_152875_k.size()));
        crashreportcategory.addCrashSection("Capture buffer count", Integer.valueOf(this.field_152874_j.size()));
        throw new ReportedException(crashreport);
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:21,代碼來源:BroadcastController.java

示例7: getBlock

import net.minecraft.crash.CrashReportCategory; //導入依賴的package包/類
public Block getBlock(final int x, final int y, final int z)
{
    try
    {
        return this.getBlock0(x & 15, y, z & 15);
    }
    catch (ReportedException reportedexception)
    {
        CrashReportCategory crashreportcategory = reportedexception.getCrashReport().makeCategory("Block being got");
        crashreportcategory.addCrashSectionCallable("Location", new Callable<String>()
        {
            public String call() throws Exception
            {
                return CrashReportCategory.getCoordinateInfo(new BlockPos(Chunk.this.xPosition * 16 + x, y, Chunk.this.zPosition * 16 + z));
            }
        });
        throw reportedexception;
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:20,代碼來源:Chunk.java

示例8: getWatchedObject

import net.minecraft.crash.CrashReportCategory; //導入依賴的package包/類
/**
 * is threadsafe, unless it throws an exception, then
 */
private DataWatcher.WatchableObject getWatchedObject(int id)
{
    this.lock.readLock().lock();
    DataWatcher.WatchableObject datawatcher$watchableobject;

    try
    {
        datawatcher$watchableobject = (DataWatcher.WatchableObject)this.watchedObjects.get(Integer.valueOf(id));
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Getting synched entity data");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Synched entity data");
        crashreportcategory.addCrashSection("Data ID", Integer.valueOf(id));
        throw new ReportedException(crashreport);
    }

    this.lock.readLock().unlock();
    return datawatcher$watchableobject;
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:24,代碼來源:DataWatcher.java

示例9: 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);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:19,代碼來源:BlockModelRenderer.java

示例10: fire

import net.minecraft.crash.CrashReportCategory; //導入依賴的package包/類
@SuppressWarnings("unchecked")
public <T extends Event> void fire(T event)
{
	if(!WurstClient.INSTANCE.isEnabled())
		return;
	
	try
	{
		event.fire(listenerMap.get(event.getListenerType()));
		
	}catch(Throwable e)
	{
		e.printStackTrace();
		
		CrashReport report =
			CrashReport.makeCrashReport(e, "Firing Wurst event");
		CrashReportCategory category =
			report.makeCategory("Affected event");
		category.setDetail("Event class", () -> event.getClass().getName());
		
		throw new ReportedException(report);
	}
}
 
開發者ID:Wurst-Imperium,項目名稱:Wurst-MC-1.12,代碼行數:24,代碼來源:EventManager.java

示例11: renderTileEntityAt

import net.minecraft.crash.CrashReportCategory; //導入依賴的package包/類
public void renderTileEntityAt(TileEntity tileEntityIn, double x, double y, double z, float partialTicks, int destroyStage)
{
    TileEntitySpecialRenderer<TileEntity> tileentityspecialrenderer = this.<TileEntity>getSpecialRenderer(tileEntityIn);

    if (tileentityspecialrenderer != null)
    {
        try
        {
            tileentityspecialrenderer.renderTileEntityAt(tileEntityIn, x, y, z, partialTicks, destroyStage);
        }
        catch (Throwable throwable)
        {
            CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Rendering Block Entity");
            CrashReportCategory crashreportcategory = crashreport.makeCategory("Block Entity Details");
            tileEntityIn.addInfoToCrashReport(crashreportcategory);
            throw new ReportedException(crashreport);
        }
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:20,代碼來源:TileEntityRendererDispatcher.java

示例12: 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);
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:19,代碼來源:BlockModelRenderer.java

示例13: getEntry

import net.minecraft.crash.CrashReportCategory; //導入依賴的package包/類
private <T> EntityDataManager.DataEntry<T> getEntry(DataParameter<T> key)
{
    this.lock.readLock().lock();
    EntityDataManager.DataEntry<T> dataentry;

    try
    {
        dataentry = (EntityDataManager.DataEntry)this.entries.get(Integer.valueOf(key.getId()));
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Getting synched entity data");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Synched entity data");
        crashreportcategory.addCrashSection("Data ID", key);
        throw new ReportedException(crashreport);
    }

    this.lock.readLock().unlock();
    return dataentry;
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:21,代碼來源:EntityDataManager.java

示例14: runCommand

import net.minecraft.crash.CrashReportCategory; //導入依賴的package包/類
public void runCommand(String input) {
    String[] parts = input.split(" ");
    Cmd cmd = this.getCommandByName(parts[0]);
    if (cmd != null) {
        try {
            cmd.call(Arrays.copyOfRange(parts, 1, parts.length));
        } catch (Cmd.CmdException var7) {
            var7.printToChat();
        } catch (Exception var8) {
            CrashReport crashReport = CrashReport.makeCrashReport(var8, "Running Wurst command");
            CrashReportCategory reportCategory = crashReport.makeCategory("Affected command");
            reportCategory.setDetail("Command input", () -> input);
            throw new ReportedException(crashReport);
        }

    } else {
        ChatUtils.error("Unknown command: ." + parts[0]);
        if ("..".equals(input) || "legit".equalsIgnoreCase(input)) {
            ChatUtils.message("Try using .say ." + input);
        }

    }
}
 
開發者ID:WurstSDK-Team,項目名稱:WurstSDK,代碼行數:24,代碼來源:CmdManager.java

示例15: addEntityCrashInfo

import net.minecraft.crash.CrashReportCategory; //導入依賴的package包/類
public void addEntityCrashInfo(CrashReportCategory category)
{
    super.addEntityCrashInfo(category);

    if (this.fallTile != null)
    {
        Block block = this.fallTile.getBlock();
        category.addCrashSection("Immitating block ID", Integer.valueOf(Block.getIdFromBlock(block)));
        category.addCrashSection("Immitating block data", Integer.valueOf(block.getMetaFromState(this.fallTile)));
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:12,代碼來源:EntityFallingBlock.java


注:本文中的net.minecraft.crash.CrashReportCategory類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。