首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我怎样才能培育出定制的暴徒呢?

我怎样才能培育出定制的暴徒呢?
EN

Stack Overflow用户
提问于 2015-03-04 11:05:04
回答 1查看 2.6K关注 0票数 1

我正试图从我的类中派生出一个实体,该实体自定义EntityZombie

代码语言:javascript
复制
World bukkit; // ...
CraftWorld craft = (CraftWorld)bukkit;
net.minecraft.server.v1_7_R3.World world = craft.getHandle();
Boss boss = new Boss(world);
Location spawn; // ...
boss.setLocation(spawn.getX(), spawn.getY(), spawn.getZ(), spawn.getYaw(), spawn.getPitch());
world.addEntity(boss);
代码语言:javascript
复制
public class Boss extends EntityZombie {
    public Boss(World world) {
        super(world);
    }
    // Empty right now, nothing more than the normal zombie
}

产出如下:

  • 如果我不去运行上面的代码,当我回来的时候,我什么也看不见。
  • 如果我靠得很近,客户端就会崩溃。

与控制台无关,这是完整的崩溃报告。

代码语言:javascript
复制
---- Minecraft Crash Report ----
// Who set us up the TNT?

Time: 06/03/15 14.57
Description: Ticking screen

java.lang.NullPointerException: Ticking screen
    at bjb.a(SourceFile:514)
    at fz.a(SourceFile:97)
    at fz.a(SourceFile:15)
    at ej.a(SourceFile:174)
    at bcx.e(SourceFile:78)
    at bao.p(SourceFile:1343)
    at bao.ak(SourceFile:774)
    at bao.f(SourceFile:728)
    at net.minecraft.client.main.Main.main(SourceFile:148)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
    at bjb.a(SourceFile:514)
    at fz.a(SourceFile:97)
    at fz.a(SourceFile:15)
    at ej.a(SourceFile:174)
    at bcx.e(SourceFile:78)

-- Affected screen --
Details:
    Screen name: ~~ERROR~~ NullPointerException: null

-- Affected level --
Details:
    Level name: MpServer
    All players: 1 total; [bjk['System_'/1, l='MpServer', x=-518,50, y=5,62, z=754,50]]
    Chunk stats: MultiplayerChunkCache: 10, 10
    Level seed: 0
    Level generator: ID 01 - flat, ver 0. Features enabled: false
    Level generator options: 
    Level spawn location: World: (-519,4,756), Chunk: (at 9,0,4 in -33,47; contains blocks -528,0,752 to -513,255,767), Region: (-2,1; contains chunks -64,32 to -33,63, blocks -1024,0,512 to -513,255,1023)
    Level time: 45 game time, 45 day time
    Level dimension: 0
    Level storage version: 0x00000 - Unknown?
    Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
    Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
    Forced entities: 1 total; [bjk['System_'/1, l='MpServer', x=-518,50, y=5,62, z=754,50]]
    Retry entities: 0 total; []
    Server brand: Spigot
    Server type: Non-integrated multiplayer server
Stacktrace:
    at bjf.a(SourceFile:289)
    at bao.b(SourceFile:1972)
    at bao.f(SourceFile:737)
    at net.minecraft.client.main.Main.main(SourceFile:148)

-- System Details --
Details:
    Minecraft Version: 1.7.10
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 1.8.0_25, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 136194320 bytes (129 MB) / 186380288 bytes (177 MB) up to 1060372480 bytes (1011 MB)
    JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
    AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    Launched Version: 1.7.10
    LWJGL: 2.9.1
    OpenGL: GeForce GT 440/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation
    GL Caps: Using GL 1.3 multitexturing.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Anisotropic filtering is supported and maximum anisotropy is 16.
Shaders are available because OpenGL 2.1 is supported.

    Is Modded: Probably not. Jar signature remains and client brand is untouched.
    Type: Client (map_client.txt)
    Resource Packs: []
    Current Language: English (US)
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    Anisotropic Filtering: On (2)

也许,我需要先为每一个生物群登记一下吗?如果是,怎么做?

EN

回答 1

Stack Overflow用户

发布于 2015-03-16 21:05:29

您可以从: RemoteEntities Api下载这里

如果需要,可以下载其他自定义的暴徒api,但我建议您使用它。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28852852

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档