Merge branch 'master' into 1.15
This commit is contained in:
commit
1e1b5513fa
5 files changed
+38
-3
No files matched your search
@@ -0,0 +1,34 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.settings.CarpetSettings;
|
||||
import net.minecraft.client.network.packet.EntityAttachS2CPacket;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.mob.MobEntity;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.server.network.EntityTrackerEntry;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
@Mixin(EntityTrackerEntry.class)
|
||||
public class EntityTrackerEntry_leashFixMixin
|
||||
{
|
||||
@Shadow @Final private Entity entity;
|
||||
|
||||
@Inject(method = "sendPackets", at = @At("RETURN"))
|
||||
private void sendLeashPackets(Consumer<Packet<?>> consumer_1, CallbackInfo ci)
|
||||
{
|
||||
if (CarpetSettings.leadFix)
|
||||
{
|
||||
if (entity instanceof MobEntity)
|
||||
{
|
||||
consumer_1.accept( new EntityAttachS2CPacket(entity, ((MobEntity) entity).getHoldingEntity()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -229,7 +229,7 @@ public class BlockInfo
|
||||
}
|
||||
creature.remove();
|
||||
long total_time = (total_ticks)/1000/20;
|
||||
return Messenger.s(String.format(" - Wander chance above: %.1f%%%%\n - Average standby above: %s",
|
||||
return Messenger.s(String.format(" - Wander chance above: %.1f%%\n - Average standby above: %s",
|
||||
(100.0F*success)/1000,
|
||||
((total_time>5000)?"INFINITY":(Long.toString(total_time)+" s"))
|
||||
));
|
||||
|
||||
@@ -30,9 +30,9 @@ public class DistanceCalculator
|
||||
res.add(Messenger.c("w Distance between ",
|
||||
Messenger.tp("c",pos1),"w and ",
|
||||
Messenger.tp("c",pos2),"w :"));
|
||||
res.add(Messenger.c("w - Manhattan: ", String.format("wb %.1f", manhattan)));
|
||||
res.add(Messenger.c("w - Spherical: ", String.format("wb %.2f", spherical)));
|
||||
res.add(Messenger.c("w - Cylindrical: ", String.format("wb %.2f", cylindrical)));
|
||||
res.add(Messenger.c("w - Manhattan: ", String.format("wb %.1f", manhattan)));
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ public class EntityInfo
|
||||
public static List<BaseText> entityInfo(Entity e, World source_world)
|
||||
{
|
||||
List<BaseText> lst = new ArrayList<>();
|
||||
lst.add(Messenger.s("w Use /data get entity command"));
|
||||
lst.add(Messenger.c("r Use /data get entity command"));
|
||||
return lst;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user