Jump to content

"problem downloading the file deobfuscation_data_missing.zip automatically"


Recommended Posts

I'm getting a launch failure that seems to be due to missing version information somewhere. Of course, I'll give the full log below so you can verify, but the lines of interest seem to be:

2013-06-05 19:50:58 [iNFO] [ForgeModLoader] Forge Mod Loader version missing.missing.missing.missing for Minecraft missing loading
...
2013-06-05 19:50:58 [iNFO] [ForgeModLoader] Downloading file http://files.minecraftforge.net/fmllibs/deobfuscation_data_missing.zip
2013-06-05 19:50:58 [sEVERE] [ForgeModLoader] There was a problem downloading the file deobfuscation_data_missing.zip automatically. Perhaps you have an environment without internet access. You will need to download the file manually or restart and let it try again
...

 

I tried to to bypass the problem by download that file directly and was not surprised when it didn't exist on the server. I backed up to fmllibs and grabbed deobfuscation_data_1.5.2.zip, as that matches the version of my minecraft client, and renamed it to deobfuscation_data_missing.zip to match the filename that FML is looking for and tried again, not knowing that FML checked checksums....

2013-06-05 20:05:35 [sEVERE] [ForgeModLoader] Error details
java.lang.RuntimeException: The file deobfuscation_data_missing.zip was found in your lib directory and has an invalid checksum 446e55cd986582c70fcf12cb27bc00114c5adfd9 (expecting deadbeef) - it is unlikely to be the correct download, please move it out of the way and try again.

No surprise there, given that the checksum is checked.

 

I tried googling those log entries to see if there was perhaps something I was doing wrong and came up empty. However, I did notice that every other log I've looked at pulls a version of deobfuscation_data_*.zip that matches the minecraft version being used, confirming my suspicion that FML tries to decide what version of the file to grab by the minecraft version, and since mine just gets "missing", it obviously fails. I have tried grabbing a clean minecraft.jar via the official launcher just in case, still no luck.

 

I'm using:

Magic Launcher 1.1.4

Minecraft Forge 7.8.0.723-universal for Minecraft 1.5.2

 

While troubleshooting, I've only added Forge to the mod list in Magic Launcher, and disabled all my external mods.

 

 

Log from before downloading:

 

2013-06-05 19:50:58 [iNFO] [ForgeModLoader] Forge Mod Loader version missing.missing.missing.missing for Minecraft missing loading

2013-06-05 19:50:58 [iNFO] [ForgeModLoader] Java is OpenJDK 64-Bit Server VM, version 1.7.0_21, running on Linux:amd64:3.9.4-1-ARCH, installed at /usr/lib/jvm/java-7-openjdk/jre

2013-06-05 19:50:58 [FINE] [ForgeModLoader] Java classpath at launch is /home/mark/.minecraft/minecraft.jar

2013-06-05 19:50:58 [FINE] [ForgeModLoader] Java library path at launch is bin/natives

2013-06-05 19:50:58 [FINE] [ForgeModLoader] Enabling runtime deobfuscation

2013-06-05 19:50:58 [FINEST] [ForgeModLoader] All core mods are successfully located

2013-06-05 19:50:58 [FINEST] [ForgeModLoader] Discovering coremods

2013-06-05 19:50:58 [FINEST] [ForgeModLoader] Found library file argo-small-3.2.jar present and correct in lib dir

2013-06-05 19:50:58 [FINEST] [ForgeModLoader] Found library file guava-14.0-rc3.jar present and correct in lib dir

2013-06-05 19:50:58 [FINEST] [ForgeModLoader] Found library file asm-all-4.1.jar present and correct in lib dir

2013-06-05 19:50:58 [FINEST] [ForgeModLoader] Found library file bcprov-jdk15on-148.jar present and correct in lib dir

2013-06-05 19:50:58 [FINEST] [ForgeModLoader] Downloading file http://files.minecraftforge.net/fmllibs/deobfuscation_data_missing.zip

