mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-20 20:22:35 +00:00
Update buildscript & spotlessApply
This commit is contained in:
1 parent
e4329e2b8f
commit
8683a345c3
818 files changed
+51123
-49403
No files matched your search
@@ -6,72 +6,72 @@ import binnie.extratrees.api.IPattern;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class Layout implements ILayout {
|
||||
protected IPattern pattern;
|
||||
protected boolean inverted;
|
||||
protected IPattern pattern;
|
||||
protected boolean inverted;
|
||||
|
||||
private Layout(IPattern pattern, boolean inverted) {
|
||||
this.pattern = pattern;
|
||||
this.inverted = inverted;
|
||||
}
|
||||
private Layout(IPattern pattern, boolean inverted) {
|
||||
this.pattern = pattern;
|
||||
this.inverted = inverted;
|
||||
}
|
||||
|
||||
private Layout(IPattern pattern) {
|
||||
this(pattern, false);
|
||||
}
|
||||
private Layout(IPattern pattern) {
|
||||
this(pattern, false);
|
||||
}
|
||||
|
||||
public static ILayout get(IPattern pattern, boolean inverted) {
|
||||
return new Layout(pattern, inverted);
|
||||
}
|
||||
public static ILayout get(IPattern pattern, boolean inverted) {
|
||||
return new Layout(pattern, inverted);
|
||||
}
|
||||
|
||||
public static ILayout get(IPattern pattern) {
|
||||
return new Layout(pattern, false);
|
||||
}
|
||||
public static ILayout get(IPattern pattern) {
|
||||
return new Layout(pattern, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPattern getPattern() {
|
||||
return pattern;
|
||||
}
|
||||
@Override
|
||||
public IPattern getPattern() {
|
||||
return pattern;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInverted() {
|
||||
return inverted;
|
||||
}
|
||||
@Override
|
||||
public boolean isInverted() {
|
||||
return inverted;
|
||||
}
|
||||
|
||||
ILayout newLayout(ILayout newLayout) {
|
||||
return new Layout(newLayout.getPattern(), inverted ^ newLayout.isInverted());
|
||||
}
|
||||
ILayout newLayout(ILayout newLayout) {
|
||||
return new Layout(newLayout.getPattern(), inverted ^ newLayout.isInverted());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ILayout rotateRight() {
|
||||
return rotateLeft().rotateLeft().rotateLeft();
|
||||
}
|
||||
@Override
|
||||
public ILayout rotateRight() {
|
||||
return rotateLeft().rotateLeft().rotateLeft();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ILayout rotateLeft() {
|
||||
return newLayout(pattern.getRotation());
|
||||
}
|
||||
@Override
|
||||
public ILayout rotateLeft() {
|
||||
return newLayout(pattern.getRotation());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ILayout flipHorizontal() {
|
||||
return newLayout(pattern.getHorizontalFlip());
|
||||
}
|
||||
@Override
|
||||
public ILayout flipHorizontal() {
|
||||
return newLayout(pattern.getHorizontalFlip());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ILayout flipVertical() {
|
||||
return newLayout(pattern.getHorizontalFlip().rotateLeft().rotateLeft());
|
||||
}
|
||||
@Override
|
||||
public ILayout flipVertical() {
|
||||
return newLayout(pattern.getHorizontalFlip().rotateLeft().rotateLeft());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getPrimaryIcon(IDesignSystem system) {
|
||||
return inverted ? pattern.getSecondaryIcon(system) : pattern.getPrimaryIcon(system);
|
||||
}
|
||||
@Override
|
||||
public IIcon getPrimaryIcon(IDesignSystem system) {
|
||||
return inverted ? pattern.getSecondaryIcon(system) : pattern.getPrimaryIcon(system);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getSecondaryIcon(IDesignSystem system) {
|
||||
return inverted ? pattern.getPrimaryIcon(system) : pattern.getSecondaryIcon(system);
|
||||
}
|
||||
@Override
|
||||
public IIcon getSecondaryIcon(IDesignSystem system) {
|
||||
return inverted ? pattern.getPrimaryIcon(system) : pattern.getSecondaryIcon(system);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ILayout invert() {
|
||||
return new Layout(pattern, !inverted);
|
||||
}
|
||||
@Override
|
||||
public ILayout invert() {
|
||||
return new Layout(pattern, !inverted);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user