Vswe's Summer Courses | You're not logged in. Sign up or log in | Server time: | Donate
One can now see other persons' badge hunts. Simply head over to their profiles to access them.

Go back to sub forum page

General forum

Non-course related subjects

4. Mod discussion

Item Duping

  • 2014-01-03 23:49:51
    So I made a mod for modjam: http://www.minecraftforum.net/topic/2265610-modjamforge164-mobile-base-released/page__view__findpost__p__27630172 and a huge problem I've been battling since I started making the mod was duping. I seemed to have fixed most of it, however the one that I can fix is mutli-blocks like beds. The way it removes all the blocks inside the tent is by cycling though the area, so when it breaks one end of the bed. The other end will detect the change and will spawn an item. Any clues how to fix it?
  • 2014-01-04 07:27:05
    You can use method getEntitiesWithinAABB in World object.

    Give it an EntityItem class. It will return list of all items within given area (the bounding box you give it).

    Then you can use unloadEntities in World object to remove them all at once.

    You can also check if the items were actually part of the tent, so it won't remove any items just lying around when you destroy the tent.

    BTW I've made a mod during modjam too ;p
  • 2014-01-04 11:14:42
    Nice, never thought about doing that. Cheers man.
  • 2014-01-04 13:58:58
    Actually, that does not work. Due to the block and item ids of doors and beds being different.
  • 2014-01-04 14:20:48
    Nvm. Found a way, as well as checking against the id's. I am doing a double check to with there item and blocks unlocalizedname.
  • Log in or sign up to reply to this thread