Removed client side ray trace methods for getting block (oops).
@@ -5,13 +5,10 @@ import com.ferreusveritas.dynamictrees.trees.Species;
import com.ferreusveritas.dynamictrees.worldgen.JoCode;
import com.mojang.brigadier.builder.ArgumentBuilder;
import com.mojang.brigadier.context.CommandContext;
-import mcp.mobius.waila.overlay.RayTracing;
import net.minecraft.command.CommandSource;
import net.minecraft.command.Commands;
import net.minecraft.command.arguments.Vec3Argument;
-import net.minecraft.entity.LivingEntity;
import net.minecraft.util.math.BlockPos;
-import net.minecraft.util.math.Vec3d;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.server.ServerWorld;
@@ -24,16 +21,8 @@ public final class GetTreeCommand extends SubCommand {
@Override
protected int execute(CommandContext<CommandSource> context) {
- if (context.getSource().getEntity() instanceof LivingEntity) {
- // Get block player is looking at.
- RayTracing.INSTANCE.fire();
- Vec3d target = RayTracing.INSTANCE.getTarget().getHitVec();
-
- this.getTree(context, context.getSource().getWorld(), new BlockPos(target.getX(), target.getY(), target.getZ()));
- } else {
+ // TODO: Find way to get block player is looking at both server-side and client-side.
this.sendMessage(context, new TranslationTextComponent("commands.dynamictrees.gettree.invalidargs"));
- }
-
return 1;
}
