Use constants for a few magic numbers in rules
This commit is contained in:
9 files changed
+19
-17
No files matched your search
@@ -14,7 +14,7 @@ public abstract class StructureBlockEntity_limitsMixin
|
||||
{
|
||||
@ModifyConstant(
|
||||
method = "load",
|
||||
constant = @Constant(intValue = 48)
|
||||
constant = @Constant(intValue = StructureBlockEntity.MAX_SIZE_PER_AXIS)
|
||||
)
|
||||
private int positiveLimit(int original) {
|
||||
return CarpetSettings.structureBlockLimit;
|
||||
@@ -22,7 +22,7 @@ public abstract class StructureBlockEntity_limitsMixin
|
||||
|
||||
@ModifyConstant(
|
||||
method = "load",
|
||||
constant = @Constant(intValue = -48)
|
||||
constant = @Constant(intValue = -StructureBlockEntity.MAX_SIZE_PER_AXIS)
|
||||
)
|
||||
private int negativeLimit(int original) {
|
||||
return -CarpetSettings.structureBlockLimit;
|
||||
|
||||
Reference in new issue
Block a user