-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #299 from RedstoneTools/dev
Release 2.0.0
- Loading branch information
Showing
79 changed files
with
1,572 additions
and
1,040 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...ols/redstone/redstonetools/features/arguments/serializers/ColoredBlockTypeSerializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package tools.redstone.redstonetools.features.arguments.serializers; | ||
|
||
import tools.redstone.redstonetools.utils.ColoredBlockType; | ||
|
||
public class ColoredBlockTypeSerializer extends EnumSerializer<ColoredBlockType> { | ||
private static final ColoredBlockTypeSerializer INSTANCE = new ColoredBlockTypeSerializer(); | ||
|
||
private ColoredBlockTypeSerializer() { | ||
super(ColoredBlockType.class); | ||
} | ||
|
||
public static ColoredBlockTypeSerializer coloredBlockType() { | ||
return INSTANCE; | ||
} | ||
} |
3 changes: 1 addition & 2 deletions
3
...atures/arguments/DirectionSerializer.java → ...ents/serializers/DirectionSerializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...in/java/tools/redstone/redstonetools/features/arguments/serializers/NumberSerializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package tools.redstone.redstonetools.features.arguments.serializers; | ||
|
||
import tools.redstone.redstonetools.utils.NumberArg; | ||
|
||
import java.util.Optional; | ||
|
||
public class NumberSerializer extends IntLikeSerializer<NumberArg> { | ||
private static final NumberSerializer INSTANCE = new NumberSerializer(null,null); | ||
|
||
public static NumberSerializer numberArg(){ | ||
return INSTANCE; | ||
} | ||
|
||
public static NumberSerializer numberArg(NumberArg min) { | ||
return new NumberSerializer(min, null); | ||
} | ||
|
||
public static NumberSerializer numberArg(NumberArg min, NumberArg max) { | ||
return new NumberSerializer(min, max); | ||
} | ||
|
||
private NumberSerializer(NumberArg min, NumberArg max){ | ||
super(NumberArg.class,min, max); | ||
} | ||
|
||
@Override | ||
protected Optional<NumberArg> tryParseOptional(String string, int radix) { | ||
try { | ||
return Optional.of(new NumberArg(string, radix)); | ||
} catch (NumberFormatException ignored) { | ||
return Optional.empty(); | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...va/tools/redstone/redstonetools/features/arguments/serializers/SignalBlockSerializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package tools.redstone.redstonetools.features.arguments.serializers; | ||
|
||
import tools.redstone.redstonetools.utils.SignalBlock; | ||
|
||
public class SignalBlockSerializer extends EnumSerializer<SignalBlock> { | ||
private static final SignalBlockSerializer INSTANCE = new SignalBlockSerializer(); | ||
|
||
private SignalBlockSerializer() { | ||
super(SignalBlock.class); | ||
} | ||
|
||
public static SignalBlockSerializer signalBlock() { | ||
return INSTANCE; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.