• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ICrashReportDetail类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.minecraft.crash.ICrashReportDetail的典型用法代码示例。如果您正苦于以下问题:Java ICrashReportDetail类的具体用法?Java ICrashReportDetail怎么用?Java ICrashReportDetail使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ICrashReportDetail类属于net.minecraft.crash包,在下文中一共展示了ICrashReportDetail类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createCrashReport

import net.minecraft.crash.ICrashReportDetail; //导入依赖的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.setDetail("Tag type found", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            return NBTBase.NBT_TYPES[((NBTBase)NBTTagCompound.this.tagMap.get(key)).getId()];
        }
    });
    crashreportcategory.setDetail("Tag type expected", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            return NBTBase.NBT_TYPES[expectedType];
        }
    });
    crashreportcategory.addCrashSection("Tag name", key);
    return crashreport;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:25,代码来源:NBTTagCompound.java


示例2: addServerInfoToCrashReport

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
/**
 * Adds the server info, including from theWorldServer, to the crash report.
 */
public CrashReport addServerInfoToCrashReport(CrashReport report)
{
    report.getCategory().setDetail("Profiler Position", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            return MinecraftServer.this.theProfiler.profilingEnabled ? MinecraftServer.this.theProfiler.getNameOfLastSection() : "N/A (disabled)";
        }
    });

    if (this.playerList != null)
    {
        report.getCategory().setDetail("Player Count", new ICrashReportDetail<String>()
        {
            public String call()
            {
                return MinecraftServer.this.playerList.getCurrentPlayerCount() + " / " + MinecraftServer.this.playerList.getMaxPlayers() + "; " + MinecraftServer.this.playerList.getPlayerList();
            }
        });
    }

    return report;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:27,代码来源:MinecraftServer.java


示例3: addServerInfoToCrashReport

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
/**
 * Adds the server info, including from theWorldServer, to the crash report.
 */
public CrashReport addServerInfoToCrashReport(CrashReport report)
{
    report = super.addServerInfoToCrashReport(report);
    report.getCategory().setDetail("Is Modded", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            String s = DedicatedServer.this.getServerModName();
            return !"vanilla".equals(s) ? "Definitely; Server brand changed to \'" + s + "\'" : "Unknown (can\'t tell)";
        }
    });
    report.getCategory().setDetail("Type", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            return "Dedicated Server (map_server.txt)";
        }
    });
    return report;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:24,代码来源:DedicatedServer.java


示例4: sendPacket

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
public void sendPacket(final Packet<?> packetIn)
{
    if (packetIn instanceof SPacketChat)
    {
        SPacketChat spacketchat = (SPacketChat)packetIn;
        EntityPlayer.EnumChatVisibility entityplayer$enumchatvisibility = this.playerEntity.getChatVisibility();

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.HIDDEN && spacketchat.getType() != 2)
        {
            return;
        }

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.SYSTEM && !spacketchat.isSystem())
        {
            return;
        }
    }

    try
    {
        this.netManager.sendPacket(packetIn);
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Sending packet");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Packet being sent");
        crashreportcategory.setDetail("Packet class", new ICrashReportDetail<String>()
        {
            public String call() throws Exception
            {
                return packetIn.getClass().getCanonicalName();
            }
        });
        throw new ReportedException(crashreport);
    }
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:37,代码来源:NetHandlerPlayServer.java


