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:
@@ -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;
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user