generated from FabricMC/fabric-example-mod
-
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.
Simplified impl. of syncing command tags
- Loading branch information
Showing
10 changed files
with
84 additions
and
179 deletions.
There are no files selected for viewing
12 changes: 0 additions & 12 deletions
12
src/main/java/io/github/eggohito/eggolib/component/EggolibComponents.java
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
src/main/java/io/github/eggohito/eggolib/component/entity/IMiscComponent.java
This file was deleted.
Oops, something went wrong.
93 changes: 0 additions & 93 deletions
93
src/main/java/io/github/eggohito/eggolib/component/entity/MiscComponent.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
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
21 changes: 21 additions & 0 deletions
21
src/main/java/io/github/eggohito/eggolib/data/EggolibDataHandlers.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,21 @@ | ||
package io.github.eggohito.eggolib.data; | ||
|
||
import net.minecraft.entity.data.TrackedDataHandler; | ||
import net.minecraft.entity.data.TrackedDataHandlerRegistry; | ||
import net.minecraft.network.PacketByteBuf; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
public class EggolibDataHandlers { | ||
|
||
public static final TrackedDataHandler<Set<String>> STRING_SET = TrackedDataHandler.of( | ||
(buf, strings) -> buf.writeCollection(strings, PacketByteBuf::writeString), | ||
buf -> buf.readCollection(value -> new HashSet<>(), PacketByteBuf::readString) | ||
); | ||
|
||
public static void register() { | ||
TrackedDataHandlerRegistry.register(STRING_SET); | ||
} | ||
|
||
} |
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
78 changes: 59 additions & 19 deletions
78
src/main/java/io/github/eggohito/eggolib/mixin/EntityMixin.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
23 changes: 0 additions & 23 deletions
23
src/main/java/io/github/eggohito/eggolib/registry/factory/EggolibEntityComponents.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