mirror of
https://github.com/Elecast2/EntityTrackerFixer.git
synced 2024-11-25 19:35:13 +01:00
ignore item frames
This commit is contained in:
parent
8c1e2600d2
commit
5ef9921fd0
@ -14,6 +14,7 @@ import net.minecraft.server.v1_14_R1.MinecraftServer;
|
|||||||
import net.minecraft.server.v1_14_R1.WorldServer;
|
import net.minecraft.server.v1_14_R1.WorldServer;
|
||||||
import net.minecraft.server.v1_14_R1.PlayerChunkMap.EntityTracker;
|
import net.minecraft.server.v1_14_R1.PlayerChunkMap.EntityTracker;
|
||||||
import net.minecraft.server.v1_14_R1.EntityEnderDragon;
|
import net.minecraft.server.v1_14_R1.EntityEnderDragon;
|
||||||
|
import net.minecraft.server.v1_14_R1.EntityItemFrame;
|
||||||
import net.minemora.entitytrackerfixer.EntityTrackerFixer;
|
import net.minemora.entitytrackerfixer.EntityTrackerFixer;
|
||||||
import net.minemora.entitytrackerfixer.config.ConfigMain;
|
import net.minemora.entitytrackerfixer.config.ConfigMain;
|
||||||
import net.minemora.entitytrackerfixer.util.ReflectionUtils;
|
import net.minemora.entitytrackerfixer.util.ReflectionUtils;
|
||||||
@ -61,7 +62,7 @@ public class UntrackerTask extends BukkitRunnable {
|
|||||||
try {
|
try {
|
||||||
for(EntityTracker et : cps.playerChunkMap.trackedEntities.values()) {
|
for(EntityTracker et : cps.playerChunkMap.trackedEntities.values()) {
|
||||||
net.minecraft.server.v1_14_R1.Entity nmsEnt = (net.minecraft.server.v1_14_R1.Entity) trackerField.get(et);
|
net.minecraft.server.v1_14_R1.Entity nmsEnt = (net.minecraft.server.v1_14_R1.Entity) trackerField.get(et);
|
||||||
if(nmsEnt instanceof EntityPlayer || nmsEnt instanceof EntityEnderDragon) {
|
if(nmsEnt instanceof EntityPlayer || nmsEnt instanceof EntityItemFrame || nmsEnt instanceof EntityEnderDragon) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(nmsEnt.getBukkitEntity().getCustomName() != null) {
|
if(nmsEnt.getBukkitEntity().getCustomName() != null) {
|
||||||
|
@ -8,6 +8,7 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.craftbukkit.v1_15_R1.CraftWorld;
|
import org.bukkit.craftbukkit.v1_15_R1.CraftWorld;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_15_R1.EntityItemFrame;
|
||||||
import net.minecraft.server.v1_15_R1.ChunkProviderServer;
|
import net.minecraft.server.v1_15_R1.ChunkProviderServer;
|
||||||
import net.minecraft.server.v1_15_R1.EntityEnderDragon;
|
import net.minecraft.server.v1_15_R1.EntityEnderDragon;
|
||||||
import net.minecraft.server.v1_15_R1.EntityPlayer;
|
import net.minecraft.server.v1_15_R1.EntityPlayer;
|
||||||
@ -59,7 +60,7 @@ public class UntrackerTask extends BukkitRunnable {
|
|||||||
try {
|
try {
|
||||||
for(EntityTracker et : cps.playerChunkMap.trackedEntities.values()) {
|
for(EntityTracker et : cps.playerChunkMap.trackedEntities.values()) {
|
||||||
net.minecraft.server.v1_15_R1.Entity nmsEnt = (net.minecraft.server.v1_15_R1.Entity) trackerField.get(et);
|
net.minecraft.server.v1_15_R1.Entity nmsEnt = (net.minecraft.server.v1_15_R1.Entity) trackerField.get(et);
|
||||||
if(nmsEnt instanceof EntityPlayer || nmsEnt instanceof EntityEnderDragon) {
|
if(nmsEnt instanceof EntityPlayer || nmsEnt instanceof EntityItemFrame || nmsEnt instanceof EntityEnderDragon) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(nmsEnt.getBukkitEntity().getCustomName() != null) {
|
if(nmsEnt.getBukkitEntity().getCustomName() != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user