-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
src/main/java/com/blueweabo/mutecore/api/data/FirstTickEvent.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,4 @@ | ||
package com.blueweabo.mutecore.api.data; | ||
|
||
public class FirstTickEvent { | ||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/com/blueweabo/mutecore/api/data/PlayerUUID.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,35 @@ | ||
package com.blueweabo.mutecore.api.data; | ||
|
||
import java.util.UUID; | ||
|
||
import net.minecraft.nbt.NBTTagCompound; | ||
|
||
public class PlayerUUID implements WorldStateValidator { | ||
|
||
private UUID playerUUID; | ||
|
||
public PlayerUUID(UUID playerUUID) { | ||
this.playerUUID = playerUUID; | ||
} | ||
|
||
public UUID getPlayerUUID() { | ||
return playerUUID; | ||
} | ||
|
||
public void setPlayerUUID(UUID playerUUID) { | ||
this.playerUUID = playerUUID; | ||
} | ||
|
||
@Override | ||
public void save(NBTTagCompound nbt) { | ||
NBTTagCompound uuidNBT = new NBTTagCompound(); | ||
uuidNBT.setString("uuid", playerUUID.toString()); | ||
nbt.setTag("playerUUID", uuidNBT); | ||
} | ||
|
||
@Override | ||
public void load(NBTTagCompound nbt) { | ||
NBTTagCompound uuidNBT = nbt.getCompoundTag("playerUUID"); | ||
playerUUID = UUID.fromString(uuidNBT.getString("uuid")); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/blueweabo/mutecore/api/data/TickData.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,14 @@ | ||
package com.blueweabo.mutecore.api.data; | ||
|
||
public class TickData { | ||
|
||
private int tick; | ||
|
||
public int getTick() { | ||
return tick; | ||
} | ||
|
||
public void setTick(int tick) { | ||
this.tick = tick; | ||
} | ||
} |