9
0
mirror of https://github.com/Auxilor/Reforges.git synced 2025-12-23 08:59:24 +00:00

Fixed light reforge again

This commit is contained in:
Auxilor
2021-08-29 12:40:55 +01:00
parent e7841cda04
commit b6ee1ff07e
2 changed files with 8 additions and 1 deletions

View File

@@ -40,6 +40,12 @@ public abstract class Reforge implements Listener, Watcher {
@Getter @Getter
private final UUID uuid; private final UUID uuid;
/**
* The alternative UUID used in attribute modifiers.
*/
@Getter
private final UUID altUuid;
/** /**
* The reforges config. * The reforges config.
*/ */
@@ -87,6 +93,7 @@ public abstract class Reforge implements Listener, Watcher {
this.key = key; this.key = key;
this.config = new ReforgeConfig(this.getKey(), this.getClass(), this.plugin); this.config = new ReforgeConfig(this.getKey(), this.getClass(), this.plugin);
this.uuid = UUID.nameUUIDFromBytes(key.getBytes()); this.uuid = UUID.nameUUIDFromBytes(key.getBytes());
this.altUuid = UUID.nameUUIDFromBytes((key + "2").getBytes());
if (!Prerequisite.areMet(prerequisites)) { if (!Prerequisite.areMet(prerequisites)) {
return; return;

View File

@@ -41,7 +41,7 @@ public class ReforgeLight extends Reforge {
AttributeModifier.Operation.MULTIPLY_SCALAR_1 AttributeModifier.Operation.MULTIPLY_SCALAR_1
)); ));
meta.addAttributeModifier(Attribute.GENERIC_ATTACK_KNOCKBACK, new AttributeModifier( meta.addAttributeModifier(Attribute.GENERIC_ATTACK_KNOCKBACK, new AttributeModifier(
this.getUuid(), this.getAltUuid(),
"light-kb", "light-kb",
this.getConfig().getDouble(Reforges.CONFIG_LOCATION + "knockback-multiplier") - 1, this.getConfig().getDouble(Reforges.CONFIG_LOCATION + "knockback-multiplier") - 1,
AttributeModifier.Operation.MULTIPLY_SCALAR_1 AttributeModifier.Operation.MULTIPLY_SCALAR_1