-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Registry sync v2 - API #167
base: feature/registry-sync-v2/main
Are you sure you want to change the base?
Changes from all commits
ec8fbe7
58f6a52
2b0538b
aa17b4a
69b1df9
10653d6
7f88334
285e4a9
40eff6f
612a85d
1f29898
f5d879f
134b16d
3664dd9
a8f6652
fd13568
719d9cb
fc96dd5
d405761
4cf43de
8b54985
79f8851
22fc4f2
4954eae
ea04cdb
3866502
32e5666
8b323b7
d5e2551
3a74c69
f6a4d3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,23 +15,24 @@ | |
* limitations under the License. | ||
*/ | ||
|
||
package net.legacyfabric.fabric.mixin.registry.sync; | ||
package net.legacyfabric.fabric.mixin.networking.versioned; | ||
|
||
import org.jetbrains.annotations.Nullable; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
import net.minecraft.nbt.NbtCompound; | ||
import net.minecraft.util.PacketByteBuf; | ||
|
||
import net.legacyfabric.fabric.impl.registry.sync.compat.PacketByteBufCompat; | ||
import net.legacyfabric.fabric.impl.networking.PacketByteBufExtension; | ||
|
||
@Mixin(PacketByteBuf.class) | ||
public abstract class PacketByteBufMixin implements PacketByteBufCompat { | ||
public abstract class PacketByteBufMixin implements PacketByteBufExtension { | ||
@Shadow | ||
public abstract PacketByteBuf writeNbtCompound(NbtCompound par1); | ||
public abstract PacketByteBuf writeNbtCompound(@Nullable NbtCompound nbt); | ||
|
||
@Override | ||
public PacketByteBuf writeCompound(NbtCompound compound) { | ||
return this.writeNbtCompound(compound); | ||
public PacketByteBuf writeCompound(NbtCompound tag) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tag -> nbt / compound |
||
return writeNbtCompound(tag); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,24 +15,24 @@ | |
* limitations under the License. | ||
*/ | ||
|
||
package net.legacyfabric.fabric.mixin.registry.sync; | ||
package net.legacyfabric.fabric.mixin.networking.versioned; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
import net.minecraft.nbt.NbtCompound; | ||
import net.minecraft.util.PacketByteBuf; | ||
|
||
import net.legacyfabric.fabric.impl.registry.sync.compat.PacketByteBufCompat; | ||
import net.legacyfabric.fabric.impl.networking.PacketByteBufExtension; | ||
|
||
@Mixin(PacketByteBuf.class) | ||
public abstract class PacketByteBufMixin implements PacketByteBufCompat { | ||
public abstract class PacketByteBufMixin implements PacketByteBufExtension { | ||
@Shadow | ||
public abstract void writeNbtCompound(NbtCompound nbt); | ||
public abstract void writeNbtCompound(NbtCompound par1); | ||
|
||
@Override | ||
public PacketByteBuf writeCompound(NbtCompound compound) { | ||
this.writeNbtCompound(compound); | ||
public PacketByteBuf writeCompound(NbtCompound tag) { | ||
this.writeNbtCompound(tag); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tag -> nbt / compound |
||
return (PacketByteBuf) (Object) this; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,24 +15,24 @@ | |
* limitations under the License. | ||
*/ | ||
|
||
package net.legacyfabric.fabric.mixin.registry.sync; | ||
package net.legacyfabric.fabric.mixin.networking.versioned; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
import net.minecraft.nbt.NbtCompound; | ||
import net.minecraft.util.PacketByteBuf; | ||
|
||
import net.legacyfabric.fabric.impl.registry.sync.compat.PacketByteBufCompat; | ||
import net.legacyfabric.fabric.impl.networking.PacketByteBufExtension; | ||
|
||
@Mixin(PacketByteBuf.class) | ||
public abstract class PacketByteBufMixin implements PacketByteBufCompat { | ||
public abstract class PacketByteBufMixin implements PacketByteBufExtension { | ||
@Shadow | ||
public abstract void writeNbtCompound(NbtCompound nbt); | ||
public abstract void writeNbtCompound(NbtCompound par1); | ||
|
||
@Override | ||
public PacketByteBuf writeCompound(NbtCompound compound) { | ||
this.writeNbtCompound(compound); | ||
public PacketByteBuf writeCompound(NbtCompound tag) { | ||
this.writeNbtCompound(tag); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
return (PacketByteBuf) (Object) this; | ||
} | ||
} |
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused - any reason why we need this? items, blocks and such have their own format for translation keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used later in the registry implementation to set the translation key automatically, which was something already done in registry sync v1 previously.