Minecraft dragon server universal market plug-in step hole record and repair Chinese version download
The original minecraft is tired of it(the dragon finally fought)I wanted to play minecraft mod, so I installed the industry 2 module.Is thinking of online, from the mcbbs for a long time, feel reliable on the few.It's too lonely to play by yourself, so let's build a suit.This is the preface. I don't want to talk about the details. In short, there are a lot of pitfalls. Fortunately, there are some tutorials from our predecessors (for example, http: / / www.mcbbs. Net / thread-786074-1-1. HTML), and the road is quite smooth.In the spirit of serving the people, select a pit here and summarize the process to help later partners.
The universal market is a consignment market with a box like interface.
Since various prompt texts of this project are built into the code, the Sinicization needs to be recompiled. There are project source code files on it. If you are worried, you can manually compile according to the compilation process below.The Chinese part adopts the translation provided by tollainmear.
There is a problem
22.214.171.124.126.96.36.199.188.8.131.52.2.After installing the universal market plug-in version 1.3 (HTTPS: / / GitHub. COM / xwaffle1 / universalmarket / releases / tag / 1.3), it is found that you cannot enter the store normally. The console error is as follows:
[xx:xx:xx] [Server thread/ERROR] [Sponge]: Error occurred while executing command 'um' for source EntityPlayerMP['lookas2001'/248, l='world', x=302.00, y=64.00, z=229.00]: There's no NBT Data set in the provided container
org.spongepowered.api.data.persistence.InvalidDataException: There's no NBT Data set in the provided container
at net.minecraft.item.ItemStack.setRawData(ItemStack.java:2534) ~[aip.class:?]
at com.xwaffle.universalmarket.utils.ItemBuilder.<init>(ItemBuilder.java:38) ~[ItemBuilder.class:?]
at com.xwaffle.universalmarket.utils.ItemBuilder.<init>(ItemBuilder.java:31) ~[ItemBuilder.class:?]
at com.xwaffle.universalmarket.market.Market.openMarket(Market.java:247) ~[Market.class:?]
at com.xwaffle.universalmarket.market.Market.openMarket(Market.java:167) ~[Market.class:?]
at com.xwaffle.universalmarket.commands.MarketCommand.process(MarketCommand.java:45) ~[MarketCommand.class:?]
at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process(SimpleDispatcher.java:340) ~[SimpleDispatcher.class:1.12.2-2825-7.1.6]
at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:337) [SpongeCommandManager.class:1.12.2-2825-7.1.6]
at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:1156) [dh.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:960) [pa.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:939) [pa.class:?]
at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:37) [la.class:?]
at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:9) [la.class:?]
at org.spongepowered.common.event.tracking.phase.packet.PacketPhaseUtil.onProcessPacket(PacketPhaseUtil.java:193) [PacketPhaseUtil.class:1.12.2-2825-7.1.6]
at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$zlk000(SourceFile:539) [hv$1.class:?]
at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [hv$1.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_74]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_74]
at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]
at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:307) [SpongeImplHooks.class:1.12.2-2825-7.1.6]
at net.minecraft.server.MinecraftServer.redirect$onRun$zjo000(MinecraftServer.java:3970) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:723) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397) [nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_74]
At this time, I was a little flustered, because I had no systematic contact with Java before. I only had a little understanding when studying the authorization and verification of Ruijie network ess / SMP products and Moegirl android app.
Positioning and resolution
Go to search engine directly, didn't find
Because this project is open source(open source is great!)We can download the code and study it slowly.
Later, I went to the original project to find the issue, and found this https://github.com/xwaffle1/universalmarket/issues/20. I contacted Dalao alone, who had already patched the previous version of jar, through some ways. I would like to thank his work for enlightening me when I had no idea.
Fortunately, with trace, we can see that the last error about this plug-in occurred incom.xwaffle.universalmarket.utils.ItemBuilder.<init>(ItemBuilder.java:38) ~[ItemBuilder.class:?]here:
We throw the setraw data function on the sponge forum and search for https://forums.spongeowned.org/t/set-get-modify-subid-of-itemstack/19048/9 and find that this function is related to setting some attributes on items, which is a relatively Hacky approach.
Search the function corresponding to this code in the global project:
Find that this code is only related to the market.java file. Open it and find the calling place.
We find that the call point with unsafetedamage (damage value) is actually passed in through the meta variable, which is only here:
After loading the Haoxing plug-in, you can find that this is the confirm button in the payment confirmation interface.
Therefore, it is speculated that this may be a function related to the progress bar that the author wants to do, but in the end, for various reasons, it finally coos (human nature).
Remove this line and the two related lines (the top two lines of the bug line) and try it.
Roadblock -- compiler
Minecraft uses Java 8 as its running environment. Correspondingly, mod development around minecraft is based on Java 8. It is recommended to use Java 8 for the following work.
My local computer is MacBook, and the development environment is MacOS. Compared with Windows system, it is more powerful on the command line and has more supporting facilities.Personal development, usually use brew as a package management, installation software fast and fast.But brew doesn't provide Java 8 by defaultHowever, it is impossible to download from the official website of Oracle (the download still needs to log in). There is such an answer on stackoverflow, which solves the problem of Java 8 installation.
See that this project uses gradle as its dependency management (or build tool?)According to my previous experience with composer and NPM, I think I need to install it with brew.In fact, it is unnecessary, but it is unnecessary to install it.The gradle version on brew is too high, and the project itself provides a package management command, gradlew.Running it will generate the corresponding files in the project directory and user directory.
so./gradlewNow, after downloading the necessary files, I give a prompt that I should run./gradlew tasks。Run it and find the option that seems to be a build./gradlew build。Run it, silly eye, prompt error:
/ XXXXXX / universalmarket master / build / sources / main / Java / COM / xwaffle / universalmarket / market / market. Java: 30: error: package org.spongeowned.common.item.inventory.adapter.impl.slots does not exist
import org.spongeowned.common.item.inventory.adapter.impl.slots.slotadapter;/ XXXXXX / universalmarket master / build / sources / main / Java / COM / xwaffle / universalmarket / market / market. Java: 31: error: package org.spongeowned.common.item.inventory.query.operation does not exist
importorg.spongepowered.common.item.inventory.query.operation.InventoryPropertyQueryOperation;/ XXXXXX / universalmarket master / build / sources / main / Java / COM / xwaffle / universalmarket / market / market. Java: 32: error: package org.spongeowned.common.item.inventory.util does not exist
import org.spongeowned.common.item.inventory.util.itemstackutil;;^/ XXXXXX / universalmarket master / build / sources / main / Java / COM / xwaffle / universalmarket / market / marketitem. Java: 10: error: package org.spongeowned.common.item.inventory.util does not exist
import org.spongeowned.common.item.inventory.util.itemstackutil;/ XXXXXX / universalmarket master / build / sources / main / Java / COM / xwaffle / universalmarket / utils / itembuilder. Java: 11: error: package org.spongeowned.common.item.inventory.util does not exist
import org.spongeowned.common.item.inventory.util.itemstackutil;;^Note: writing plugin metadata to file / file / XXXXXX / universalmarket-master / build / classes / main / mcmmod.info has 5 errors, compile Java failed, build failed with an exception, build failed with an exception, what what went wrong wrong is: execution failed for task ': compilejava', > compilation failed; see the compiler error output output for details.
, compile failed; see the compiler error error output for details.
* what went wrong wrong wrong wrong error output for details.
* what went wrong wrong wrong wrong output for details.
* what went wrong wrong wrong wrong output output for details.
* what what went wrong wrong doing wrong output for tasks': compile Java '; > compilation failed; see the compiler error error output output for details.
run with -- stacktrace option to getthe stack trace. Run with --info or --debug option to get more log output.
Looking through the sponge document, I can see that the examples given by the government are all based on ide. However, due to the lack of space in my MacBook, I finally installed IntelliJ idea community on another computer (Windows), and then used the build button provided by IDE, which took a long time to download. Finally, two errors "PKIX path building failed" and"Unable to find valid certification path to requested target" (this problem will not occur when using the command to build on windows, but the above error that has occurred in MacOS will still occur). It seems that it is not an IDE problem. Return my MacBook.
In the previous step, I observed one thing: why other introductions don't have problems, but these introductions do. I found that these packages start with org.spongepowered.common.xxx.I have checked the build. Gradle file before, and it has been approvedcompile 'org.spongepowered:spongeapi:7.0.0'Introducing spongeapi.After troubleshooting the IDE, I decided to see what the java compiler was introducing.
Because of my previous experience with gradle, I knew that gradle would generate folders in the user directory~/.gradleGo to it and search for itfind . | grep sponge。One of the search results./caches/modules-2/files-2.1/org.spongepowered/spongeapi/7.0.0/ada1f9981de3459b182ee16d6408173ef33a8943/spongeapi-7.0.0.jarThis is the package corresponding to the API.
Decompress it (no need to decompile it)
Where is common!!
Go back to build. Gradle and look down,compile files('libs/spongeforge-1.12.2-2555-7.1.0-BETA-2837.jar')In combination with the description of the spongeharmony project, the author TM directly regards the release version of spongeforge as a dependency!And the source code also deleted this directory!!!From the point of view of using the side door API, the author of the plug-in is not recommended to bypass the behaviors such as spine, which is directly introduced by the plug-in authornet.minecraft.nbt.NBTTagCompound）It's no wonder that the author didn't post some of the API on the mode.
Download the latest stable version of spongeforge (spongeforge-1.12.2-2825-7.1.6. Jar) (the old one doesn't want to turn back), create LIBS directory and throw it in.Then change the corresponding file name in build. Gradle (keep matching).Run it again./gradlew build