Comments (16)
The project is incompatible on windows unfortunately.
from crucible.
But same on linux:
Patching failed: net/minecraft/network/NetHandlerPlayServer.java Cannot find hunk target
41: Cannot find hunk target @ 0
42: Cannot find hunk target @ 0
2/47 failed
Rejects written to /home/ghostlyr/Crucible/patches/net/minecraft/network/NetHandlerPlayServer.java.patch.rej
Seems you have another decompiled minecraft sources and we have a differences =\
from crucible.
Are you using the same project you used on windows? in this case, the same files or a clean clone of the repo? Windows adds some invisible characters that makes the project break.
from crucible.
Absolutely clean cloned repo from master fork. Also changing EOL git settings on Windows doesn't give effect.
Just compare rejected patch and my decompiled source side-by-side:
if ("MC|BEdit".equals(p_147349_1_.func_149559_c()))
{
packetbuffer = new PacketBuffer(Unpooled.wrappedBuffer(p_147349_1_.func_149558_e()));
try
{
itemstack = packetbuffer.readItemStackFromBuffer();
if (itemstack != null)
{
if (!ItemWritableBook.func_150930_a(itemstack.getTagCompound()))
{
throw new IOException("Invalid book tag!");
}
itemstack1 = this.playerEntity.inventory.getCurrentItem();
if (itemstack1 == null)
{
return;
}
if (itemstack.getItem() == Items.writable_book && itemstack.getItem() == itemstack1.getItem())
{
itemstack1.setTagInfo("pages", itemstack.getTagCompound().getTagList("pages", 8));
}
return;
}
}
catch (Exception exception4)
{
logger.error("Couldn\'t handle book info", exception4);
return;
}
finally
{
packetbuffer.release();
}
return;
}
else if ("MC|BSign".equals(p_147349_1_.func_149559_c()))
{
packetbuffer = new PacketBuffer(Unpooled.wrappedBuffer(p_147349_1_.func_149558_e()));
try
{
itemstack = packetbuffer.readItemStackFromBuffer();
if (itemstack == null)
{
return;
}
if (!ItemEditableBook.validBookTagContents(itemstack.getTagCompound()))
{
throw new IOException("Invalid book tag!");
}
itemstack1 = this.playerEntity.inventory.getCurrentItem();
if (itemstack1 != null)
{
if (itemstack.getItem() == Items.written_book && itemstack1.getItem() == Items.writable_book)
{
itemstack1.setTagInfo("author", new NBTTagString(this.playerEntity.getCommandSenderName()));
itemstack1.setTagInfo("title", new NBTTagString(itemstack.getTagCompound().getString("title")));
itemstack1.setTagInfo("pages", itemstack.getTagCompound().getTagList("pages", 8));
itemstack1.func_150996_a(Items.written_book);
}
return;
}
}
catch (Exception exception3)
{
logger.error("Couldn\'t sign book", exception3);
return;
}
finally
{
packetbuffer.release();
}
return;
}
There some inconsistencies.
from crucible.
What's your environment? I never had that problem before on linux and it builds just fine on my TeamCity https://juanmuscaria.beta.teamcity.com/project/Crucible
from crucible.
I doubt that this is a POSIX CR LF or environment problem.
Just for unknown reasons I have different decompiled source. Specifically: reverted and shifted if (itemstack1 != null) conditions.
So here my fixed patch:
Ghostlyr@c650eaf
from crucible.
With your patch version I get that error
Applying Cauldron patches
Patching failed: net/minecraft/network/NetHandlerPlayServer.java Cannot find hunk target
41: Cannot find hunk target @ 0
42: Cannot find hunk target @ 0
2/47 failed
Rejects written to /home/juan/Área de Trabalho/Pasta sem título/Crucible/patches/net/minecraft/network/NetHandlerPlayServer.java.patch.rej
that's the only patch that breaks for some reason. Either it's an environment problem or some gradle inconsistency because of how old the version is.
from crucible.
Our default source does not work for me.
We used a custom NetHandlerPlayServer.java since always, so i never bothered to understand and try to fix this issue. (probably the same source as you?)
Your changes fixed the issue on my pc, tried on windows (clean git clone, setup and jar) and worked.
from crucible.
Before we merge, i will try to understand why the error ocurred in first place.
How have you solved it?
I was going to try to just genPatches from our correct version of NetHandlerPlayServer.java, have you just done that?
from crucible.
Merging that will break TeamCity auto build setup and probably break with my current work in the dev branch. So yeah the only solution is actually finding out why that happens in the first place.
from crucible.
Tested on Ubuntu, same steps, (clean git clone, setup and jar) and got the error i used to get on Windows.
It has the correct patch:
But does not have the correct generated file:
from crucible.
I met this issue, too.Please bear with my poor English
I guess it's the library file problem, because I found that the libraries packaged by ./gradlew jar are incomplete, such as server.jar Only a few dozen KB
I don't know much about the process of decompiling MCP, but I can be sure that there is a problem with the decompiler source, and the problem is solved by deleting /home/.gradle/
But why can incomplete files be decompiled successfully? I'm not really sure
from crucible.
Can you test if the issue persists with the build system change and update?
from crucible.
This issue will need to be re-opened or addressed.
In a LXD container
OS:
.-/+oossssoo+/-. s
`:+ssssssssssssssssss+:` ---------------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 20.04.3 LTS x86_64
.ossssssssssssssssssdMMMNysssso. Kernel: 5.10.60-qnap
/ssssssssssshdmmNNmmyNMMMMhssssss/ Uptime: 2 days, 4 hours, 31 mins
+ssssssssshmydMMMMMMMNddddyssssssss+ Packages: 463 (dpkg)
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Shell: bash 5.0.17
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Terminal: /dev/pts/0
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ CPU: AMD Ryzen 7 PRO 1700 (16) @ 3.000GHz
ossyNMMMNyMMhsssssssssssssshmmmhssssssso Memory: 2458MiB / 15960MiB
ossyNMMMNyMMhsssssssssssssshmmmhssssssso
+sssshhhyNMMNyssssssssssssyNMMMysssssss+
.ssssssssdMMMNhsssssssssshNMMMdssssssss.
/sssssssshNMMMyhhyyyyhdNMMMNhssssssss/
+sssssssssdmydMMMMMMMMddddyssssssss+
/ssssssssssshdmNNNNmyNMMMMhssssss/
.ossssssssssssssssssdMMMNysssso.
-+sssssssssssssssssyyyssss+-
`:+ssssssssssssssssss+:`
.-/+oossssoo+/-.
git clone -b v5.3 https://github.com/CrucibleMC/Crucible.git
- testing to build tag v5.3
./gradlew setupCrucible
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/5.6.4/userguide/gradle_daemon.html.
Daemon will be stopped at the end of the build stopping after processing
> Configure project :
Etag download for http://export.mcpbot.bspk.rs/versions.json failed with code 522
[Fatal Error] argo-2.25.pom:3:10: Already seen doctype.
[Fatal Error] argo-2.25.pom:3:10: Already seen doctype.
#################################################
ForgeGradle 1.2-1.3.3-SNAPSHOT-994b613d
https://github.com/juanmuscaria/ForgeGradle
#################################################
Powered by MCP 9.08
http://modcoderpack.com
by: Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
Reissued by:
juanmuscaria, Aizistral
#################################################
> Task :getAssets
Current status: 5/686 0%
Current status: 29/686 4%
Current status: 53/686 7%
Current status: 91/686 13%
Current status: 132/686 19%
Current status: 185/686 26%
Current status: 251/686 36%
Current status: 306/686 44%
Current status: 364/686 53%
Current status: 420/686 61%
Current status: 474/686 69%
Current status: 510/686 74%
Current status: 553/686 80%
Current status: 597/686 87%
Current status: 641/686 93%
Current status: 686/686 100%
Current status: 686/686 100%
Current status: 686/686 100%
Current status: 686/686 100%
Current status: 686/686 100%
Current status: 686/686 100%
Current status: 686/686 100%
Current status: 686/686 100%
> Task :deobfuscateJar
Applying SpecialSource...
Applying Exceptor...
> Task :forgePatchJar
Injecting fml files
Applying fml patches
Injecting forge files
Applying forge patches
Injecting bukkit files
> Task :cauldronPatchJar
Applying Cauldron patches
Patching failed: net/minecraft/network/NetHandlerPlayServer.java Cannot find hunk target
42: Cannot find hunk target @ 0
1/47 failed
Rejects written to /home/spannerman/Crucible/patches/net/minecraft/network/NetHandlerPlayServer.java.patch.rej
> Task :eclipseCauldron
:eclipse:cauldron:eclipseJdt
:eclipse:cauldron:eclipseProject
:eclipse:cauldron:eclipseClasspath
:eclipse:cauldron:eclipseProject
:eclipse:cauldron:eclipse
> Task :eclipseClean
:eclipse:Clean:eclipseJdt
:eclipse:Clean:eclipseProject
:eclipse:Clean:eclipseProject
:eclipse:Clean:eclipseClasspath
:eclipse:Clean:eclipse
BUILD SUCCESSFUL in 5m 48s
31 actionable tasks: 31 executed
Contents of /home/spannerman/Crucible/patches/net/minecraft/network/NetHandlerPlayServer.java.patch.rej
++++ REJECTED PATCH 42
try
{
- itemstack = packetbuffer.readItemStackFromBuffer();
+ push = packetbuffer.readItemStackFromBuffer();
- if (itemstack != null)
+ if (push != null)
{
- if (!ItemEditableBook.validBookTagContents(itemstack.getTagCompound()))
+ if (!ItemEditableBook.validBookTagContents(push.getTagCompound()))
{
throw new IOException("Invalid book tag!");
}
- itemstack1 = this.playerEntity.inventory.getCurrentItem();
+ stack = this.playerEntity.inventory.getCurrentItem();
- if (itemstack1 == null)
+ if (stack == null)
{
return;
}
- if (itemstack.getItem() == Items.written_book && itemstack1.getItem() == Items.writable_book)
+ if (push.getItem() == Items.written_book && stack.getItem() == Items.writable_book)
{
- itemstack1.setTagInfo("author", new NBTTagString(this.playerEntity.getCommandSenderName()));
- itemstack1.setTagInfo("title", new NBTTagString(itemstack.getTagCompound().getString("title")));
- itemstack1.setTagInfo("pages", itemstack.getTagCompound().getTagList("pages", 8));
- itemstack1.func_150996_a(Items.written_book);
+ nouveau = stack.copy();
+ nouveau.func_150996_a(Items.written_book);
+ nouveau.setTagInfo("author", new NBTTagString(this.playerEntity.getCommandSenderName()));
+ ItemWritableBook.shadowUpdate(nouveau, push, true);
+ this.playerEntity.inventory.setInventorySlotContents(this.playerEntity.inventory.currentItem, nouveau);
+ CraftEventFactory.handleEditBookEvent(playerEntity,nouveau);
}
return;
}
}
- catch (Exception exception3)
+ // CraftBukkit start
+ catch (Throwable throwable)
{
- logger.error("Couldn\'t sign book", exception3);
- return;
+ logger.error("Couldn\'t sign book", throwable);
+ if (throwable instanceof RuntimeException && !(throwable instanceof IOException))
+ {
+ this.kickPlayerFromServer(throwable.getMessage());
+ }
+ else
+ {
+ this.kickPlayerFromServer("Invalid book data!");
+ }
+ // CraftBukkit end
}
finally
{
++++ END PATCH
from crucible.
I once was capable of building on Windows, but after that, juan was not able to build his linux.
I will try again on a near future
from crucible.
That's it, the patching now should be a lot more reliable across systems, there may be some hiccups here and there, but compared to the horrors it was before it should not be a problem
from crucible.
Related Issues (20)
- [BUG] Applecore problem (new) HOT 1
- [BUG] Crash happens with Minechem HOT 2
- Unable to download libraries HOT 2
- [BUG] Build fail HOT 1
- [BUG] [Cauldron] The EntityPlayerMP lose reference when the player dies. HOT 3
- [BUG] Build doesn't work because of not-working repository HOT 2
- A problem occurred running the server launcher HOT 1
- Crash with modpack with starminer HOT 6
- [BUG]When using CMI, some messages cannot be displayed HOT 4
- [BUG] AppleCore Crash HOT 5
- [BUG] Chunk rollback HOT 7
- [BUG] The cable of ic2 cannot transmit power. HOT 1
- [BUG] IC2 and Thaumic tinker
- [BUG] Players get kicked when typing into chat using the 1.7.10 Pack HOT 4
- [BUG]Error when using the plugin PlotSquared
- [BUG] java.io.IOException: Packet was larger than I expected HOT 1
- Descriptive README.md HOT 4
- [BUG] HOT 6
- [BUG] Unable to start HOT 1
- [BUG] Crash on start HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crucible.