Jump to content

crash log 1.9.4


RedBullSlurpie

Recommended Posts

You have a null pointer in you hash code function.

Post BlockRbsCrop.java

 

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

The null error is pointing towards this line

 

public int hashCode() {
        return registerName.hashCode();
    }

 

Also these ones.

 public BlockRbsCrop(String registerName) {
        super();

        this.registerName = registerName;

        this.setDefaultState(blockState.getBaseState().withProperty(getAge(), 0));
        this.setCreativeTab(SlurpiesDongles.SD);
    }

 

public static void loadBlockRegistry() {
        blueberrycrop = registerBlockCrop("blueberrycrop");

    }

    private static Block registerBlockCrop(String registerName) {
        final Block rbsCrop = new BlockRbsCrop(registerName);
        //final ItemBlock itemBlock = new ItemBlockFruit(pamCrop);

        return registerBlock(registerName, rbsCrop);
    }


    public static Block registerBlock(String registerName, Block block) {
        block.setRegistryName(registerName);
        block.setUnlocalizedName(registerName);

        GameRegistry.register(block);

        return block;
    }

 

 

Link to comment
Share on other sites

Here is the blue area in the log. at com.rbs.slurpiesdongles.blocks.BlockRbsCrop.<init>(BlockRbsCrop.java:45)

at com.rbs.slurpiesdongles.blocks.BlockRegistry.registerBlockCrop(BlockRegistry.java:24)

at com.rbs.slurpiesdongles.blocks.BlockRegistry.loadBlockRegistry(BlockRegistry.java:19)

at com.rbs.slurpiesdongles.proxy.CommonProxy.preInit(CommonProxy.java:18)

at com.rbs.slurpiesdongles.proxy.ClientProxy.preInit(ClientProxy.java:21)

at com.rbs.slurpiesdongles.SlurpiesDongles.preInit(SlurpiesDongles.java:34)

 

 

The first one BlockRbsCrop Line 45 points to this.

    super();

 

the 2nd one, line 24, points too this.

    final Block rbsCrop = new BlockRbsCrop(registerName);

 

the 3rd one, line 19 points too this.

     blueberrycrop = registerBlockCrop("blueberrycrop");

 

Line 18 points too this

       BlockRegistry.loadBlockRegistry();

 

line 21 points too this

       super.preInit(e);

 

 

line 34 points too this

       proxy.preInit(event);

 

and then there is this at the bottom of the log Stacktrace:

at com.rbs.slurpiesdongles.blocks.BlockRbsCrop.hashCode(BlockRbsCrop.java:208)

 

which points too this

       return registerName.hashCode();

Link to comment
Share on other sites

I removed the @Override for both of them. Still crashes.

@Override changes nothing about what your code does.

It is simply a marker that tells the compiler "hey, I intended to override here" so it can give you an error if you don't actually override anything.

Even if @Override is not there the method is still overriding.

 

Thank you for explaining. I am still learning and do appreciate your help as you are the one who always helps me.

Link to comment
Share on other sites

I mean you should not be overriding equals and you should not be overriding hashCode.

 

Also you haven't posted which tutorial you got this from yet.

 

I am not overriding them anymore. But it still crashes, and im not sure why, you said above that not overriding them wouldn't fix the issue eitherway, so im still trying too figure out why it crashes. Could you help anymore?

 

Also as for the tutorial, I don't have a direct link as im on a different computer than what im usually on, but i think the user's name was ChampAsh on youtube.

Link to comment
Share on other sites

Did that before and it crashed so i thought that it made no difference, sorry.

 

"It crashed" is not equal to "it crashed."

 

Just because "it crashed" does not mean that the problem has not changed: it is possible to have more than one error at a time.  You have to READ your fucking crash logs and use your god damn brain.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.