2013-06-05 19:50:58 [iNFO] [ForgeModLoader] Downloading file http://files.minecraftforge.net/fmllibs/deobfuscation_data_missing.zip

2013-06-05 19:50:58 [sEVERE] [ForgeModLoader] There was a problem downloading the file deobfuscation_data_missing.zip automatically. Perhaps you have an environment without internet access. You will need to download the file manually or restart and let it try again

 

2013-06-05 19:50:58 [FINEST] [ForgeModLoader] Found library file scala-library.jar present and correct in lib dir

2013-06-05 19:50:58 [sEVERE] [ForgeModLoader] There were errors during initial FML setup. Some files failed to download or were otherwise corrupted. You will need to manually obtain the following files from these download links and ensure your lib directory is clean.

2013-06-05 19:50:58 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/argo-small-3.2.jar

2013-06-05 19:50:58 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/guava-14.0-rc3.jar

2013-06-05 19:50:58 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/asm-all-4.1.jar

2013-06-05 19:50:58 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/bcprov-jdk15on-148.jar

2013-06-05 19:50:58 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/deobfuscation_data_missing.zip

2013-06-05 19:50:58 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/scala-library.jar

2013-06-05 19:50:58 [sEVERE] [ForgeModLoader] <===========>

2013-06-05 19:50:58 [sEVERE] [ForgeModLoader] The following is the errors that caused the setup to fail. They may help you diagnose and resolve the issue

2013-06-05 19:50:58 [sEVERE] [ForgeModLoader] A download error occured

2013-06-05 19:50:58 [sEVERE] [ForgeModLoader] <<< ==== >>>

2013-06-05 19:50:58 [sEVERE] [ForgeModLoader] The following is diagnostic information for developers to review.

2013-06-05 19:50:58 [sEVERE] [ForgeModLoader] Error details

java.lang.RuntimeException: A download error occured

at cpw.mods.fml.relauncher.RelaunchLibraryManager.downloadFile(RelaunchLibraryManager.java:548)

at cpw.mods.fml.relauncher.RelaunchLibraryManager.handleLaunch(RelaunchLibraryManager.java:165)

at cpw.mods.fml.relauncher.FMLRelauncher.setupHome(FMLRelauncher.java:172)

at cpw.mods.fml.relauncher.FMLRelauncher.relaunchClient(FMLRelauncher.java:104)

at cpw.mods.fml.relauncher.FMLRelauncher.handleClientRelaunch(FMLRelauncher.java:38)

at net.minecraft.client.Minecraft.main(Minecraft.java:2237)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at magic.launcher.Launcher.main(Unknown Source)

Caused by: java.io.FileNotFoundException: http://files.minecraftforge.net/fmllibs/deobfuscation_data_missing.zip

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:525)

at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1674)

at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1672)

at java.security.AccessController.doPrivileged(Native Method)

at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1670)

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1243)

at cpw.mods.fml.relauncher.RelaunchLibraryManager.downloadFile(RelaunchLibraryManager.java:532)

... 10 more

Caused by: java.io.FileNotFoundException: http://files.minecraftforge.net/fmllibs/deobfuscation_data_missing.zip

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1623)

at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2677)

at java.net.URLConnection.getHeaderFieldLong(URLConnection.java:639)

at java.net.URLConnection.getContentLengthLong(URLConnection.java:511)

at java.net.URLConnection.getContentLength(URLConnection.java:495)

at cpw.mods.fml.relauncher.RelaunchLibraryManager.downloadFile(RelaunchLibraryManager.java:531)

... 10 more

2013-06-05 19:51:00 [iNFO] [sTDERR] java.lang.reflect.InvocationTargetException

2013-06-05 19:51:00 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-06-05 19:51:00 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

2013-06-05 19:51:00 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

2013-06-05 19:51:00 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Method.java:601)

2013-06-05 19:51:00 [iNFO] [sTDERR] at magic.launcher.Launcher.main(Unknown Source)

2013-06-05 19:51:00 [iNFO] [sTDERR] Caused by: java.lang.RuntimeException: java.lang.RuntimeException: A fatal error occured and FML cannot continue

