Civcraft / Citadel

Do not open issues here; open them on the maintained fork @ DevotedMC
https://github.com/DevotedMC/Citadel
BSD 3-Clause "New" or "Revised" License
6 stars 23 forks source link

Offhand reinforcement #183

Open ProgrammerDan opened 8 years ago

ProgrammerDan commented 8 years ago

If you have only reinforcement materials in the offhand and none in inventory, fortification mode exits on next block placement attempt.

Similarly offhand is consumed first vs. expectation (inventory consumed first) on fortify.

/ctf should consume from main inventory first and offhand last.

Maxopoly commented 8 years ago

The issue here is that /ctr and /ctf and the newfriend commandfree reinforcing call the same reinforcement method. I made it so it consumes offhand first (previously it was completly ignored) with the feature in mind where they can just put the reinforcement material in offhand and place, if the material wouldnt get consumed from offhand there, it might be weird. Not sure whats the best solution here.

ProgrammerDan commented 8 years ago

Few notes:

These are for myself; I'll be addressing these issues shortly.

rourke750 commented 8 years ago

Sounds like spigot fixed the bug where it would not consume enough. Obly took them 2 years....

rourke750 commented 8 years ago

Is that only with off hand though? What happens if you ctf and place with primary hand.

ProgrammerDan commented 8 years ago

Only offhand, so it's some new special logic. Yay!

Maxopoly commented 8 years ago

The normal material consumption code would only iterate over the inventory (which doesn't include offhand, armour slots and crafting inventory), so I added special handling for the off hand slot, but seems like I messed something up for forgot to change something

ProgrammerDan commented 8 years ago

Yeah, not a problem. I missed it for two weeks myself :D I'd always rather over-consume then under (yay dupes!) so I'm not as worried here.