forked from ChiselsAndBits/Chisels-and-Bits
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working on a storage engine which is version aware.
- Loading branch information
1 parent
09b650b
commit 6f52f0c
Showing
11 changed files
with
168 additions
and
6 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
10 changes: 10 additions & 0 deletions
10
Common/src/main/java/mod/chiselsandbits/storage/IStorageVersion.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,10 @@ | ||
package mod.chiselsandbits.storage; | ||
|
||
import mod.chiselsandbits.api.util.INBTSerializable; | ||
import net.minecraft.nbt.CompoundTag; | ||
|
||
public interface IStorageVersion extends INBTSerializable<CompoundTag> | ||
{ | ||
|
||
boolean matchesVersion(final CompoundTag tagToCheck); | ||
} |
43 changes: 43 additions & 0 deletions
43
Common/src/main/java/mod/chiselsandbits/storage/StorageEngine.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,43 @@ | ||
package mod.chiselsandbits.storage; | ||
|
||
import mod.chiselsandbits.api.util.INBTSerializable; | ||
import mod.chiselsandbits.api.util.IPacketBufferSerializable; | ||
import net.minecraft.nbt.CompoundTag; | ||
import net.minecraft.network.FriendlyByteBuf; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.LinkedList; | ||
|
||
public class StorageEngine implements IPacketBufferSerializable, INBTSerializable<CompoundTag> | ||
{ | ||
|
||
private final LinkedList<IStorageVersion> versions; | ||
|
||
public StorageEngine( | ||
|
||
) {} | ||
|
||
@Override | ||
public CompoundTag serializeNBT() | ||
{ | ||
return null; | ||
} | ||
|
||
@Override | ||
public void deserializeNBT(final CompoundTag nbt) | ||
{ | ||
|
||
} | ||
|
||
@Override | ||
public void serializeInto(final @NotNull FriendlyByteBuf packetBuffer) | ||
{ | ||
|
||
} | ||
|
||
@Override | ||
public void deserializeFrom(final @NotNull FriendlyByteBuf packetBuffer) | ||
{ | ||
|
||
} | ||
} |
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