2013-06-05 19:51:00 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.FMLRelauncher.setupHome(FMLRelauncher.java:192)

2013-06-05 19:51:00 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.FMLRelauncher.relaunchClient(FMLRelauncher.java:104)

2013-06-05 19:51:00 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.FMLRelauncher.handleClientRelaunch(FMLRelauncher.java:38)

2013-06-05 19:51:00 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.main(Minecraft.java:2237)

2013-06-05 19:51:00 [iNFO] [sTDERR] ... 5 more

2013-06-05 19:51:00 [iNFO] [sTDERR] Caused by: java.lang.RuntimeException: A fatal error occured and FML cannot continue

2013-06-05 19:51:00 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.RelaunchLibraryManager.handleLaunch(RelaunchLibraryManager.java:261)

2013-06-05 19:51:00 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.FMLRelauncher.setupHome(FMLRelauncher.java:172)

2013-06-05 19:51:00 [iNFO] [sTDERR] ... 8 more

2013-06-05 19:54:57 [iNFO] [sTDOUT] No visible frames left, exit()

2013-06-05 19:54:57 [iNFO] [sTDOUT] Restoring disabled mods: mods

 

 

 

Logs after downloading file and renaming to match what FML was looking for:

 

 

2013-06-05 20:05:35 [iNFO] [ForgeModLoader] Forge Mod Loader version missing.missing.missing.missing for Minecraft missing loading

2013-06-05 20:05:35 [iNFO] [ForgeModLoader] Java is OpenJDK 64-Bit Server VM, version 1.7.0_21, running on Linux:amd64:3.9.4-1-ARCH, installed at /usr/lib/jvm/java-7-openjdk/jre

2013-06-05 20:05:35 [FINE] [ForgeModLoader] Java classpath at launch is /home/mark/.minecraft/minecraft.jar

2013-06-05 20:05:35 [FINE] [ForgeModLoader] Java library path at launch is bin/natives

2013-06-05 20:05:35 [FINE] [ForgeModLoader] Enabling runtime deobfuscation

2013-06-05 20:05:35 [FINEST] [ForgeModLoader] All core mods are successfully located

2013-06-05 20:05:35 [FINEST] [ForgeModLoader] Discovering coremods

2013-06-05 20:05:35 [FINEST] [ForgeModLoader] Found library file argo-small-3.2.jar present and correct in lib dir

2013-06-05 20:05:35 [FINEST] [ForgeModLoader] Found library file guava-14.0-rc3.jar present and correct in lib dir

2013-06-05 20:05:35 [FINEST] [ForgeModLoader] Found library file asm-all-4.1.jar present and correct in lib dir

2013-06-05 20:05:35 [FINEST] [ForgeModLoader] Found library file bcprov-jdk15on-148.jar present and correct in lib dir

2013-06-05 20:05:35 [FINEST] [ForgeModLoader] Found library file scala-library.jar present and correct in lib dir

2013-06-05 20:05:35 [sEVERE] [ForgeModLoader] There were errors during initial FML setup. Some files failed to download or were otherwise corrupted. You will need to manually obtain the following files from these download links and ensure your lib directory is clean.

2013-06-05 20:05:35 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/argo-small-3.2.jar

2013-06-05 20:05:35 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/guava-14.0-rc3.jar

2013-06-05 20:05:35 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/asm-all-4.1.jar

2013-06-05 20:05:35 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/bcprov-jdk15on-148.jar

2013-06-05 20:05:35 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/deobfuscation_data_missing.zip

2013-06-05 20:05:35 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/scala-library.jar

2013-06-05 20:05:35 [sEVERE] [ForgeModLoader] <===========>

2013-06-05 20:05:35 [sEVERE] [ForgeModLoader] The following is the errors that caused the setup to fail. They may help you diagnose and resolve the issue

2013-06-05 20:05:35 [sEVERE] [ForgeModLoader] The file deobfuscation_data_missing.zip was found in your lib directory and has an invalid checksum 446e55cd986582c70fcf12cb27bc00114c5adfd9 (expecting deadbeef) - it is unlikely to be the correct download, please move it out of the way and try again.

2013-06-05 20:05:35 [sEVERE] [ForgeModLoader] <<< ==== >>>

2013-06-05 20:05:35 [sEVERE] [ForgeModLoader] The following is diagnostic information for developers to review.

2013-06-05 20:05:35 [sEVERE] [ForgeModLoader] Error details

java.lang.RuntimeException: The file deobfuscation_data_missing.zip was found in your lib directory and has an invalid checksum 446e55cd986582c70fcf12cb27bc00114c5adfd9 (expecting deadbeef) - it is unlikely to be the correct download, please move it out of the way and try again.

at cpw.mods.fml.relauncher.RelaunchLibraryManager.handleLaunch(RelaunchLibraryManager.java:193)

at cpw.mods.fml.relauncher.FMLRelauncher.setupHome(FMLRelauncher.java:172)

at cpw.mods.fml.relauncher.FMLRelauncher.relaunchClient(FMLRelauncher.java:104)

at cpw.mods.fml.relauncher.FMLRelauncher.handleClientRelaunch(FMLRelauncher.java:38)

at net.minecraft.client.Minecraft.main(Minecraft.java:2237)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at magic.launcher.Launcher.main(Unknown Source)

2013-06-05 20:05:38 [iNFO] [sTDERR] java.lang.reflect.InvocationTargetException

2013-06-05 20:05:38 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-06-05 20:05:38 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

2013-06-05 20:05:38 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

2013-06-05 20:05:38 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Method.java:601)

2013-06-05 20:05:38 [iNFO] [sTDERR] at magic.launcher.Launcher.main(Unknown Source)

2013-06-05 20:05:38 [iNFO] [sTDERR] Caused by: java.lang.RuntimeException: java.lang.RuntimeException: A fatal error occured and FML cannot continue

2013-06-05 20:05:38 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.FMLRelauncher.setupHome(FMLRelauncher.java:192)

2013-06-05 20:05:38 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.FMLRelauncher.relaunchClient(FMLRelauncher.java:104)

2013-06-05 20:05:38 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.FMLRelauncher.handleClientRelaunch(FMLRelauncher.java:38)

2013-06-05 20:05:38 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.main(Minecraft.java:2237)

2013-06-05 20:05:38 [iNFO] [sTDERR] ... 5 more

2013-06-05 20:05:38 [iNFO] [sTDERR] Caused by: java.lang.RuntimeException: A fatal error occured and FML cannot continue

2013-06-05 20:05:38 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.RelaunchLibraryManager.handleLaunch(RelaunchLibraryManager.java:261)

2013-06-05 20:05:38 [iNFO] [sTDERR] at cpw.mods.fml.relauncher.FMLRelauncher.setupHome(FMLRelauncher.java:172)

2013-06-05 20:05:38 [iNFO] [sTDERR] ... 8 more

2013-06-05 20:21:59 [iNFO] [sTDOUT] No visible frames left, exit()

2013-06-05 20:21:59 [iNFO] [sTDOUT] Restoring disabled mods: mods

 

 

Link to comment
Share on other sites

Yup. It works as expected after manually injecting Forge into minecraft.jar. And Magic Launcher still gets along with the modded jar, allowing me to set up profiles, so that's good.

 

Curious that it wasn't able to inject fmlversion.properties automatically though. Maybe it has something to do with linux file permissions? But at that point, it would be a problem with Magic Launcher then, wouldn't it? I might head over to them if I decide I care enough or hear of others starting to have this same problem. If I'm wrong and it is something on your end, feel free to contact me if I can be of any help. :)

 

Anyways, thank you much LexManos.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • KILAT77 : Waspada Situs Scam dengan Withdraw Yang Tidak Dibayar Di era digital saat ini, banyak orang yang mencari keberuntungan melalui situs perjudian online. Namun, dibalik gemerlap janji-janji manis kemenangan, ada bahaya yang mengintai. Salah satu situs yang patut diwaspadai adalah KILAT77. Situs ini mendapat reputasi buruk karena banyak laporan dari pengguna yang mengklaim bahwa mereka tidak bisa menarik dana kemenangan mereka. Dalam artikel ini, kita akan membahas mengapa ROTER88 dianggap sebagai situs scam dan bagaimana Anda bisa melindungi diri dari penipuan serupa. Pengalaman Pengguna: Penarikan Tidak Dibayar Beberapa pengguna telah melaporkan pengalaman buruk mereka dengan KILAT77. Mereka mengaku bahwa setelah memenangkan sejumlah uang dan mencoba menariknya, proses penarikan mereka ditolak tanpa alasan yang jelas. Bahkan, beberapa pengguna melaporkan bahwa akun mereka tiba-tiba diblokir setelah mencoba melakukan penarikan, sehingga mereka kehilangan akses ke dana mereka sama sekali.
    • It is a dupe mod issue Remove Rubidium - you are already using Embeddium which is a fork of Rubidium
    • I made a block entity in forge 1.20.1, I want to prevent hopper from taking input slot item, i tried to override the extractItem method, it prevented hopper from taking input slot item, but the player also unable to take/change the item in input slot unless the slot is empty. public class FluidSeparatorBlockEntity extends BlockEntity implements MenuProvider { private static final int INPUT_SLOT = 0; private final CustomItemHandler itemHandler = new CustomItemHandler(3){ @Override protected void onContentsChanged(int slot) { setChanged(); } @Override public boolean isItemValid(int slot, @NotNull ItemStack stack) { return slot == INPUT_SLOT; } @Override public @NotNull ItemStack extractItem(int slot, int amount, boolean simulate) { if (slot == INPUT_SLOT) { return ItemStack.EMPTY; } return super.extractItem(slot, amount, simulate); } }; private LazyOptional<IItemHandler> lazyItemHandler = LazyOptional.empty(); protected final ContainerData data; private int progress = 0; private int maxProgress = 78; public FluidSeparatorBlockEntity(BlockPos pPos, BlockState pBlockState) { super(ModBlockEntities.FLUID_SEPARATOR_BE.get(), pPos, pBlockState); this.data = new ContainerData() { @Override public int get(int pIndex) { return switch (pIndex) { case 0 -> FluidSeparatorBlockEntity.this.progress; case 1, 2 -> FluidSeparatorBlockEntity.this.maxProgress; default -> 0; }; } @Override public void set(int pIndex, int pValue) { switch (pIndex) { case 0 -> FluidSeparatorBlockEntity.this.progress = pValue; case 1, 2 -> FluidSeparatorBlockEntity.this.maxProgress = pValue; } } @Override public int getCount() { return 3; } }; } @Override public @NotNull <T> LazyOptional<T> getCapability(@NotNull Capability<T> cap, @Nullable Direction side) { if(cap == ForgeCapabilities.ITEM_HANDLER) { return lazyItemHandler.cast(); } return super.getCapability(cap, side); } @Override public void onLoad() { super.onLoad(); lazyItemHandler = LazyOptional.of(() -> itemHandler); } @Override public void invalidateCaps() { super.invalidateCaps(); lazyItemHandler.invalidate(); } public void drops() { SimpleContainer inventory = new SimpleContainer(itemHandler.getSlots()); for(int i = 0; i < itemHandler.getSlots(); i++) { inventory.setItem(i, itemHandler.getStackInSlot(i)); } Containers.dropContents(this.level, this.worldPosition, inventory); } @Override public Component getDisplayName() { return Component.translatable("block.chemmaster.fluid_separator"); } @Nullable @Override public AbstractContainerMenu createMenu(int pContainerId, Inventory pPlayerInventory, Player pPlayer) { return new FluidSeparatorMenu(pContainerId, pPlayerInventory, this, this.data); } @Override protected void saveAdditional(CompoundTag pTag) { pTag.put("inventory", itemHandler.serializeNBT()); pTag.putInt("fluid_separator.progress", progress); super.saveAdditional(pTag); } @Override public void load(CompoundTag pTag) { super.load(pTag); itemHandler.deserializeNBT(pTag.getCompound("inventory")); progress = pTag.getInt("fluid_separator.progress"); } public void tick(Level pLevel, BlockPos pPos, BlockState pState) { ItemStack inputStack = this.itemHandler.getStackInSlot(INPUT_SLOT); if (inputStack.getCount() < 2) { resetProgress(); return; } if(hasRecipe()) { increaseCraftingProgress(); setChanged(pLevel, pPos, pState); if(hasProgressFinished()) { craftItem(); resetProgress(); } } else { resetProgress(); } } private void resetProgress() { progress = 0; } private void craftItem() { Optional<FluidSeparatingRecipe> recipe = getCurrentRecipe(); if (recipe.isPresent()) { List<ItemStack> results = recipe.get().getOutputs(); ItemStack inputStack = this.itemHandler.getStackInSlot(INPUT_SLOT); if (inputStack.getCount() < 2) { // If there are not enough items, do not proceed with crafting return; } // Extract the input item from the input slot this.itemHandler.internalExtractItem(INPUT_SLOT, 2, false); // Loop through each result item and find suitable output slots for (ItemStack result : results) { int outputSlot = findSuitableOutputSlot(result); if (outputSlot != -1) { this.itemHandler.setStackInSlot(outputSlot, new ItemStack(result.getItem(), this.itemHandler.getStackInSlot(outputSlot).getCount() + result.getCount())); } else { // Handle the case where no suitable output slot is found // This can be logging an error, throwing an exception, or any other handling logic System.err.println("No suitable output slot found for item: " + result); } } } } private int findSuitableOutputSlot(ItemStack result) { // Implement logic to find a suitable output slot for the given result // Return the slot index or -1 if no suitable slot is found for (int i = 0; i < this.itemHandler.getSlots(); i++) { // Ensure we do not place the output item in the input slot if (i == INPUT_SLOT) { continue; } ItemStack stackInSlot = this.itemHandler.getStackInSlot(i); if (stackInSlot.isEmpty() || (stackInSlot.getItem() == result.getItem() && stackInSlot.getCount() + result.getCount() <= stackInSlot.getMaxStackSize())) { return i; } } return -1; } private boolean hasRecipe() { Optional<FluidSeparatingRecipe> recipe = getCurrentRecipe(); if (recipe.isEmpty()) { return false; } List<ItemStack> results = recipe.get().getOutputs(); for (ItemStack result : results) { if (!canInsertAmountIntoOutputSlot(result) || !canInsertItemIntoOutputSlot(result.getItem())) { return false; } } return true; } private Optional<FluidSeparatingRecipe> getCurrentRecipe(){ SimpleContainer inventory = new SimpleContainer(this.itemHandler.getSlots()); for (int i = 0; i < itemHandler.getSlots(); i++) { inventory.setItem(i, this.itemHandler.getStackInSlot(i)); } return this.level.getRecipeManager().getRecipeFor(FluidSeparatingRecipe.Type.INSTANCE, inventory, level); } private boolean canInsertAmountIntoOutputSlot(ItemStack result) { for (int i = 1; i < this.itemHandler.getSlots(); i++) { ItemStack stackInSlot = this.itemHandler.getStackInSlot(i); if (stackInSlot.isEmpty() || (stackInSlot.getItem() == result.getItem() && stackInSlot.getCount() + result.getCount() <= stackInSlot.getMaxStackSize())) { return true; } } return false; } private boolean canInsertItemIntoOutputSlot(Item item) { for (int i = 1; i < this.itemHandler.getSlots(); i++) { ItemStack stackInSlot = this.itemHandler.getStackInSlot(i); if (stackInSlot.isEmpty() || stackInSlot.getItem() == item) { return true; } } return false; } private boolean hasProgressFinished() { return progress >= maxProgress; } private void increaseCraftingProgress() { progress++; } }  
    • No dice. Unfortunately this fix didn't work, thank you though.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.