示例5: getBiome

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
public Biome getBiome(final BlockPos pos)
{
    if (this.isBlockLoaded(pos))
    {
        Chunk chunk = this.getChunkFromBlockCoords(pos);

        try
        {
            return chunk.getBiome(pos, this.provider.getBiomeProvider());
        }
        catch (Throwable throwable)
        {
            CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Getting biome");
            CrashReportCategory crashreportcategory = crashreport.makeCategory("Coordinates of biome request");
            crashreportcategory.setDetail("Location", new ICrashReportDetail<String>()
            {
                public String call() throws Exception
                {
                    return CrashReportCategory.getCoordinateInfo(pos);
                }
            });
            throw new ReportedException(crashreport);
        }
    }
    else
    {
        return this.provider.getBiomeProvider().getBiome(pos, Biomes.PLAINS);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:30,代码来源:World.java


示例6: func_190524_a

import net.minecraft.crash.ICrashReportDetail; //导入依赖的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);
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:34,代码来源:World.java


示例7: func_190529_b

import net.minecraft.crash.ICrashReportDetail; //导入依赖的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);
            }
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:37,代码来源:World.java


示例8: addWorldInfoToCrashReport

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
/**
 * Adds some basic stats of the world to the given crash report.
 */
public CrashReportCategory addWorldInfoToCrashReport(CrashReport report)
{
    CrashReportCategory crashreportcategory = report.makeCategoryDepth("Affected level", 1);
    crashreportcategory.addCrashSection("Level name", this.worldInfo == null ? "????" : this.worldInfo.getWorldName());
    crashreportcategory.setDetail("All players", new ICrashReportDetail<String>()
    {
        public String call()
        {
            return World.this.playerEntities.size() + " total; " + World.this.playerEntities;
        }
    });
    crashreportcategory.setDetail("Chunk stats", new ICrashReportDetail<String>()
    {
        public String call()
        {
            return World.this.chunkProvider.makeString();
        }
    });

    try
    {
        this.worldInfo.addToCrashReport(crashreportcategory);
    }
    catch (Throwable throwable)
    {
        crashreportcategory.addCrashSectionThrowable("Level Data Unobtainable", throwable);
    }

    return crashreportcategory;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:34,代码来源:World.java


示例9: addEntityCrashInfo

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
public void addEntityCrashInfo(CrashReportCategory category)
{
    category.setDetail("Entity Type", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            return EntityList.func_191301_a(Entity.this) + " (" + Entity.this.getClass().getCanonicalName() + ")";
        }
    });
    category.addCrashSection("Entity ID", Integer.valueOf(this.entityId));
    category.setDetail("Entity Name", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            return Entity.this.getName();
        }
    });
    category.addCrashSection("Entity\'s Exact location", String.format("%.2f, %.2f, %.2f", new Object[] {Double.valueOf(this.posX), Double.valueOf(this.posY), Double.valueOf(this.posZ)}));
    category.addCrashSection("Entity\'s Block location", CrashReportCategory.getCoordinateInfo(MathHelper.floor(this.posX), MathHelper.floor(this.posY), MathHelper.floor(this.posZ)));
    category.addCrashSection("Entity\'s Momentum", String.format("%.2f, %.2f, %.2f", new Object[] {Double.valueOf(this.motionX), Double.valueOf(this.motionY), Double.valueOf(this.motionZ)}));
    category.setDetail("Entity\'s Passengers", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            return Entity.this.getPassengers().toString();
        }
    });
    category.setDetail("Entity\'s Vehicle", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            return Entity.this.getRidingEntity().toString();
        }
    });
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:36,代码来源:Entity.java


示例10: tickParticle

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
private void tickParticle(final Particle particle)
{
    try
    {
        particle.onUpdate();
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Ticking Particle");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Particle being ticked");
        final int i = particle.getFXLayer();
        crashreportcategory.setDetail("Particle", new ICrashReportDetail<String>()
        {
            public String call() throws Exception
            {
                return particle.toString();
            }
        });
        crashreportcategory.setDetail("Particle Type", new ICrashReportDetail<String>()
        {
            public String call() throws Exception
            {
                return i == 0 ? "MISC_TEXTURE" : (i == 1 ? "TERRAIN_TEXTURE" : (i == 3 ? "ENTITY_PARTICLE_TEXTURE" : "Unknown - " + i));
            }
        });
        throw new ReportedException(crashreport);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:29,代码来源:ParticleManager.java


示例11: func_190570_a

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
public void func_190570_a(int p_190570_1_, boolean p_190570_2_, boolean p_190570_3_, final double p_190570_4_, final double p_190570_6_, final double p_190570_8_, double p_190570_10_, double p_190570_12_, double p_190570_14_, int... p_190570_16_)
{
    try
    {
        this.func_190571_b(p_190570_1_, p_190570_2_, p_190570_3_, p_190570_4_, p_190570_6_, p_190570_8_, p_190570_10_, p_190570_12_, p_190570_14_, p_190570_16_);
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Exception while adding particle");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Particle being added");
        crashreportcategory.addCrashSection("ID", Integer.valueOf(p_190570_1_));

        if (p_190570_16_ != null)
        {
            crashreportcategory.addCrashSection("Parameters", p_190570_16_);
        }

        crashreportcategory.setDetail("Position", new ICrashReportDetail<String>()
        {
            public String call() throws Exception
            {
                return CrashReportCategory.getCoordinateInfo(p_190570_4_, p_190570_6_, p_190570_8_);
            }
        });
        throw new ReportedException(crashreport);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:28,代码来源:RenderGlobal.java


示例12: loadTexture

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
public boolean loadTexture(ResourceLocation textureLocation, ITextureObject textureObj)
{
    boolean flag = true;

    try
    {
        ((ITextureObject)textureObj).loadTexture(this.theResourceManager);
    }
    catch (IOException ioexception)
    {
        LOGGER.warn("Failed to load texture: {}", new Object[] {textureLocation, ioexception});
        textureObj = TextureUtil.MISSING_TEXTURE;
        this.mapTextureObjects.put(textureLocation, (ITextureObject)textureObj);
        flag = false;
    }
    catch (Throwable throwable)
    {
        final ITextureObject textureObjf = textureObj;
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Registering texture");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Resource location being registered");
        crashreportcategory.addCrashSection("Resource location", textureLocation);
        crashreportcategory.setDetail("Texture object class", new ICrashReportDetail<String>()
        {
            public String call() throws Exception
            {
                return textureObjf.getClass().getName();
            }
        });
        throw new ReportedException(crashreport);
    }

    this.mapTextureObjects.put(textureLocation, (ITextureObject)textureObj);
    return flag;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:35,代码来源:TextureManager.java


示例13: addWorldInfoToCrashReport

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
/**
 * Adds some basic stats of the world to the given crash report.
 */
public CrashReportCategory addWorldInfoToCrashReport(CrashReport report)
{
    CrashReportCategory crashreportcategory = super.addWorldInfoToCrashReport(report);
    crashreportcategory.setDetail("Forced entities", new ICrashReportDetail<String>()
    {
        public String call()
        {
            return WorldClient.this.entityList.size() + " total; " + WorldClient.this.entityList;
        }
    });
    crashreportcategory.setDetail("Retry entities", new ICrashReportDetail<String>()
    {
        public String call()
        {
            return WorldClient.this.entitySpawnQueue.size() + " total; " + WorldClient.this.entitySpawnQueue;
        }
    });
    crashreportcategory.setDetail("Server brand", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            return WorldClient.this.mc.player.getServerBrand();
        }
    });
    crashreportcategory.setDetail("Server type", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            return WorldClient.this.mc.getIntegratedServer() == null ? "Non-integrated multiplayer server" : "Integrated singleplayer server";
        }
    });
    return crashreportcategory;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:37,代码来源:WorldClient.java


