mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-24 00:26:16 +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();
|
||||
if (conflictGui != null) conflictGui.removeGeneric(conflict);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -177,7 +176,6 @@ public class ConflictAPI {
|
|||
|
||||
reloadChangeTask = null;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
static void logConflictOrigin(@NotNull ConflictBuilder builder) {
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ public class ConflictBuilder {
|
|||
public ConflictBuilder copy() {
|
||||
ConflictBuilder copy = new ConflictBuilder(this.name, this.source);
|
||||
|
||||
setMaxBeforeConflict(this.maxBeforeConflict);
|
||||
copy.setMaxBeforeConflict(this.maxBeforeConflict);
|
||||
|
||||
// Set Enchantments
|
||||
for (NamespacedKey key : this.enchantmentKeys) {
|
||||
|
|
@ -345,8 +345,10 @@ public class ConflictBuilder {
|
|||
|
||||
return copy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a new Enchant conflict group by this builder.
|
||||
*
|
||||
* @return An Enchant conflict group with this builder parameters.
|
||||
*/
|
||||
public EnchantConflictGroup build() {
|
||||
|
|
@ -360,6 +362,7 @@ public class ConflictBuilder {
|
|||
/**
|
||||
* Register this conflict if not yet registered.
|
||||
* Equivalent to {@link ConflictAPI#addConflict(ConflictBuilder, boolean) ConflictAPI.addConflict(this, true)}}
|
||||
*
|
||||
* @return True if successful.
|
||||
*/
|
||||
public boolean registerIfAbsent() {
|
||||
|
|
@ -369,6 +372,7 @@ public class ConflictBuilder {
|
|||
/**
|
||||
* Register this conflict if not yet registered or deleted.
|
||||
* Equivalent to {@link ConflictAPI#addConflict(ConflictBuilder) ConflictAPI.addConflict(this)}
|
||||
*
|
||||
* @return True if successful.
|
||||
*/
|
||||
public boolean registerIfNew() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue