Refactor mixin methods: streamline parameter formatting in DataTrackerMixin and PlayerEntityMixin

This commit is contained in:
Chipperfluff 2025-12-21 12:31:35 +01:00
parent 64fc1eea2d
commit 613965f989
2 changed files with 2 additions and 11 deletions

View File

@ -16,10 +16,7 @@ public abstract class DataTrackerMixin {
protected abstract <T> DataTracker.Entry<T> getEntry(TrackedData<T> data);
@Inject(method = "get", at = @At("HEAD"), cancellable = true)
private <T> void chipi$nullSafeGet(
TrackedData<T> data,
CallbackInfoReturnable<T> cir
) {
private <T> void chipi$nullSafeGet(TrackedData<T> data, CallbackInfoReturnable<T> cir) {
DataTracker.Entry<T> entry = this.getEntry(data);
if (entry == null) {

View File

@ -15,13 +15,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
public abstract class PlayerEntityMixin {
@Inject(method = "<init>", at = @At("TAIL"))
private void chipi$initTrackedData(
World world,
BlockPos pos,
float yaw,
GameProfile profile,
CallbackInfo ci
) {
private void chipi$initTrackedData(World world, BlockPos pos, float yaw, GameProfile profile, CallbackInfo ci) {
PlayerEntity self = (PlayerEntity)(Object)this;
DataTracker tracker = self.getDataTracker();