Merge branch 'master' into 1.17
# Conflicts: # src/main/java/carpet/script/utils/SnoopyCommandSource.java # src/main/java/carpet/utils/WoolTool.java
This commit is contained in:
commit
b80b555781
9 files changed
+147
-12
No files matched your search
@@ -37,13 +37,13 @@ public class SnoopyCommandSource extends ServerCommandSource
|
||||
private final Text[] error;
|
||||
private final List<Text> chatOutput;
|
||||
|
||||
public SnoopyCommandSource(ServerCommandSource original, Vec3d pos, Text[] error, List<Text> chatOutput)
|
||||
public SnoopyCommandSource(ServerCommandSource original, Text[] error, List<Text> chatOutput)
|
||||
{
|
||||
super(CommandOutput.DUMMY, pos, Vec2f.ZERO, original.getWorld(), CarpetSettings.runPermissionLevel,
|
||||
super(CommandOutput.DUMMY, original.getPosition(), original.getRotation(), original.getWorld(), CarpetSettings.runPermissionLevel,
|
||||
original.getName(), original.getDisplayName(), original.getMinecraftServer(), original.getEntity(), false,
|
||||
(ctx, succ, res) -> { }, EntityAnchorArgumentType.EntityAnchor.FEET);
|
||||
this.output = CommandOutput.DUMMY;
|
||||
this.position = pos;
|
||||
this.position = original.getPosition();
|
||||
this.world = original.getWorld();
|
||||
this.level = CarpetSettings.runPermissionLevel;
|
||||
this.simpleName = original.getName();
|
||||
@@ -52,7 +52,7 @@ public class SnoopyCommandSource extends ServerCommandSource
|
||||
this.entity = original.getEntity();
|
||||
this.resultConsumer = (ctx, succ, res) -> { };
|
||||
this.entityAnchor = original.getEntityAnchor();
|
||||
this.rotation = Vec2f.ZERO;
|
||||
this.rotation = original.getRotation();
|
||||
this.error = error;
|
||||
this.chatOutput = chatOutput;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public class SnoopyCommandSource extends ServerCommandSource
|
||||
this.entity = player;
|
||||
this.resultConsumer = (ctx, succ, res) -> { };
|
||||
this.entityAnchor = EntityAnchorArgumentType.EntityAnchor.FEET;
|
||||
this.rotation = Vec2f.ZERO;
|
||||
this.rotation = player.getRotationClient(); // not a client call really
|
||||
this.error = error;
|
||||
this.chatOutput = output;
|
||||
}
|
||||
@@ -158,6 +158,7 @@ public class SnoopyCommandSource extends ServerCommandSource
|
||||
return new SnoopyCommandSource(output, position, rotation, world, level, simpleName, name, server, entity, resultConsumer, entityAnchor, error, chatOutput);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerCommandSource withLookingAt(Vec3d position)
|
||||
{
|
||||
Vec3d vec3d = this.entityAnchor.positionAt(this);
|
||||
|
||||
Reference in new issue
Block a user