-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*Changed how datapack is synced S2C: Before, sent raw NBT through network. Now: 1. converts NBT to SNBT; 2. uses Java's Deflater to compress the SNBT; 3. converts the compressed SNBT to byte array; 4. sends the byte array over network; 5. Reverses this using java's Inflater on the client. This reduces the raw NBT network packet from aprox. 4KB to ~0.9KB. This was done in attempt to fix packet size issue with Velocity plugin, but also in general the player connection packet has the potential to get really massive really quickly depending on the datapack. -Removed version checking between client and server. This was done in an attempt to make this compatible with Velocity plugin, which tends to get upset if we use regular Minecraft's connection packets. *Changed MutableIntFlag to be implemented further up in the hierarchy (MutableWorldProperties). Added relevant casting checks. This is an attempt to fix bugs caused when other mods want to make 'dummy world properties' that don't respect the world properties hierarchy nor the client/server divide. +Incremented version.
- Loading branch information
1 parent
bf44102
commit c16acb5
Showing
12 changed files
with
108 additions
and
50 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
10 changes: 10 additions & 0 deletions
10
src/main/java/com/github/clevernucleus/dataattributes/mixin/MutableWorldPropertiesMixin.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 com.github.clevernucleus.dataattributes.mixin; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
import com.github.clevernucleus.dataattributes.mutable.MutableIntFlag; | ||
|
||
import net.minecraft.world.MutableWorldProperties; | ||
|
||
@Mixin(MutableWorldProperties.class) | ||
public interface MutableWorldPropertiesMixin extends MutableIntFlag {} |
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
4 changes: 2 additions & 2 deletions
4
src/main/java/com/github/clevernucleus/dataattributes/mutable/MutableIntFlag.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,6 +1,6 @@ | ||
package com.github.clevernucleus.dataattributes.mutable; | ||
|
||
public interface MutableIntFlag { | ||
void setUpdateFlag(int flag); | ||
int getUpdateFlag(); | ||
default void setUpdateFlag(int flag) {} | ||
default int getUpdateFlag() { return 0; } | ||
} |
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