Jump to content

Is There A Reason stackSize Is Not Visible In The Class Item.ItemStack? (1.11)


gurujive

Recommended Posts

I can see it right here..... I don't know what's going on here...  :-X

So I figured I'd ask... I am in need of this.

 

    public static final DecimalFormat DECIMALFORMAT = new DecimalFormat("#.##");
    /** Size of the stack. */
    private int stackSize;
    /** Number of animation frames to go when receiving an item (by walking into it, for example). */
    private int animationsToGo;

Link to comment
Share on other sites

func_190920_e

setStackSize

func_190917_f

increaseStackSize

func_190918_g

decreaseStackSize

 

meh..... I hope I can get this to start working.... The item shows up in the named tab but when I throw it, it disappears and doesn't render... It flies through the air and can hit things like entities and do damage and make noise, but its invisible....

 

edit:

New mdk update... i'll see how it goes *fingers crossed*

 

edit2:

Its cool. (please keep this going on EntityRegistry.registerModEntity( 64, 107, true);

Link to comment
Share on other sites

Just in case somebody failed to see the obvious in the OP:

 private int stackSize;

 

"Private" means that the field can't be seen outside of its own class (not even extensions can see it). The solution was to find a public method that would divulge it. In this version, the public method is camouflaged (obfuscated) by its SRG name.

 

Expect that to change to a friendlier name by the next time you update your mod. In fact, you should do your future self a favor by leaving a comment to yourself in your code.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

there's one more function that's missing 

 

func_190916_E = get stack size

1.10 stack.stackSize 

1.11 stack.func_190916_E()

 

and no it's not same as

func_190920_e= set stack size

 

haha  close but not quite

 

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

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.