Jump to content

Recommended Posts

Posted

Hey everyone,

 

I'm having a problem with my mod BetterStorage and the Storage Crates they add. Their inventory is dynamic and the internal inventory can't be directly accessed or modified. Instead there is a "block view" and "player view", which is for machines accessing the crates and players opening them, respectively.

 

Now it seems like many mods, if not most/all of them change the stackSize directly if they want to add items in a slot, whereas they should use setInventorySlotContents. ItemStack should be treated as immutable unless it's only used internally.

 

So yeah ... I'm not sure how I should about doing this. Writing a complicated system to add support for "wrong" code in other mods, or somehow getting all the modders to fix this issue which only affects my crates?

 

Any input would be nice, though I'm doing this mainly to get some more attention on this issue.

 

Thanks!

Posted

Personally, I always try to stay universally compatible whenever possible, but if this is not possible with the system you are using, try sending the mod author a message when you narrow down their problem. Typically giving them and equally easy method that would still work for them usually is all it takes.

I also have also used setInventorySlotContents to set the stack in an inventory slot, so all necessary systems are triggered when I change the inventory, so it would be a good idea for those mods to start doing this also.

 

As far as the complicated code to watch for, I suppose this would take a duplicate map? I don't think Itemstacks are .equals compatible, so it might be a bit of a chore, but it would be possible to check this on a scheduled tick.

Posted

I contacted the BuildCraft and Railcraft authors (via github) and they did not want to do this.

All it takes is a simple call to setInventorySlotContents...

 

But hey! At least I could convince Azanor to fix this issue for his golems.

Posted

I'm now wondering if this is the reason my chests don't seem to work correctly with automation.

I've been looking things over but just couldn't seem to find the problem.

 

Is your issue the same as mine?

 

The tile entity of each chest is storing its own items,

Breaking a chest drops all of the items stored in the tile entity.

GUI shows inventory of all joined chests.

Player can shift click items in and out of any slot, extra items will spill over into the next joined inventory.

 

But when connected to BuildCraft pipes only the tile entity the pipe connects to is ever accessed.

  • 2 weeks later...
Posted

You could use a coremod to modify the incompatible mods on load time. If it's just a one call you need to change, it should be fairly simple.

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.