示例14: addServerInfoToCrashReport

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
/**
 * Adds the server info, including from theWorldServer, to the crash report.
 */
public CrashReport addServerInfoToCrashReport(CrashReport report)
{
    report = super.addServerInfoToCrashReport(report);
    report.getCategory().setDetail("Type", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            return "Integrated Server (map_client.txt)";
        }
    });
    report.getCategory().setDetail("Is Modded", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            String s = ClientBrandRetriever.getClientModName();

            if (!s.equals("vanilla"))
            {
                return "Definitely; Client brand changed to \'" + s + "\'";
            }
            else
            {
                s = IntegratedServer.this.getServerModName();
                return !"vanilla".equals(s) ? "Definitely; Server brand changed to \'" + s + "\'" : (Minecraft.class.getSigners() == null ? "Very likely; Jar signature invalidated" : "Probably not. Jar signature remains and both client + server brands are untouched.");
            }
        }
    });
    return report;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:33,代码来源:IntegratedServer.java


示例15: getBiomeForCoordsBody

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
public Biome getBiomeForCoordsBody(final BlockPos pos)
{
    if (this.isBlockLoaded(pos))
    {
        Chunk chunk = this.getChunkFromBlockCoords(pos);

        try
        {
            return chunk.getBiome(pos, this.provider.getBiomeProvider());
        }
        catch (Throwable throwable)
        {
            CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Getting biome");
            CrashReportCategory crashreportcategory = crashreport.makeCategory("Coordinates of biome request");
            crashreportcategory.setDetail("Location", new ICrashReportDetail<String>()
            {
                public String call() throws Exception
                {
                    return CrashReportCategory.getCoordinateInfo(pos);
                }
            });
            throw new ReportedException(crashreport);
        }
    }
    else
    {
        return this.provider.getBiomeProvider().getBiome(pos, Biomes.PLAINS);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:30,代码来源:World.java


示例16: notifyBlockOfStateChange

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
public void notifyBlockOfStateChange(BlockPos pos, final Block blockIn)
{
    if (!this.isRemote)
    {
        IBlockState iblockstate = this.getBlockState(pos);

        try
        {
            iblockstate.neighborChanged(this, pos, blockIn);
        }
        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(blockIn)), blockIn.getUnlocalizedName(), blockIn.getClass().getCanonicalName()});
                    }
                    catch (Throwable var2)
                    {
                        return "ID #" + Block.getIdFromBlock(blockIn);
                    }
                }
            });
            CrashReportCategory.addBlockInfo(crashreportcategory, pos, iblockstate);
            throw new ReportedException(crashreport);
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:34,代码来源:World.java


示例17: addEntityCrashInfo

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
public void addEntityCrashInfo(CrashReportCategory category)
{
    category.setDetail("Entity Type", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            return EntityList.getEntityString(Entity.this) + " (" + Entity.this.getClass().getCanonicalName() + ")";
        }
    });
    category.addCrashSection("Entity ID", Integer.valueOf(this.entityId));
    category.setDetail("Entity Name", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            return Entity.this.getName();
        }
    });
    category.addCrashSection("Entity\'s Exact location", String.format("%.2f, %.2f, %.2f", new Object[] {Double.valueOf(this.posX), Double.valueOf(this.posY), Double.valueOf(this.posZ)}));
    category.addCrashSection("Entity\'s Block location", CrashReportCategory.getCoordinateInfo(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)));
    category.addCrashSection("Entity\'s Momentum", String.format("%.2f, %.2f, %.2f", new Object[] {Double.valueOf(this.motionX), Double.valueOf(this.motionY), Double.valueOf(this.motionZ)}));
    category.setDetail("Entity\'s Passengers", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            return Entity.this.getPassengers().toString();
        }
    });
    category.setDetail("Entity\'s Vehicle", new ICrashReportDetail<String>()
    {
        public String call() throws Exception
        {
            return Entity.this.getRidingEntity().toString();
        }
    });
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:36,代码来源:Entity.java


示例18: sendPacket

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
public void sendPacket(final Packet<?> packetIn)
{
    if (packetIn instanceof SPacketChat)
    {
        SPacketChat spacketchat = (SPacketChat)packetIn;
        EntityPlayer.EnumChatVisibility entityplayer$enumchatvisibility = this.playerEntity.getChatVisibility();

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.HIDDEN)
        {
            return;
        }

        if (entityplayer$enumchatvisibility == EntityPlayer.EnumChatVisibility.SYSTEM && !spacketchat.isSystem())
        {
            return;
        }
    }

    try
    {
        this.netManager.sendPacket(packetIn);
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Sending packet");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Packet being sent");
        crashreportcategory.setDetail("Packet class", new ICrashReportDetail<String>()
        {
            public String call() throws Exception
            {
                return packetIn.getClass().getCanonicalName();
            }
        });
        throw new ReportedException(crashreport);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:37,代码来源:NetHandlerPlayServer.java


示例19: spawnParticle

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
public void spawnParticle(int particleID, boolean ignoreRange, final double xCoord, final double yCoord, final double zCoord, double xSpeed, double ySpeed, double zSpeed, int... parameters)
{
    try
    {
        this.spawnEntityFX(particleID, ignoreRange, xCoord, yCoord, zCoord, xSpeed, ySpeed, zSpeed, parameters);
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Exception while adding particle");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Particle being added");
        crashreportcategory.addCrashSection("ID", Integer.valueOf(particleID));

        if (parameters != null)
        {
            crashreportcategory.addCrashSection("Parameters", parameters);
        }

        crashreportcategory.setDetail("Position", new ICrashReportDetail<String>()
        {
            public String call() throws Exception
            {
                return CrashReportCategory.getCoordinateInfo(xCoord, yCoord, zCoord);
            }
        });
        throw new ReportedException(crashreport);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:28,代码来源:RenderGlobal.java


示例20: loadTexture

import net.minecraft.crash.ICrashReportDetail; //导入依赖的package包/类
public boolean loadTexture(ResourceLocation textureLocation, ITextureObject textureObj)
{
    boolean flag = true;

    try
    {
        ((ITextureObject)textureObj).loadTexture(this.theResourceManager);
    }
    catch (IOException ioexception)
    {
        LOGGER.warn("Failed to load texture: {}", new Object[] {textureLocation, ioexception});
        textureObj = TextureUtil.MISSING_TEXTURE;
        this.mapTextureObjects.put(textureLocation, (ITextureObject)textureObj);
        flag = false;
    }
    catch (Throwable throwable)
    {
        final ITextureObject p_110579_2_f = textureObj;
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Registering texture");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Resource location being registered");
        crashreportcategory.addCrashSection("Resource location", textureLocation);
        crashreportcategory.setDetail("Texture object class", new ICrashReportDetail<String>()
        {
            public String call() throws Exception
            {
                return p_110579_2_f.getClass().getName();
            }
        });
        throw new ReportedException(crashreport);
    }

    this.mapTextureObjects.put(textureLocation, (ITextureObject)textureObj);
    return flag;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:35,代码来源:TextureManager.java



注:本文中的net.minecraft.crash.ICrashReportDetail类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java OutputFormat类代码示例发布时间:2022-05-23
下一篇:
Java RowKey类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap