-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for force-syncing default item component values
- Loading branch information
Showing
8 changed files
with
138 additions
and
2 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
18 changes: 18 additions & 0 deletions
18
polymer-core/src/main/java/eu/pb4/polymer/core/mixin/entity/EntityTrackerAccessor.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,18 @@ | ||
package eu.pb4.polymer.core.mixin.entity; | ||
|
||
import net.minecraft.server.network.EntityTrackerEntry; | ||
import net.minecraft.server.network.PlayerAssociatedNetworkHandler; | ||
import net.minecraft.server.world.ServerChunkLoadingManager; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
import java.util.Set; | ||
|
||
@Mixin(ServerChunkLoadingManager.EntityTracker.class) | ||
public interface EntityTrackerAccessor { | ||
@Accessor | ||
Set<PlayerAssociatedNetworkHandler> getListeners(); | ||
|
||
@Accessor | ||
EntityTrackerEntry getEntry(); | ||
} |
21 changes: 21 additions & 0 deletions
21
polymer-core/src/main/java/eu/pb4/polymer/core/mixin/item/ComponentChangesAccessor.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 eu.pb4.polymer.core.mixin.item; | ||
|
||
import it.unimi.dsi.fastutil.objects.Reference2ObjectMap; | ||
import net.minecraft.component.ComponentChanges; | ||
import net.minecraft.component.ComponentType; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
import java.util.Optional; | ||
|
||
@Mixin(ComponentChanges.class) | ||
public interface ComponentChangesAccessor { | ||
@Invoker("<init>") | ||
static ComponentChanges createComponentChanges(Reference2ObjectMap<ComponentType<?>, Optional<?>> changedComponents) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Accessor | ||
Reference2ObjectMap<ComponentType<?>, Optional<?>> getChangedComponents(); | ||
} |
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