Fixed UUID mismatch in multiplayer screen texture cleanup (ClientMod.java)
S2C_STOP_SCREEN and S2C_SCREEN were using mcc.player.getUuid() for remove() instead of pcOwner.NativeImage, NativeImageBackedTexture, Identifier).vmScreenTextureNI.close() was called instead of vmScreenTextureNIBT.close() in S2C_SCREEN.Fixed component loss when placing last PC case from stack (ItemPCCase.java, ItemPCCaseSidepanel.java)
decrement(1) was called before reading NBT data. When count == 1, the stack became EMPTY and getNbt() returned null, causing permanent loss of all PC components (motherboard, CPU, RAM, HDD, ISO).Fixed server crash on missing inventory item (MainMod.java)
removeStck() threw RuntimeException when an item was not found, crashing the entire server.LOGGER.error() and graceful return.contains() check and removeStck() execution.Fixed ClassCastException exploit in C2S_ORDER (MainMod.java)
readItemStack().getItem() is actually an OrderableItem. A malicious client could send any item, causing a server crash.instanceof OrderableItem check with logging of invalid packets.S2C_SYNC_ORDER handler in ClientMod.java.Fixed IllegalArgumentException in C2S_ADD_CPU / C2S_ADD_RAM (MainMod.java)
dividedBy or mb values did not match expected constants, lookingFor remained null, causing new ItemStack(null) → server crash.lookingFor != null guard before creating ItemStack.Fixed HDD removal ignoring NBT (MainMod.java)
removeStck() matched only by Item type, not NBT. If a player had multiple HDDs with different VHD files, the wrong disk could be removed.removeStck() to prefer exact NBT match before falling back to type-only match.Fixed VM always created with only 1 CPU (GuiPCEditing.java)
Math.min(1, ...) in the "create new VM" branch always returned 1, regardless of host CPU count or player settings. The "modify existing" branch already used correct Math.max(1, ...).Math.max(1, ...) — VM now gets the correct number of CPUs.Fixed ConcurrentModificationException in ServerMixin (ServerMixin.java)
MainMod.orders.remove() was called during for-each iteration over HashMap.values(), guaranteeing a crash every time an order completed.Fixed NPE when sending packets to disconnected players (ServerMixin.java)
playerManager.getPlayer() could return null if a player logged out. Calling .getWorld() or ServerPlayNetworking.send(null, ...) caused NPE.getPlayer() usages.Fixed deadlock in insertISO (GuiPCEditing.java)
wait() without while loop and without timeout — if notify() was called before wait(), the thread hung forever.while (condition) { lock.wait(5000); } pattern using a shared ClientMod.VM_TURNING_ON_LOCK.GuiPCEditing instance had a different monitor object than the one notify() was called on.Fixed busy-wait burning 100% CPU in turnOffPC (GuiPCEditing.java)
while(ClientMod.vmTurningOn) {} was an infinite spin-loop.Thread.sleep(50) inside the loop. Also added volatile to vmTurningOn so the thread actually sees state changes.Fixed Timer thread leak in GuiFocus (GuiFocus.java)
Timer was created every time GuiFocus opened, but cancel() was only called on NullPointerException (singleplayer). In multiplayer, timers leaked indefinitely.removed().Fixed NPE-based control flow in singleplayer (GuiFocus.java)
getCurrentServerEntry().address throws NPE in singleplayer. The code used catch(NullPointerException) as control flow.== null check.Fixed resource leak in VBoxManage (VBoxManage.java)
BufferedReader and InputStream were not closed in finally, leaking file descriptors on exceptions.try-with-resources.Fixed FileWriter not closed on exception (ClientMod.java)
increaseVHDNum() opened a FileWriter without try-with-resources or finally. On any exception, the file handle leaked.try-with-resources.Fixed Unpooled.buffer() leaks across all packet handlers
new PacketByteBuf(Unpooled.buffer()) was used in ClientMod.java, GuiPCEditing.java, ServerMixin.java, and PlayerManagerMixin.java instead of PacketByteBufs.create().Fixed regex bug in hard drive selection (GuiCreateHarddrive.java)
split(" | ") treated " | " as a regex (space OR space), effectively equivalent to split(" ").indexOf(" | ") + substring() for literal matching.Fixed iron ingot overpayment loss (EntityDeliveryChest.java)
is.increment() was called on an already-empty ItemStack (after decrement()), causing the excess ingots to be permanently lost.decrement(), then creating a new ItemStack for the refund and using player.getInventory().offerOrDrop().Fixed matrix stack imbalance on exception (HeldItemMixin.java)
matrices.push() in HEAD and matrices.pop() in TAIL were not atomic. An exception between them left the stack unbalanced.try-finally to guarantee matrices.pop().Fixed NBT key inconsistency (EntityPC.java, ItemPCCase.java, ItemPCCaseSidepanel.java)
x64, MoboInstalled, GPUInstalled, RAMSlot0, VHDName, ISOName) than readCustomDataFromNbt / writeCustomDataToNbt (X64, MotherboardInstalled, GpuInstalled, GbRamSlot0, HardDriveFileName, IsoFileName).writeCustomDataToNbt format. Added backward compatibility in constructor to read both old and new keys.Transition to VBoxManage CLI (VBox CLI)
VBoxManage.java wrapper that calls the VBoxManage command-line tool directly.createVm, modifyVm, startVm, powerOffVmstorageAttach, addStorageController, removeStorageControllermountMedium, unmountMediumputScancodes, putMouseEventtakeScreenshotgetVmState, vmExists, discardSavedStateexecuteSilent() for optional operations that may fail on newer VBox versions (e.g., --accelerate2dvideo in VBox 7.x).testConnection()) and version detection (getVersion()).Support for VirtualBox 7.x and newer
vboxwebsrv (the SOAP web service). The mod now works with any VirtualBox version that provides VBoxManage.showvminfo --machinereadable output for medium attachment state, compatible with VBox 7.x output format.--accelerate2dvideo is now handled silently (ignored if unsupported) instead of crashing.Added volatile to all cross-thread shared state (ClientMod.java)
vmTurnedOn, vmTurningOn, vmTurningOff, vmUpdateThread, vmTextureBytes, vmTextureBytesSize.Added synchronized to texture byte transfers (VMRunnable.java + ClientMod.java)
vmTextureBytes / vmTextureBytesSize were updated in one thread and read in another without any synchronization, risking torn reads.VM_TEXTURE_LOCK with proper synchronized blocks on both write (VM thread) and read (render thread) sides.Added synchronized to tablet texture streaming (TabletOS.java)
byteArrayInputStream was written by the tablet renderer thread and read by the main render thread without synchronization.TEXTURE_SYNC lock with local copy pattern.Throttled isMediumEjected() polling (GuiPCEditing.java)
VBoxManage showvminfo every frame (~60 times/second), spawning a new OS process each time.Throttled tablet renderer (GameloopMixin.java)
while(true) loop had no Thread.sleep(), pinning a CPU core at 100%.Thread.sleep(33) for ~30 FPS cap.ConcurrentModificationException swallowing with proper logging.Reduced S2C_SYNC_ORDER network spam (ServerMixin.java)
lastSyncedStatus and only sends the packet when the status actually changes.Proper use of PacketByteBufs.create() throughout
Added SLF4J/Log4j logging (MainMod.java)
RuntimeException server crashes with LOGGER.error() for inventory desync events.Backward compatibility for old NBT saves
EntityPC constructor.
This project adds working computers as virtual machines in Minecraft, this is a fan made port of original VM computers by Delta2Force