Fixed path finder crap in UtilEnt
Cleaned up unused code in OutfitRaveSuit Fixed eclipse bug for NotificationManager Removed christmas/Sleigh columns.
This commit is contained in:
parent
625d517058
commit
ea034812b9
|
@ -3,6 +3,7 @@ package mineplex.core.common.util;
|
|||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.server.v1_7_R4.EntityBat;
|
||||
import net.minecraft.server.v1_7_R4.EntityCreature;
|
||||
|
@ -41,6 +42,8 @@ public class UtilEnt
|
|||
private static Field _goalSelector;
|
||||
private static Field _targetSelector;
|
||||
private static Field _bsRestrictionGoal;
|
||||
private static Field _pathfinderBList;
|
||||
private static Field _pathfinderCList;
|
||||
|
||||
public static HashMap<Entity, String> GetEntityNames()
|
||||
{
|
||||
|
@ -97,6 +100,18 @@ public class UtilEnt
|
|||
_targetSelector.setAccessible(true);
|
||||
}
|
||||
|
||||
if (_pathfinderBList == null)
|
||||
{
|
||||
_pathfinderBList = PathfinderGoalSelector.class.getDeclaredField("b");
|
||||
_pathfinderBList.setAccessible(true);
|
||||
}
|
||||
|
||||
if (_pathfinderCList == null)
|
||||
{
|
||||
_pathfinderCList = PathfinderGoalSelector.class.getDeclaredField("c");
|
||||
_pathfinderCList.setAccessible(true);
|
||||
}
|
||||
|
||||
if (entity instanceof CraftCreature)
|
||||
{
|
||||
EntityCreature creature = ((CraftCreature)entity).getHandle();
|
||||
|
@ -116,13 +131,12 @@ public class UtilEnt
|
|||
|
||||
creature.Vegetated = true;
|
||||
creature.Silent = mute;
|
||||
PathfinderGoalSelector goalSelector = new PathfinderGoalSelector(((CraftWorld)entity.getWorld()).getHandle().methodProfiler);
|
||||
|
||||
goalSelector.a(7, new PathfinderGoalLookAtPlayer(creature, EntityHuman.class, 6.0F));
|
||||
goalSelector.a(7, new PathfinderGoalRandomLookaround(creature));
|
||||
((List)_pathfinderBList.get(((PathfinderGoalSelector)_goalSelector.get(creature)))).clear();
|
||||
((List)_pathfinderCList.get(((PathfinderGoalSelector)_goalSelector.get(creature)))).clear();
|
||||
|
||||
_goalSelector.set(creature, goalSelector);
|
||||
_targetSelector.set(creature, new PathfinderGoalSelector(((CraftWorld)entity.getWorld()).getHandle().methodProfiler));
|
||||
((List)_pathfinderBList.get(((PathfinderGoalSelector)_targetSelector.get(creature)))).clear();
|
||||
((List)_pathfinderCList.get(((PathfinderGoalSelector)_targetSelector.get(creature)))).clear();
|
||||
}
|
||||
|
||||
if (((CraftEntity)entity).getHandle() instanceof EntityBat)
|
||||
|
|
|
@ -147,20 +147,4 @@ public class OutfitRaveSuit extends OutfitGadget
|
|||
stack.setItemMeta(meta);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//@EventHandler
|
||||
public void debug(PlayerCommandPreprocessEvent event)
|
||||
{
|
||||
if (event.getMessage().contains("on"))
|
||||
{
|
||||
this.Enable(event.getPlayer());
|
||||
event.setCancelled(true);
|
||||
}
|
||||
if (event.getMessage().contains("off"))
|
||||
{
|
||||
this.Disable(event.getPlayer());
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,5 +10,7 @@
|
|||
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Core.Common"/>
|
||||
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/commons-io-2.4.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.ServerData"/>
|
||||
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/jooq-3.4.2.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Database"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package mineplex.hub.notification;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -67,7 +68,7 @@ public class NotificationManager extends MiniPlugin
|
|||
notifications.addAll(notifier.getNotifications(player));
|
||||
}
|
||||
|
||||
notifications.sort(COMPARATOR);
|
||||
Collections.sort(notifications, COMPARATOR);
|
||||
|
||||
return notifications;
|
||||
}
|
||||
|
|
|
@ -121,12 +121,6 @@ public class Sleigh
|
|||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), 1, 3));
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), 2, 3));
|
||||
|
||||
//Corners
|
||||
SleighEnts.add(new SleighPart(4, 44, 7, loc.clone(), -2, -3));
|
||||
SleighEnts.add(new SleighPart(4, 44, 7, loc.clone(), 2, -3));
|
||||
SleighEnts.add(new SleighPart(4, 44, 7, loc.clone(), -2, 0));
|
||||
SleighEnts.add(new SleighPart(4, 44, 7, loc.clone(), 2, 0));
|
||||
|
||||
//Santa
|
||||
SleighPart santa = new SleighPart(3, 0, 0, loc.clone(), 0, 1);
|
||||
santa.AddSanta();
|
||||
|
|
Loading…
Reference in New Issue