Skip to content

Commit 3693a55

Browse files
committed
ExecuteCommand.java updated for 1.15.2 forge.
Signed-off-by: Pavel Erokhin (MairwunNx) <MairwunNx@gmail.com>
1 parent 8abf827 commit 3693a55

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

src/main/java/com/mairwunnx/projectessentials/core/vanilla/commands/ExecuteCommand.java

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -162,40 +162,40 @@ private static void checkPermissions(CommandSource source) {
162162
}
163163

164164
private static ArgumentBuilder<CommandSource, ?> makeStoreSubcommand(LiteralCommandNode<CommandSource> parent, LiteralArgumentBuilder<CommandSource> literal, boolean storingResult) {
165-
literal.then(Commands.literal("score").then(Commands.argument("targets", ScoreHolderArgument.scoreHolders()).suggests(ScoreHolderArgument.SUGGEST_ENTITY_SELECTOR).then(Commands.argument("objective", ObjectiveArgument.objective()).redirect(parent, (p_198412_1_) -> {
166-
return storeIntoScore(p_198412_1_.getSource(), ScoreHolderArgument.getScoreHolder(p_198412_1_, "targets"), ObjectiveArgument.getObjective(p_198412_1_, "objective"), storingResult);
165+
literal.then(Commands.literal("score").then(Commands.argument("targets", ScoreHolderArgument.scoreHolders()).suggests(ScoreHolderArgument.SUGGEST_ENTITY_SELECTOR).then(Commands.argument("objective", ObjectiveArgument.objective()).redirect(parent, (p_201468_1_) -> {
166+
return storeIntoScore(p_201468_1_.getSource(), ScoreHolderArgument.getScoreHolder(p_201468_1_, "targets"), ObjectiveArgument.getObjective(p_201468_1_, "objective"), storingResult);
167167
}))));
168-
literal.then(Commands.literal("bossbar").then(Commands.argument("id", ResourceLocationArgument.resourceLocation()).suggests(BossBarCommand.SUGGESTIONS_PROVIDER).then(Commands.literal("value").redirect(parent, (p_201468_1_) -> {
169-
return storeIntoBossbar(p_201468_1_.getSource(), BossBarCommand.getBossbar(p_201468_1_), true, storingResult);
170-
})).then(Commands.literal("max").redirect(parent, (p_201457_1_) -> {
171-
return storeIntoBossbar(p_201457_1_.getSource(), BossBarCommand.getBossbar(p_201457_1_), false, storingResult);
168+
literal.then(Commands.literal("bossbar").then(Commands.argument("id", ResourceLocationArgument.resourceLocation()).suggests(BossBarCommand.SUGGESTIONS_PROVIDER).then(Commands.literal("value").redirect(parent, (p_201457_1_) -> {
169+
return storeIntoBossbar(p_201457_1_.getSource(), BossBarCommand.getBossbar(p_201457_1_), true, storingResult);
170+
})).then(Commands.literal("max").redirect(parent, (p_229795_1_) -> {
171+
return storeIntoBossbar(p_229795_1_.getSource(), BossBarCommand.getBossbar(p_229795_1_), false, storingResult);
172172
}))));
173173

174174
for (DataCommand.IDataProvider datacommand$idataprovider : DataCommand.field_218955_b) {
175-
datacommand$idataprovider.createArgument(literal, (p_198408_3_) -> {
176-
return p_198408_3_.then(Commands.argument("path", NBTPathArgument.nbtPath()).then(Commands.literal("int").then(Commands.argument("scale", DoubleArgumentType.doubleArg()).redirect(parent, (p_201106_2_) -> {
177-
return storeIntoNBT(p_201106_2_.getSource(), datacommand$idataprovider.createAccessor(p_201106_2_), NBTPathArgument.getNBTPath(p_201106_2_, "path"), (p_198379_1_) -> {
178-
return new IntNBT((int) ((double) p_198379_1_ * DoubleArgumentType.getDouble(p_201106_2_, "scale")));
175+
datacommand$idataprovider.createArgument(literal, (p_229765_3_) -> {
176+
return p_229765_3_.then(Commands.argument("path", NBTPathArgument.nbtPath()).then(Commands.literal("int").then(Commands.argument("scale", DoubleArgumentType.doubleArg()).redirect(parent, (p_229801_2_) -> {
177+
return storeIntoNBT(p_229801_2_.getSource(), datacommand$idataprovider.createAccessor(p_229801_2_), NBTPathArgument.getNBTPath(p_229801_2_, "path"), (p_229800_1_) -> {
178+
return IntNBT.func_229692_a_((int) ((double) p_229800_1_ * DoubleArgumentType.getDouble(p_229801_2_, "scale")));
179179
}, storingResult);
180-
}))).then(Commands.literal("float").then(Commands.argument("scale", DoubleArgumentType.doubleArg()).redirect(parent, (p_198375_2_) -> {
181-
return storeIntoNBT(p_198375_2_.getSource(), datacommand$idataprovider.createAccessor(p_198375_2_), NBTPathArgument.getNBTPath(p_198375_2_, "path"), (p_198410_1_) -> {
182-
return new FloatNBT((float) ((double) p_198410_1_ * DoubleArgumentType.getDouble(p_198375_2_, "scale")));
180+
}))).then(Commands.literal("float").then(Commands.argument("scale", DoubleArgumentType.doubleArg()).redirect(parent, (p_229798_2_) -> {
181+
return storeIntoNBT(p_229798_2_.getSource(), datacommand$idataprovider.createAccessor(p_229798_2_), NBTPathArgument.getNBTPath(p_229798_2_, "path"), (p_229797_1_) -> {
182+
return FloatNBT.func_229689_a_((float) ((double) p_229797_1_ * DoubleArgumentType.getDouble(p_229798_2_, "scale")));
183183
}, storingResult);
184-
}))).then(Commands.literal("short").then(Commands.argument("scale", DoubleArgumentType.doubleArg()).redirect(parent, (p_198390_2_) -> {
185-
return storeIntoNBT(p_198390_2_.getSource(), datacommand$idataprovider.createAccessor(p_198390_2_), NBTPathArgument.getNBTPath(p_198390_2_, "path"), (p_198386_1_) -> {
186-
return new ShortNBT((short) ((int) ((double) p_198386_1_ * DoubleArgumentType.getDouble(p_198390_2_, "scale"))));
184+
}))).then(Commands.literal("short").then(Commands.argument("scale", DoubleArgumentType.doubleArg()).redirect(parent, (p_229794_2_) -> {
185+
return storeIntoNBT(p_229794_2_.getSource(), datacommand$idataprovider.createAccessor(p_229794_2_), NBTPathArgument.getNBTPath(p_229794_2_, "path"), (p_229792_1_) -> {
186+
return ShortNBT.func_229701_a_((short) ((int) ((double) p_229792_1_ * DoubleArgumentType.getDouble(p_229794_2_, "scale"))));
187187
}, storingResult);
188-
}))).then(Commands.literal("long").then(Commands.argument("scale", DoubleArgumentType.doubleArg()).redirect(parent, (p_198420_2_) -> {
189-
return storeIntoNBT(p_198420_2_.getSource(), datacommand$idataprovider.createAccessor(p_198420_2_), NBTPathArgument.getNBTPath(p_198420_2_, "path"), (p_198414_1_) -> {
190-
return new LongNBT((long) ((double) p_198414_1_ * DoubleArgumentType.getDouble(p_198420_2_, "scale")));
188+
}))).then(Commands.literal("long").then(Commands.argument("scale", DoubleArgumentType.doubleArg()).redirect(parent, (p_229790_2_) -> {
189+
return storeIntoNBT(p_229790_2_.getSource(), datacommand$idataprovider.createAccessor(p_229790_2_), NBTPathArgument.getNBTPath(p_229790_2_, "path"), (p_229788_1_) -> {
190+
return LongNBT.func_229698_a_((long) ((double) p_229788_1_ * DoubleArgumentType.getDouble(p_229790_2_, "scale")));
191191
}, storingResult);
192-
}))).then(Commands.literal("double").then(Commands.argument("scale", DoubleArgumentType.doubleArg()).redirect(parent, (p_198367_2_) -> {
193-
return storeIntoNBT(p_198367_2_.getSource(), datacommand$idataprovider.createAccessor(p_198367_2_), NBTPathArgument.getNBTPath(p_198367_2_, "path"), (p_198393_1_) -> {
194-
return new DoubleNBT((double) p_198393_1_ * DoubleArgumentType.getDouble(p_198367_2_, "scale"));
192+
}))).then(Commands.literal("double").then(Commands.argument("scale", DoubleArgumentType.doubleArg()).redirect(parent, (p_229784_2_) -> {
193+
return storeIntoNBT(p_229784_2_.getSource(), datacommand$idataprovider.createAccessor(p_229784_2_), NBTPathArgument.getNBTPath(p_229784_2_, "path"), (p_229781_1_) -> {
194+
return DoubleNBT.func_229684_a_((double) p_229781_1_ * DoubleArgumentType.getDouble(p_229784_2_, "scale"));
195195
}, storingResult);
196-
}))).then(Commands.literal("byte").then(Commands.argument("scale", DoubleArgumentType.doubleArg()).redirect(parent, (p_198405_2_) -> {
197-
return storeIntoNBT(p_198405_2_.getSource(), datacommand$idataprovider.createAccessor(p_198405_2_), NBTPathArgument.getNBTPath(p_198405_2_, "path"), (p_198418_1_) -> {
198-
return new ByteNBT((byte) ((int) ((double) p_198418_1_ * DoubleArgumentType.getDouble(p_198405_2_, "scale"))));
196+
}))).then(Commands.literal("byte").then(Commands.argument("scale", DoubleArgumentType.doubleArg()).redirect(parent, (p_229774_2_) -> {
197+
return storeIntoNBT(p_229774_2_.getSource(), datacommand$idataprovider.createAccessor(p_229774_2_), NBTPathArgument.getNBTPath(p_229774_2_, "path"), (p_229762_1_) -> {
198+
return ByteNBT.func_229671_a_((byte) ((int) ((double) p_229762_1_ * DoubleArgumentType.getDouble(p_229774_2_, "scale"))));
199199
}, storingResult);
200200
}))));
201201
});

0 commit comments

Comments
 (0)