mappings back to normal

This commit is contained in:
gnembon committed 2020-03-20 01:47:18 -03:00
1 parent eb6b15ffc3
commit 130ef80d30
23 files changed
+52 -49

No files matched your search

@@ -1,14 +1,14 @@
package carpet.mixins;
import carpet.utils.RandomTools;
import net.minecraft.entity.FireworkEntity;
import net.minecraft.entity.projectile.FireworkRocketEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import java.util.Random;
@Mixin(FireworkEntity.class)
@Mixin(FireworkRocketEntity.class)
public class FireworkEntity_extremeMixin
{
@Redirect(method = "<init>(Lnet/minecraft/world/World;DDDLnet/minecraft/item/ItemStack;)V", expect = 2, at = @At(
@@ -1,7 +1,7 @@
package carpet.mixins;
import carpet.utils.RandomTools;
import net.minecraft.entity.projectile.FishingBobberEntity;
import net.minecraft.entity.FishingBobberEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@@ -28,7 +28,7 @@ public abstract class GuardianEntityMixin extends HostileEntity
{
ElderGuardianEntity elderGuardian = new ElderGuardianEntity(EntityType.ELDER_GUARDIAN ,this.world);
elderGuardian.refreshPositionAndAngles(this.getX(), this.getY(), this.getZ(), this.yaw, this.pitch);
elderGuardian.initialize(this.world ,this.world.getLocalDifficulty(elderGuardian.getSenseCenterPos()), SpawnType.CONVERSION, (EntityData)null, (CompoundTag)null);
elderGuardian.initialize(this.world ,this.world.getLocalDifficulty(elderGuardian.getBlockPos()), SpawnType.CONVERSION, (EntityData)null, (CompoundTag)null);
elderGuardian.setAiDisabled(this.isAiDisabled());
if (this.hasCustomName())
@@ -50,10 +50,10 @@ public abstract class PistonBlock_movableTEMixin extends FacingBlock
block != Blocks.SPAWNER;
}
@Redirect(method = "isMovable", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/Block;method_26161()Z")) // hasBLockENtity
@Redirect(method = "isMovable", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/Block;hasBlockEntity()Z")) // hasBLockENtity
private static boolean ifHasBlockEntity(Block block)
{
if (!block.method_26161()) // hasBlockENtity
if (!block.hasBlockEntity())
{
return false;
}
@@ -76,7 +76,7 @@ public abstract class PistonBlock_movableTEMixin extends FacingBlock
for (int i = 0; i < list_1.size(); ++i)
{
BlockPos blockpos = list_1.get(i);
BlockEntity blockEntity = (list_2.get(i).getBlock().method_26161()) ? world_1.getBlockEntity(blockpos) : null; //hasBLockENtity
BlockEntity blockEntity = (list_2.get(i).getBlock().hasBlockEntity()) ? world_1.getBlockEntity(blockpos) : null;
list1_BlockEntities.get().add(blockEntity);
if (blockEntity != null)
{
@@ -4,6 +4,7 @@ import carpet.logging.LoggerRegistry;
import carpet.logging.logHelpers.TrajectoryLogHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.projectile.PersistentProjectileEntity;
import net.minecraft.entity.projectile.ProjectileEntity;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.hit.EntityHitResult;
@@ -14,7 +15,7 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(ProjectileEntity.class)
@Mixin(PersistentProjectileEntity.class)
public abstract class ProjectileEntityMixin extends Entity
{
private TrajectoryLogHelper logHelper;
@@ -1,6 +1,7 @@
package carpet.mixins;
import carpet.utils.RandomTools;
import net.minecraft.entity.projectile.PersistentProjectileEntity;
import net.minecraft.entity.projectile.ProjectileEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -8,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
import java.util.Random;
@Mixin(ProjectileEntity.class)
@Mixin(PersistentProjectileEntity.class)
public class ProjectileEntity_extremeMixin
{
// calculates damage
@@ -1,14 +1,14 @@
package carpet.mixins;
import carpet.utils.RandomTools;
import net.minecraft.entity.projectile.Projectile;
import net.minecraft.entity.projectile.ProjectileEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import java.util.Random;
@Mixin(Projectile.class)
@Mixin(ProjectileEntity.class)
public class Projectile_extremeMixin
{
@Redirect(method = "setVelocity", expect = 3, at = @At(
@@ -103,9 +103,9 @@ public abstract class RedstoneWireBlockMixin implements RedstoneWireBlockInterfa
BlockState blockState_3 = world_1.getBlockState(blockPos_2);
int_3 = this.increasePower(int_3, blockState_3);
BlockPos blockPos_3 = blockPos_1.up();
if (blockState_3.method_26212(world_1, blockPos_2) && !world_1.getBlockState(blockPos_3).method_26212(world_1, blockPos_3)) {
if (blockState_3.isSolidBlock(world_1, blockPos_2) && !world_1.getBlockState(blockPos_3).isSolidBlock(world_1, blockPos_3)) {
int_3 = this.increasePower(int_3, world_1.getBlockState(blockPos_2.up()));
} else if (!blockState_3.method_26212(world_1, blockPos_2)) { //isSimpleFUllBLock
} else if (!blockState_3.isSolidBlock(world_1, blockPos_2)) { //isSimpleFUllBLock
int_3 = this.increasePower(int_3, world_1.getBlockState(blockPos_2.down()));
}
}
@@ -107,7 +107,7 @@ public class SpawnHelperMixin
world.dimension.getType(),
(MobEntity) entity_1,
entity_1.getType().getCategory(),
entity_1.getSenseCenterPos());
entity_1.getBlockPos());
}
if (!SpawnReporter.mock_spawns)
return world.spawnEntity(entity_1);
@@ -2,15 +2,15 @@ package carpet.mixins;
import carpet.patches.EntityPlayerMPFake;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.thrown.ThrownEnderpearlEntity;
import net.minecraft.entity.thrown.ThrownItemEntity;
import net.minecraft.entity.projectile.thrown.EnderPearlEntity;
import net.minecraft.entity.projectile.thrown.ThrownItemEntity;
import net.minecraft.network.ClientConnection;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(ThrownEnderpearlEntity.class)
@Mixin(EnderPearlEntity.class)
public abstract class ThrownEnderpearlEntity_fakePlayersMixin extends ThrownItemEntity
{
public ThrownEnderpearlEntity_fakePlayersMixin(EntityType<? extends ThrownItemEntity> entityType_1, World world_1)
@@ -5,7 +5,7 @@ import carpet.logging.logHelpers.TrajectoryLogHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.projectile.ProjectileEntity;
import net.minecraft.entity.thrown.ThrownEntity;
import net.minecraft.entity.projectile.thrown.ThrownEntity;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -1,7 +1,7 @@
package carpet.mixins;
import carpet.utils.RandomTools;
import net.minecraft.entity.thrown.ThrownEntity;
import net.minecraft.entity.projectile.thrown.ThrownEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@@ -140,7 +140,7 @@ public abstract class VillagerEntity_aiMixin extends AbstractTraderEntity
{
List<PointOfInterest> list_1 = ((ServerWorld) getEntityWorld()).getPointOfInterestStorage().getInCircle(
type -> type == PointOfInterestType.HOME,
getSenseCenterPos(),
getBlockPos(),
48, PointOfInterestStorage.OccupationStatus.ANY).collect(Collectors.toList());
for (PointOfInterest poi : list_1)
{
@@ -55,6 +55,8 @@ public abstract class World_movableTEMixin implements WorldInterface
@Shadow public abstract void updateComparators(BlockPos pos, Block block);
@Shadow public abstract boolean setBlockState(BlockPos pos, BlockState state, int flags);
/**
* @author 2No2Name
*/
@@ -122,11 +124,10 @@ public abstract class World_movableTEMixin implements WorldInterface
if ((int_1 & 16) == 0)
{
int int_2 = int_1 & -2;
blockState_2.method_26198((net.minecraft.world.IWorld) this, blockPos_1, int_2); // method_11637
blockState_1.method_26183((net.minecraft.world.IWorld) this, blockPos_1, int_2); //updateNEtihbourStates
blockState_1.method_26198((net.minecraft.world.IWorld) this, blockPos_1, int_2);
blockState_2.prepare((net.minecraft.world.IWorld) this, blockPos_1, int_2);
blockState_1.updateNeighbors((net.minecraft.world.IWorld) this, blockPos_1, int_2);
blockState_1.prepare((net.minecraft.world.IWorld) this, blockPos_1, int_2);
}
this.onBlockChanged(blockPos_1, blockState_2, blockState_3);
}
return true;