-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix previous release not working on Fabric (#806)
Forward port of #805
- Loading branch information
Showing
26 changed files
with
383 additions
and
275 deletions.
There are no files selected for viewing
24 changes: 0 additions & 24 deletions
24
common/src/main/java/fr/rakambda/fallingtree/common/tree/BreakTreeResult.java
This file was deleted.
Oops, something went wrong.
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
16 changes: 16 additions & 0 deletions
16
common/src/main/java/fr/rakambda/fallingtree/common/tree/SuccessResult.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,16 @@ | ||
package fr.rakambda.fallingtree.common.tree; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
|
||
@RequiredArgsConstructor | ||
public enum SuccessResult implements IBreakAttemptResult { | ||
CANCEL(true), | ||
DO_NOT_CANCEL(false); | ||
|
||
private final boolean cancel; | ||
|
||
@Override | ||
public boolean shouldCancel() { | ||
return cancel; | ||
} | ||
} |
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
7 changes: 6 additions & 1 deletion
7
common/src/main/java/fr/rakambda/fallingtree/common/tree/TreePart.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 |
---|---|---|
@@ -1,11 +1,16 @@ | ||
package fr.rakambda.fallingtree.common.tree; | ||
|
||
import fr.rakambda.fallingtree.common.wrapper.IBlockEntity; | ||
import fr.rakambda.fallingtree.common.wrapper.IBlockPos; | ||
import fr.rakambda.fallingtree.common.wrapper.IBlockState; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public record TreePart( | ||
@NotNull IBlockPos blockPos, | ||
@NotNull TreePartType treePartType, | ||
int sequence | ||
int sequence, | ||
@NotNull IBlockState blockState, | ||
@Nullable IBlockEntity blockEntity | ||
){ | ||
} |
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
4 changes: 3 additions & 1 deletion
4
common/src/main/java/fr/rakambda/fallingtree/common/tree/breaking/ITreeBreakingHandler.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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
package fr.rakambda.fallingtree.common.tree.breaking; | ||
|
||
import fr.rakambda.fallingtree.common.tree.IBreakAttemptResult; | ||
import fr.rakambda.fallingtree.common.tree.Tree; | ||
import fr.rakambda.fallingtree.common.wrapper.IPlayer; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public interface ITreeBreakingHandler{ | ||
boolean breakTree(@NotNull IPlayer player, @NotNull Tree tree) throws BreakTreeTooBigException; | ||
@NotNull | ||
IBreakAttemptResult breakTree(boolean isCancellable, @NotNull IPlayer player, @NotNull Tree tree) throws BreakTreeTooBigException; | ||
} |
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.