Migrate the Carpet codebase to Mojang Mappings
This commit is contained in:
346 files changed
+8353
-8492
No files matched your search
@@ -2,11 +2,11 @@ package carpet.mixins;
|
||||
|
||||
import carpet.logging.LoggerRegistry;
|
||||
import carpet.logging.logHelpers.TrajectoryLogHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.FallingBlockEntity;
|
||||
import net.minecraft.entity.projectile.ProjectileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.item.FallingBlockEntity;
|
||||
import net.minecraft.world.entity.projectile.Projectile;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
@@ -16,12 +16,12 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
public abstract class FallingBlockEntityMixin extends Entity
|
||||
{
|
||||
private TrajectoryLogHelper logHelper;
|
||||
public FallingBlockEntityMixin(EntityType<?> entityType_1, World world_1) { super(entityType_1, world_1); }
|
||||
public FallingBlockEntityMixin(EntityType<?> entityType_1, Level world_1) { super(entityType_1, world_1); }
|
||||
|
||||
@Inject(method = "<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V", at = @At("RETURN"))
|
||||
private void addLogger(EntityType<? extends ProjectileEntity> entityType_1, World world_1, CallbackInfo ci)
|
||||
@Inject(method = "<init>(Lnet/minecraft/world/entity/EntityType;Lnet/minecraft/world/level/Level;)V", at = @At("RETURN"))
|
||||
private void addLogger(EntityType<? extends Projectile> entityType_1, Level world_1, CallbackInfo ci)
|
||||
{
|
||||
if (LoggerRegistry.__fallingBlocks && !world_1.isClient)
|
||||
if (LoggerRegistry.__fallingBlocks && !world_1.isClientSide)
|
||||
logHelper = new TrajectoryLogHelper("fallingBlocks");
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public abstract class FallingBlockEntityMixin extends Entity
|
||||
private void tickCheck(CallbackInfo ci)
|
||||
{
|
||||
if (LoggerRegistry.__fallingBlocks && logHelper != null)
|
||||
logHelper.onTick(getX(), getY(), getZ(), getVelocity());
|
||||
logHelper.onTick(getX(), getY(), getZ(), getDeltaMovement());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user