colorizers should actually get consumed now

This commit is contained in:
gamma-delta 2022-02-04 11:59:12 -06:00
parent 1e4918a0ae
commit 3d5e991882
2 changed files with 3 additions and 2 deletions

View file

@ -17,7 +17,7 @@ apply plugin: 'maven-publish'
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.parchmentmc.librarian.forgegradle'
version = '0.5.0-dev.1'
version = '0.5.0-dev.2'
group = 'at.petra-k.hexcasting' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'hexcasting'

View file

@ -31,8 +31,9 @@ object OpColorize : SpellOperator {
val otherHandItem = ctx.caster.getItemInHand(ctx.otherHand)
if (FrozenColorizer.isColorizer(otherHandItem.item)) {
val item = otherHandItem.item
if (ctx.withdrawItem(otherHandItem.item, 1, true)) {
cap.colorizer = FrozenColorizer(otherHandItem.item, ctx.caster.uuid)
cap.colorizer = FrozenColorizer(item, ctx.caster.uuid)
HexMessages.getNetwork()
.send(PacketDistributor.PLAYER.with { ctx.caster }, MsgColorizerUpdateAck(cap))
}