[CraftBukkit] Increase the number of blocks

Discussion in 'Plugin Development' started by Alexis, Feb 28, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Alexis

    Hi,
    I'm not sure i'm on the good topic but i don't know where posted.
    Actually i try increase the number of blocs and items on Minecraft, during increasing the size of terrain.png
    it's successful for the client, but i have a few problem with CraftBukkit.
    i have changed the class Block, Item, ItemStack, and Material in Bukkit.
    But when i compile i have this error :
    PHP:
    -------------------------------------------------------------------------------
    Test setorg.bukkit.craftbukkit.inventory.CraftItemStackTest
    -------------------------------------------------------------------------------
    Tests run2Failures0Errors1Skipped0Time elapsed0.245 sec <<< FAILURE!
    testCloneEnchantedItem(org.bukkit.craftbukkit.inventory.CraftItemStackTest)  Time elapsed0.214 sec  <<< ERROR!
    java.lang.NullPointerException
        at org
    .bukkit.craftbukkit.inventory.CraftItemStackTest.testCloneEnchantedItem(CraftItemStackTest.java:21)
        
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        
    at java.lang.reflect.Method.invoke(Unknown Source)
        
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
        
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
        
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
        
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
        
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
        
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
        
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
        
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
        
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
        
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
        
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
        
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:234)
        
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:133)
        
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:114)
        
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        
    at java.lang.reflect.Method.invoke(Unknown Source)
        
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
        
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
        
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
        
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
        
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
    i see that it's nullPointer but on the line who is indicated it's an asset
    PHP:
    assert (clone.getType().equals(itemStack.getType()));
    if i go further :
    ItemStack.java
    PHP:
    public Material getType() {
            return 
    Material.getMaterial(type);
        }
    aim on Material.java
    PHP:
    /**
        * Attempts to get the Material with the given ID
        *
        * @param id ID of the material to get
        * @return Material if found, or null
        */
        
    public static Material getMaterial(final int id) {
            if (
    lookupId.length id) {
                return 
    lookupId[id];
            } else {
                return 
    null;
            }
        }
    i see that in Material there is " private static Material[] lookupId = new Material[3200];" for the search, but why 3200 too ?
    So i haven't idea what bug. If someone know or have an idea thanks help me.

    Sorry for my english and thanks for your answers :)
     
  2. Offline

    Alexis

  3. Offline

    TnT

    Moved to correct forum.
     
Thread Status:
Not open for further replies.

Share This Page