Merge branch 'master' into 1.15
This commit is contained in:
commit
45b4bbcd99
5 files changed
+40
-4
No files matched your search
@@ -246,6 +246,12 @@ public class EntityPlayerActionPack
|
||||
break;
|
||||
}
|
||||
}
|
||||
ItemStack handItem = player.getStackInHand(hand);
|
||||
ActionResult result =player.interactionManager.interactItem(player, player.getServerWorld(), handItem, hand);
|
||||
if (result == ActionResult.SUCCESS)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
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.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)
|
||||
public abstract class ThrownEnderpearlEntity_fakePlayersMixin extends ThrownItemEntity
|
||||
{
|
||||
public ThrownEnderpearlEntity_fakePlayersMixin(EntityType<? extends ThrownItemEntity> entityType_1, World world_1)
|
||||
{
|
||||
super(entityType_1, world_1);
|
||||
}
|
||||
|
||||
@Redirect(method = "onCollision", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/network/ClientConnection;isOpen()Z"
|
||||
))
|
||||
private boolean isConnectionGood(ClientConnection clientConnection)
|
||||
{
|
||||
return clientConnection.isOpen() || getOwner() instanceof EntityPlayerMPFake;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import net.minecraft.client.network.packet.EntityPositionS2CPacket;
|
||||
import net.minecraft.client.network.packet.EntitySetHeadYawS2CPacket;
|
||||
import net.minecraft.client.network.packet.PlayerListS2CPacket;
|
||||
import net.minecraft.entity.damage.DamageSource;
|
||||
import net.minecraft.entity.player.HungerManager;
|
||||
import net.minecraft.network.NetworkSide;
|
||||
import net.minecraft.text.TranslatableText;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
@@ -117,6 +118,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
|
||||
{
|
||||
super.onDeath(cause);
|
||||
setHealth(20);
|
||||
this.hungerManager = new HungerManager();
|
||||
kill();
|
||||
}
|
||||
}
|
||||
@@ -174,7 +174,7 @@ public class SpawnReporter
|
||||
}
|
||||
else
|
||||
{
|
||||
return new ArrayList<>();
|
||||
return printMobcapsForDimension(worldIn.dimension.getType(), true );
|
||||
}
|
||||
}
|
||||
EntityCategory creature_type = get_type_code_from_wool_code(under);
|
||||
@@ -197,9 +197,7 @@ public class SpawnReporter
|
||||
}
|
||||
else
|
||||
{
|
||||
return tracking_report(worldIn);
|
||||
//// TODO
|
||||
//return print_general_mobcaps(worldIn);
|
||||
return printMobcapsForDimension(worldIn.dimension.getType(), true );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user