Broken item drop on block don't drop it's self

Published by Anonymous (not verified) on
Status
Fixed
Issue description

When I tell the tool to drop a red sand block it returns a normal sand block 

 

        @Override
        public Item getItemDropped(IBlockState state, Random random, int l) {
            return new ItemStack(Blocks.SAND, (int) (1), 1).getItem();
        }

 

But when I use the producer it uses another code what works but uses loads of world dependances and so on.

To repeat this create a custom block, any model I guess, enabled dont drop yourself and enable drop red sand and it returns sand.

Issue comments

The issue is in the code you posted and this is how Minecraft works. The method returns Item which does not carry metadata. ItemStack does carry it though. Only items without metadata can be dropped this way. The return type of this method is Item and one can not change this.

If one wants to use metadata, it is required to use procedures. Procedure using world dependency is nothing bad so you don't have to worry about this.

Then you need to removed all other items from the item selection what can't be used you provide a list of every time that can be dropped via the don't drop it's self, this is not minecraft's fault you included every item if the item can't be returned.

I have not coded this myself I used your UI I just posted the code your software created, removing things around it seems you have over looked this issue.

There is nothing in your app or UI saying it wont drop other items part of the meta/sub ID I have just seen thanks to your UI making me thing this was working now I just wasted days of creation of many mods as I never thought or lets check every drop.

if the drop is bugged and you clearly know it is then you should of made it create a producer for that via the UI for users not leave them to believe it's working this is  bug, the UI is giving you fill block and items this includes meta versions.

Please fix the UI or change the way it codes that part, make it create a producer or just remove that option full stop since there is the when broken option there in the producer but that tick box and item selection box now is misleading.

Author Submitted by Anonymous (not verified) on Mon, 05/13/2019 - 15:47 Permalink

I updated the capture to show that hole section is useless if what your saying is by design.

I know this is so, I will add a notice in the text as right now we can't change the list because the way it is loaded. After flattening in later Minecraft versions this will not be a problem anymore.

In the code, this can't be changed as this is implementation Minecraft has and we have to live with this.

You can change the template to create the procedure version of the code, or just removed that option, it's super confusing and i can tell you there will be 100's if not 1000's of mods broken because of you.

Klemen I not sure why your saying you can't, you made this tool so yes only you can change this, you need fix this by one of the below.

  1. Create a new listing window - pontless tho as who wants to return a type of item or block no one
     
  2. Remove the option from the UI and only listen modded items- will upset a few people, but easier for you for people telling you it's a bug or broken.
     
  3. Change the code behind the UI to just create the procedure version of the code what you know does work, you just apply it to the when player barkes it and when blown up, you already do this on the block producre page so you can create this for the user, so when they go to the procedure page they would already have them two filled in a custom procedure

Yes you can fix this and yes you are able to do this, as you made this, unless you are hiding something from your users and you didn't make these parts ?

It's up to you witch one you want to provide the end user but 2 and 3 are good clear option leaving it is a bad idea as its you look like a lazy programmer, I am not been mean I been up front with you, you can fix this and there is no legit reason for you not to take action and fix a bug in your UI tool.

Stop blaming minecraft now, you have come so far with mcreator in the last year to get past people hating it as a block and item only tool it can do much more and the freedoms it's slowly letting users have, tho removing the eclipe export what a bad move for sure but that's my view on that lol

Dude just remove the all block listing and list only mob blocks and items with a little note saying other items must be done via the procedure must more sense or create the procedure for the end user you can do both it's up to you witch, leaving it makes you a laffing stock and a lazy progammer.

Watch your tone a bit, we don't want to get unprofessional again.

There is no way to do this other way than using procedures.

Removing all other blocks and items, for this reason, does not make any sense. I will add notice warning users about this next to this field and write a recommendation to use procedures for metadata based drops.

And as I said this won't even be an issue in later versions.

I see a new mechanism for drops was added which extends the current one, I will check if I can use this one to add metadata support.


Block#getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)

Author Submitted by Anonymous (not verified) on Mon, 05/13/2019 - 16:33 Permalink

No unprofessional tone was used, I am telling you how it seems and no user part from people like my self knows all logs and planks and other rock types are meta blocks/items, they are A) two young, B) don't know English and never read up on these things, 100% new to modding, or even all 3

These are just a few reasons why you shouldn't leave the vanilla items there, believe me, your doing a better thing removing the vanilla options for now, if you have fixed it in a future release then just remove the option there are two many meta items and blocks to think this is a valid move.

Also you made the UI and you new the problem but just blamed Mojang that was unprofessional of yourself you have the power to create that UI as easy or hard as you want so this was your design option and idea to leave that like that.
 

laffing stock and a lazy progammer

Seems a bit excessive to me, you have no idea how much work I put into this and calling people such names is nothing but disrespect and unprofessional tone.

Stop being rude to Klemen, He is a nice guy that put a lot of efforts for us to develop MCreator, That's really disrespectful to call Klemen laffing stock and a lazy programmer, he is the most Hardworking man i know, I don't like that

I was pointing out a fact how it makes this look it's a fact how it "looks" what I sure you don't want that view I know you are working hard on it, but I not going to lie bout it when things like this happen I will tell you a blunt truth.

I also dyslexic so I not sure how else to put that's how it's making you look, if I new a better way I would, so no it's not me been unprofessional, you have seen what that looks like lol two many F's to flap a fish at :)

 

The fix's are better then what your plaining to do bud, it's your software but this is another thing you can tick off from people needing to ask about why all the time, I seen it here many times and on the few unoffical mcreator discords about, I just never clicked this was the bug until today.

Author Submitted by Anonymous (not verified) on Mon, 05/13/2019 - 16:53 Permalink

@Loic_MaitreDuFeu it's nice you think you sticking up for him but you kinda wrong on one is been rude, this is not a school playground, I telling a fellow dev how it looks it might seem blunt but he's just been told.

I know but just to say that it's not a reason to call him a "laffing stock and lazy programmer"

Well forgot me in this conversation

BadKaiPanda, I think you are forgetting this software is given to you for free at the moment. And regarding "school playground?", are you trying to say grown-up people can't have a nice calm conversation without calling names each other? I think you just contradicted yourself here.

Regarding the solution to this bug which should be the topic of this anyway, I posted a snippet above and you can use this until I find an official solution.

The fix I listed above worked so in 1.9.0 metadata will work with drops for blocks and plants.

I never called you names Klemen I was telling you what it looks like, sorry you didn't like this fact, I don't think your understanding the hell myself and other member that provide your software support it's a pain in the backside to tell them it's bugged or that's the way it has to be because you are unable to fix it or wont at the time,

Tho you just made my life easier as you have stated it's fixed in 1.9.0 that's good.

There is people out there keeping your software alive and supporting it ways you don't and your forum don't and I know you know this, BUT you have to deal with your users back lash to hit at you from people like my self when you blame the wrong people and tell another dev that you can't fix something because of a company that as has no input in your GUI.

But anyway you have replied and fixed the issue so long as this worked in future versions I have one less problem from new or basic users,.