Botania

Botania

133M Downloads

Paint lens don't work on beds and shulker boxes

LeoBeliik opened this issue ยท 4 comments

commented

Mod Loader

Forge

Minecraft Version

1.19.2

Botania version

Botania-1.19.2-438-FORGE

Modloader version

43.2.8

Issue description

paintslinger lens don't paint beds or shulker boxes

Steps to reproduce

place a bed/shulker box in world
shoot em with the paint lens
observe

Other information

Candles don't work either

commented

As mentioned in the Discord:
The current implementation is limited in what it can do. It can't really handle any blocks that have any kind of block state or block entity associated, as it would hard-replace the existing block with the default block state of the new color. This applies not only to the blocks mentioned above, but technically also to Glazed Terracotta, which is supported, but will not maintain its orientation when painted. Also, entity support is hard-coded to sheep and sparks.

Botania currently handles the following things out of the box:

  • glass (clear and stained)
  • glass panes (clear and stained)
  • terracotta (natural and colored)
  • glazed terracotta (with the caveat of resetting its orientation when painting blocks)
  • wool
  • carpet
  • concrete
  • concrete powder
  • sheep

It currently does not handle the following things that can have a color in vanilla Minecraft:

  • beds (two-part block entity with relevant block state properties and associated POI)
  • banners and wall banners (block entity with NBT data for multiple dyed layers, if support was added, the outcome may or may not work as expected with the additional layers)
  • shulker boxes (plain or dyed; directional block entity with NBT data for inventory and name, would need to handle dying while a player has the inventory screen open)
  • glazed terracotta (partially supported, should retain directional block state)
  • candles (plain or dyed; block state with relevant properties)
  • cake with candle (plain or dyed candle; block state with relevant property)
  • shulker mob
commented

Unclear it the shulker mobs should be supported, since they can't be dyed in vanilla.

commented

Unclear it the shulker mobs should be supported, since they can't be dyed in vanilla.

Technically vanilla also doesn't let you re-dye anything that's already dyed, except signs and sheep. The shulker mob is mostly there to illustrate another thing: Other mods may introduce colored mobs that are not necessarily sheep, and it would probably be nice if there was a relatively easy way to support the paintslinger lens.

I can think of a couple of other things that may or may not be receptive to a paintslinger mana burst:

  • signs and hanging signs (although the text could have color codes already, making things tricky)
  • dyeable items in item frames (item frames are also entities, like sheep and shulkers)
  • dyeable item frames (Quark says "hello" and makes the previous category weird)

In that regard, making the dyeing logic as flexible as possible would only seem reasonable.

commented

An updated overview of the current implementation, for reference.

Out of the box, Botania properly supports coloring the following:

  • glass/glass panes (clear or stained)
  • terracotta (plain and already dyed)
  • glazed terracotta (now without resetting its orientation)
  • concrete/concrete powder
  • wool/carpet
  • candles/cake with candle
  • sheep (hard-coded)
  • sparks (mana and corporea; hard-coded)

Still missing support for these vanilla items:

  • banners (not sure if necessary, but support for changing the base color might be interesting where a significant amount of that is still visible)
  • beds (need to ensure block entity data and POI are left unchanged, and that both halves are the same color)
  • shulker boxes (should retain content when changing color)
  • text on all types of signs (just as if dye was applied to the sign block, keeping the glow state; still to answer: should waxed signs be excluded?)
  • shulker mob (as example for configurable entity support in general, e.g. Quark's dyeable item frames)

An interesting detail is that the current implementation always has the same "dyeing strength", regardless of the amount of mana in the mana burst. Maybe the range of the effect should scale in some reasonable way, e.g. similar to the explosion strength of an entropic lens or the number of blocks a bore lens can break. A burst fired from a pulse spreader with messenger+velocity lens should probably not have the same effect as one fired from a gaia spreader with potency lens, carrying over 50 times more mana than the former.