mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Fix ConflictBuilder copy not coping maxBeforeConflict
This commit is contained in:
parent
9458362453
commit
8acc136158
2 changed files with 34 additions and 32 deletions
|
|
@ -148,7 +148,6 @@ public class ConflictAPI {
|
||||||
EnchantConflictGui conflictGui = EnchantConflictGui.getCurrentInstance();
|
EnchantConflictGui conflictGui = EnchantConflictGui.getCurrentInstance();
|
||||||
if (conflictGui != null) conflictGui.removeGeneric(conflict);
|
if (conflictGui != null) conflictGui.removeGeneric(conflict);
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -177,7 +176,6 @@ public class ConflictAPI {
|
||||||
|
|
||||||
reloadChangeTask = null;
|
reloadChangeTask = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void logConflictOrigin(@NotNull ConflictBuilder builder) {
|
static void logConflictOrigin(@NotNull ConflictBuilder builder) {
|
||||||
|
|
|
||||||
|
|
@ -328,7 +328,7 @@ public class ConflictBuilder {
|
||||||
public ConflictBuilder copy() {
|
public ConflictBuilder copy() {
|
||||||
ConflictBuilder copy = new ConflictBuilder(this.name, this.source);
|
ConflictBuilder copy = new ConflictBuilder(this.name, this.source);
|
||||||
|
|
||||||
setMaxBeforeConflict(this.maxBeforeConflict);
|
copy.setMaxBeforeConflict(this.maxBeforeConflict);
|
||||||
|
|
||||||
// Set Enchantments
|
// Set Enchantments
|
||||||
for (NamespacedKey key : this.enchantmentKeys) {
|
for (NamespacedKey key : this.enchantmentKeys) {
|
||||||
|
|
@ -345,8 +345,10 @@ public class ConflictBuilder {
|
||||||
|
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build a new Enchant conflict group by this builder.
|
* Build a new Enchant conflict group by this builder.
|
||||||
|
*
|
||||||
* @return An Enchant conflict group with this builder parameters.
|
* @return An Enchant conflict group with this builder parameters.
|
||||||
*/
|
*/
|
||||||
public EnchantConflictGroup build() {
|
public EnchantConflictGroup build() {
|
||||||
|
|
@ -360,6 +362,7 @@ public class ConflictBuilder {
|
||||||
/**
|
/**
|
||||||
* Register this conflict if not yet registered.
|
* Register this conflict if not yet registered.
|
||||||
* Equivalent to {@link ConflictAPI#addConflict(ConflictBuilder, boolean) ConflictAPI.addConflict(this, true)}}
|
* Equivalent to {@link ConflictAPI#addConflict(ConflictBuilder, boolean) ConflictAPI.addConflict(this, true)}}
|
||||||
|
*
|
||||||
* @return True if successful.
|
* @return True if successful.
|
||||||
*/
|
*/
|
||||||
public boolean registerIfAbsent() {
|
public boolean registerIfAbsent() {
|
||||||
|
|
@ -369,6 +372,7 @@ public class ConflictBuilder {
|
||||||
/**
|
/**
|
||||||
* Register this conflict if not yet registered or deleted.
|
* Register this conflict if not yet registered or deleted.
|
||||||
* Equivalent to {@link ConflictAPI#addConflict(ConflictBuilder) ConflictAPI.addConflict(this)}
|
* Equivalent to {@link ConflictAPI#addConflict(ConflictBuilder) ConflictAPI.addConflict(this)}
|
||||||
|
*
|
||||||
* @return True if successful.
|
* @return True if successful.
|
||||||
*/
|
*/
|
||||||
public boolean registerIfNew() {
|
public boolean registerIfNew() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue