refactor: consistent include paths in java/nbt

This commit is contained in:
Tropical
2026-03-30 15:47:05 -05:00
parent 44f6982e96
commit 0817878fe1
23 changed files with 53 additions and 52 deletions

View File

@@ -1,4 +1,4 @@
#include "Buffer.h"
#include "java/Buffer.h"
Buffer::Buffer(unsigned int capacity)
: m_capacity(capacity),

View File

@@ -1,7 +1,7 @@
#include "IntBuffer.h"
#include "FloatBuffer.h"
#include "ByteBuffer.h"
#include "java/IntBuffer.h"
#include "java/FloatBuffer.h"
#include "java/ByteBuffer.h"
ByteBuffer::ByteBuffer(unsigned int capacity) : Buffer(capacity) {
hasBackingArray = false;

View File

@@ -1,4 +1,4 @@
#include "Class.h"
#include "java/Class.h"
// 4J Stu - To ensure that other classes can get the _class object of it's
// superclass, we also need the BaseObject to have that member

View File

@@ -1,7 +1,7 @@
#include <cassert>
#include <cmath>
#include "Color.h"
#include "java/Color.h"
// Creates an opaque sRGB color with the specified red, green, and blue values
// in the range (0.0 - 1.0). Alpha is defaulted to 1.0. The actual color used in

View File

@@ -1,12 +1,12 @@
#include "FileFilter.h"
#include "File.h"
#include <chrono>
#include <filesystem>
#include "java/FileFilter.h"
#include "java/File.h"
#include "../../../Minecraft.World/ConsoleHelpers/PathHelper.h" // 4jcraft TODO
#include "../../../Minecraft.World/ConsoleHelpers/StringHelpers.h" // 4jcraft TODO
#include <chrono>
#include <filesystem>
const wchar_t File::pathSeparator = L'/';
const std::wstring File::pathRoot =

View File

@@ -1,4 +1,4 @@
#include "FloatBuffer.h"
#include "java/FloatBuffer.h"
// Allocates a new float buffer.
// The new buffer's position will be zero, its limit will be its capacity, and

View File

@@ -1,4 +1,4 @@
#include "InputOutputStream/BufferedOutputStream.h"
#include "java/InputOutputStream/BufferedOutputStream.h"
// Creates a new buffered output stream to write data to the specified
// underlying output stream with the specified buffer size. Parameters: out -

View File

@@ -1,4 +1,4 @@
#include "InputOutputStream/BufferedReader.h"
#include "java/InputOutputStream/BufferedReader.h"
// Creates a buffering character-input stream that uses a default-sized input
// buffer. Parameters: in - A Reader

View File

@@ -1,4 +1,4 @@
#include "InputOutputStream/InputOutputStream.h"
#include "java/InputOutputStream/InputOutputStream.h"
// Creates ByteArrayInputStream that uses buf as its buffer array. The initial
// value of pos is offset and the initial value of count is the minimum of

View File

@@ -1,4 +1,4 @@
#include "InputOutputStream/ByteArrayOutputStream.h"
#include "java/InputOutputStream/ByteArrayOutputStream.h"
// Creates a new byte array output stream. The buffer capacity is initially 32
// bytes, though its size increases if necessary.

View File

@@ -1,7 +1,8 @@
#include "InputOutputStream/DataInputStream.h"
#include <bit>
#include <cstdint>
#include "java/InputOutputStream/DataInputStream.h"
// Creates a DataInputStream that uses the specified underlying InputStream.
// Parameters:
// in - the specified input stream

View File

@@ -1,8 +1,8 @@
#include "InputOutputStream/DataOutputStream.h"
#include <bit>
#include <cstdint>
#include "java/InputOutputStream/DataOutputStream.h"
// Creates a new data output stream to write data to the specified underlying
// output stream. The counter written is set to zero. Parameters: out - the
// underlying output stream, to be saved for later use.

View File

@@ -1,6 +1,6 @@
#include "File.h"
#include "InputOutputStream/FileInputStream.h"
#include "java/File.h"
#include "java/InputOutputStream/FileInputStream.h"
#include <algorithm>
#include "../../../Minecraft.World/ConsoleHelpers/StringHelpers.h"

View File

@@ -1,8 +1,8 @@
#include "File.h"
#include "InputOutputStream/FileOutputStream.h"
#include "../../../Minecraft.World/ConsoleHelpers/ArrayWithLength.h" // 4jcraft TODO
#include "java/File.h"
#include "java/InputOutputStream/FileOutputStream.h"
// Creates a file output stream to write to the file represented by the
// specified File object. A new FileDescriptor object is created to represent
// this file connection. First, if there is a security manager, its checkWrite

View File

@@ -1,6 +1,6 @@
#include "File.h"
#include "InputOutputStream/InputOutputStream.h"
#include "InputOutputStream/InputStream.h"
#include "java/File.h"
#include "java/InputOutputStream/InputOutputStream.h"
#include "java/InputOutputStream/InputStream.h"
InputStream* InputStream::getResourceAsStream(const std::wstring& fileName) {
File file(fileName);

View File

@@ -1,7 +1,6 @@
#include "InputOutputStream/InputStream.h"
#include "InputOutputStream/DataInputStream.h"
#include "InputOutputStream/InputStreamReader.h"
#include "java/InputOutputStream/InputStream.h"
#include "java/InputOutputStream/DataInputStream.h"
#include "java/InputOutputStream/InputStreamReader.h"
// Creates an InputStreamReader that uses the default charset.
// Parameters:

View File

@@ -1,5 +1,4 @@
#include "IntBuffer.h"
#include "java/IntBuffer.h"
// Allocates a new int buffer.
// The new buffer's position will be zero, its limit will be its capacity, and

View File

@@ -1,4 +1,4 @@
#include "JavaMath.h"
#include "java/JavaMath.h"
#include <cmath>

View File

@@ -1,7 +1,8 @@
#include "Random.h"
#include <ctime>
#include <cstdint> // for int64_t
#include "System.h"
#include "java/System.h"
#include "java/Random.h"
Random::Random() {
// 4J - jave now uses the system nanosecond counter added to a

View File

@@ -1,10 +1,11 @@
#include "System.h"
#if defined(__linux__)
#include <sys/time.h>
#include <time.h>
#include <ctime>
#endif
#include "java/System.h"
template <class T>
void System::arraycopy(arrayWithLength<T> src, unsigned int srcPos,
arrayWithLength<T>* dst, unsigned int dstPos,