Storage Drawers: Biomes O' Plenty Pack

Storage Drawers: Biomes O' Plenty Pack

6M Downloads

[Request] "Trim" upgrades

codewarrior0 opened this issue ยท 8 comments

commented

Allow drawer trim items to be used to change the look of an existing drawer. Right-clicking the trim on the drawer's front face would change the drawer to have the same type of wood as the trim, consuming the trim.

This might be a rather intensive change, since I didn't see anything like a "registry" that maps trim blocks back to the type of wood used, or to the corresponding drawer blocks - but the recent additions to the pack API may make it easier.

commented

It sounds like this is distinct from a similar thing I'm working on now -- the equivalent of bibliocraft paneled drawers. You're just looking to change an existing block without having to tear it down and rebuild it?

I'm not sure I like the proposed mechanism to upgrade, since you wouldn't be able to easily store trim and they don't look like upgrades. Maybe I could craft a generic tagged upgrade from them though.

commented

You're just looking to change an existing block without having to tear it down and rebuild it?

Exactly.

I looked at Bibliocraft's framed things just now. It lets you apply any solid block's texture to things like bookcases and tables, but you still have to tear it down and stick it in the furniture paneler.

Another thing I came across recently is the chest painter from Enhanced Inventories. You can either put the three blocks for planks, frame, and covering into it with a chest to repaint it, or you can put a paintbrush instead of a chest to load the paintbrush up with that particular style. The paintbrush can then be used to repaint several chests in-world without tearing them down first.

commented

Certainly ideas to keep in mind.

I'm playing around with an implementation for your idea. I should be able to override the default block item behavior by responding to shift+place, so no need for a separate upgrade.

I'm once again regretting a few early architecture decisions. Besides a roundabout lookup, I'll actually need to replace block objects, like doing the RR sorting upgrades.

commented

This is implemented now and will be in the next update.

I think I'll take the opportunity to bolt on an older request too. Apply same-type trim to hide the upgrade trim that some people find ugly (I'm among them actually... need to rethink for 1.8/1.9).

commented

Brilliant! I reverted the AE2 dep change to get a build going so I could give it a try:

With just StorageDrawers updated, it is working perfectly, at least with vanilla trim types.

However, upon updating the misc pack, I get a NullPointerException here:

java.lang.NullPointerException: Initializing game
    at com.jaquadro.minecraft.storagedrawers.packs.misc.core.DataResolver.getBlock(DataResolver.java:48)
    at com.jaquadro.minecraft.storagedrawers.core.api.BlockRegistry.register(BlockRegistry.java:20)
    at com.jaquadro.minecraft.storagedrawers.core.api.PackFactory.registerResolver(PackFactory.java:95)
    at com.jaquadro.minecraft.storagedrawers.packs.misc.StorageDrawersPack.postInit(StorageDrawersPack.java:52)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

The NPE is from trying to access the RR sorting blocks, which are not defined because RR is not installed. It seems PackFactory.registerResolver doesn't check if RR is actually installed before trying to register the blocks provided by the pack. (It checks for config.cache.enableRefinedRelocationIntegration but not Loader.isModLoaded("RefinedRelocation")).

commented

I'm open to suggestions if you have any.

commented

With the quick-fix in #192, I got the new replaceable trim working. Excellent work!

image

Also, I agree about hiding the upgrade trim. Or at least doing something so it doesn't stand out so garishly.

commented

The upgrade-hiding is in source control now (re-apply the same trim).

WAILA has been updated to show stack limits, which is more accurate/useful than the upgrade color was anyway. At least, ever since I let storage upgrade stack.