Saturday, August 24, 2013

HigherPower - Silverfish Failures

I'm considering a new machine that will allow players to shove Silverfish into any block and then place that block in the world.  I have run into a strange problem with the silverfish-containing block: It looks as I want it to in the inventory (using the first 12 bits for block ID and the rest for metadata), but when it is placed it is the missing-texture block.  I did some experiments that showed that the issue was somewhere in the ItemBlock instance.  I saw that the metadata of the placed block is not the same as the block is in the inventory -- in fact, after being placed, its metadata becomes zero.  I think that is because the normal ItemBlock class does not respect metadata.  I tried to set the appropriate entry in Item.itemsList to an instance of ItemBlockWithMetadata, but that seemed to have no effect.  So, I guess I'll do some more meddling and if I can't fix the issue, I'll make the player inject the Silverfish in-world by placing the machine above each block.

I also added a possible sword aspect and a bow aspect.  Piercing (for swords) does extra damage to enemy armor, increasing exponentially per level.  Channeling (for bows) gathers Sharpness and Fire Aspect effects from swords in the shooter's inventory and applies them to the target, multiplying the effects by the level of aspect.

No comments:

Post a Comment