This commit is contained in:
gnembon committed 2020-11-06 00:06:53 -04:00
1 parent 79dc85274d
commit 2cdea92da7
55 files changed
+453 -287

No files matched your search

+4 -3
View File
@@ -4,9 +4,10 @@ import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.class_5532; // TargetFinder
import net.minecraft.entity.EntityType;
import net.minecraft.entity.SpawnReason;
import net.minecraft.entity.ai.TargetFinder;
//import net.minecraft.entity.ai.TargetFinder;
import net.minecraft.entity.ai.goal.WanderAroundGoal;
import net.minecraft.entity.ai.pathing.NavigationType;
import net.minecraft.entity.mob.PathAwareEntity;
@@ -231,7 +232,7 @@ public class BlockInfo
for (int i=0; i<1000; i++)
{
Vec3d vec = TargetFinder.findTarget(creature, 10, 7);
Vec3d vec = class_5532.method_31510(creature, 10, 7); // TargetFinder.findTarget(creature, 10, 7);
if (vec == null)
{
continue;
@@ -251,7 +252,7 @@ public class BlockInfo
}
total_ticks += 3*i;
}
creature.remove();
creature.discard(); // discarded // remove(Entity.RemovalReason.field_26999); // 2nd option - DISCARDED
long total_time = (total_ticks)/1000/20;
return Messenger.s(String.format(" - Wander chance above: %.1f%%\n - Average standby above: %s",
(100.0F*success)/1000,
+1 -1
View File
@@ -39,7 +39,7 @@ public class MobAI
return currentTrackers.contains(type);
}
public static void clearTracking(EntityType etype)
public static void clearTracking(EntityType<? extends Entity> etype)
{
aiTrackers.remove(etype);
for(ServerWorld world : CarpetServer.minecraft_server.getWorlds() )
@@ -398,23 +398,23 @@ public class SpawnReporter
{
if (entity.hasVehicle())
{
entity.getVehicle().remove();
entity.getVehicle().discard();
}
if (entity.hasPassengers())
{
for (Entity e: entity.getPassengerList())
{
e.remove();
e.discard();
}
}
if (entity instanceof OcelotEntity)
{
for (Entity e: entity.getEntityWorld().getOtherEntities(entity, entity.getBoundingBox()))
{
e.remove();
e.discard();
}
}
entity.remove();
entity.discard();
}
// yeeted from SpawnHelper - temporary fix