shadowmage45 / AncientWarfare

Updated Ancient Warfare mod for Minecraft 1.5.2+
http://ancientwarfare.wikispaces.com/
Other
10 stars 7 forks source link

Civic Structure Builder - Item drop bug #52

Closed TechStack closed 10 years ago

TechStack commented 10 years ago

This was reported to me from a server member today.

In version .042 ( possibly prior versions)

Steps to reproduce: 1 Make a civic structure builder with any structure. (made in survival) 2 Place it in survival mode. 3 Mine it up using a pickaxe. 4 The drop from the block is a civic structure builder with no structure selected 5 Player is unable to place the new item because no structure select or open the GUI.

Hope this helps ;)

shadowmage45 commented 10 years ago

Thanks for the report,

Should be simple enough to fix -- I'll see what I can do about getting it into an update over the weekend.

shadowmage45 commented 10 years ago

Just a quick update:

Not as simple to solve properly as I had thought. While making it drop a properly filled in item is simple, there are other issues.

The problem stems from one of exploit-ability -- if the builder has already started building, and I let people pick it up...when they placed it back down, it would start building from scratch...duplicating whichever blocks it had already placed. If the builder was done/nearly done and the player picked it up/replaced it, they would get an entire free structure (excluding npc food costs / work time....free blocks anyhow).

-Originally- it was supposed to drop nothing...the actual bug is that it drops an item at all.

However, I will investigate proper solutions on storing the build-state of the structure, or at least checking to see if it has started building and dropping an item if it has not yet started.

TechStack commented 10 years ago

Good catch! that would have been worse. I rather dislike item dupe glitches.

In the case of the issue that was reported to me. The user had miss-placed the builder in the wrong spot and was simply trying to move it before the workers started to build it.

Probably no good way to handle that scenario.

shadowmage45 commented 10 years ago

I should be able to have the tile-entity carry a simple boolean flag to denote if it has placed the first block or not, and then let the tile-entity control whether to drop an item or not based on that flag.

I have no problem with people picking up/replacing for something that was placed wrong, was just trying to avoid the block-duplication scenarios :)

I'll look into this over this week and see what I can do about a proper solution for the next update release.