Rewrote all the logic, encoding, etc for player/npc rendering masks (Animations, force movements, etc.)
Groundwork for modular 578 support has now been laid (at least in regards to render masks) Introduced an improved and more accurate API for using force movement (the old API is still around, all of its methods marked as deprecated) Converted a couple example cases to using the new force movement API just as a proof of concept Added a method to tick/time conversion methods to convert between client cycles and ticks Added all authentically-named buffer read/write methods to the buffer class
This commit is contained in:
@@ -9,7 +9,6 @@ import core.game.node.entity.player.Player;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.node.scenery.Scenery;
|
||||
import core.game.system.task.Pulse;
|
||||
import core.game.world.update.flag.player.FaceLocationFlag;
|
||||
import core.net.packet.PacketRepository;
|
||||
import core.net.packet.context.InteractionOptionContext;
|
||||
import core.net.packet.out.InteractionOption;
|
||||
@@ -145,7 +144,7 @@ public class InteractPlugin {
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
try {
|
||||
player.faceLocation(FaceLocationFlag.getFaceLocation(player, node));
|
||||
player.faceLocation(node.getFaceLocation(player.getLocation()));
|
||||
if (player.getLocks().isInteractionLocked() || player.getZoneMonitor().interact(node, option)) {
|
||||
return true;
|
||||
}
|
||||
@@ -181,7 +180,7 @@ public class InteractPlugin {
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
try {
|
||||
player.faceLocation(FaceLocationFlag.getFaceLocation(player, node));
|
||||
player.faceLocation(node.getFaceLocation(player.getLocation()));
|
||||
if (player.getLocks().isInteractionLocked() || player.getZoneMonitor().interact(node, option)) {
|
||||
return true;
|
||||
}
|
||||
@@ -344,4 +343,4 @@ public class InteractPlugin {
|
||||
this.initialized = initialized;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import core.tools.Log;
|
||||
import core.tools.SystemLogger;
|
||||
import core.game.system.task.Pulse;
|
||||
import core.game.world.map.Location;
|
||||
import core.game.world.update.flag.player.FaceLocationFlag;
|
||||
import core.plugin.Plugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -175,7 +174,7 @@ public abstract class UseWithHandler implements Plugin<Object> {
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
event.getPlayer().dispatch(new UseWithEvent(event.getUsed().getId(), event.getUsedWith().getId()));
|
||||
event.getPlayer().faceLocation(FaceLocationFlag.getFaceLocation(event.getPlayer(), event.getUsedWith()));
|
||||
event.getPlayer().faceLocation(event.getUsedWith().getFaceLocation(event.getPlayer().getLocation()));
|
||||
boolean handled = false;
|
||||
Item used = (Item) event.getUsed();
|
||||
for (UseWithHandler h : handlers) {
|
||||
@@ -273,4 +272,4 @@ public abstract class UseWithHandler implements Plugin<Object> {
|
||||
public boolean isDynamic() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user