forked from ploppyperson/StackMob-5
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3bce5b7
commit 56c879a
Showing
5 changed files
with
13 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 2 additions & 17 deletions
19
src/main/java/uk/antiperson/stackmob/packets/NMSHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,15 @@ | ||
package uk.antiperson.stackmob.packets; | ||
|
||
import net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata; | ||
import net.minecraft.network.syncher.DataWatcher; | ||
import net.minecraft.network.syncher.DataWatcherObject; | ||
import net.minecraft.network.syncher.DataWatcherRegistry; | ||
import net.minecraft.world.entity.EntityLiving; | ||
import net.minecraft.world.entity.boss.wither.EntityWither; | ||
import org.bukkit.craftbukkit.v1_20_R2.entity.CraftLivingEntity; | ||
import org.bukkit.craftbukkit.v1_20_R2.entity.CraftPlayer; | ||
import org.bukkit.entity.Entity; | ||
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftLivingEntity; | ||
import org.bukkit.entity.LivingEntity; | ||
import org.bukkit.entity.Player; | ||
|
||
import java.util.Collections; | ||
|
||
public class NMSHelper { | ||
|
||
public static void sendVisibilityPacket(Player player, Entity entity, boolean tagVisible) { | ||
DataWatcher.b<Boolean> af = DataWatcher.b.a(new DataWatcherObject<>(3, DataWatcherRegistry.k), tagVisible); | ||
PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(entity.getEntityId(), Collections.singletonList(af)); | ||
((CraftPlayer) player).getHandle().c.a(packetPlayOutEntityMetadata); | ||
} | ||
|
||
public static boolean canCreateWitherRose(LivingEntity entity) { | ||
EntityLiving entityLiving = ((CraftLivingEntity) entity).getHandle(); | ||
// EntityLiving#getKillCredit | ||
return entityLiving.eK() instanceof EntityWither; | ||
return entityLiving.eL() instanceof EntityWither; | ||
} | ||
} |
75 changes: 0 additions & 75 deletions
75
src/main/java/uk/antiperson/stackmob/packets/NmsFakeArmorStand.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters