minecraft

Decompiling MCP error (version 9.18) returns 'Decompile Failed'

时光怂恿深爱的人放手 提交于 2021-02-17 06:45:20
问题 I have decided to take on MCP and have downloaded it, however, when running the decompile.bat, it returns an error. (I'm running 32-bit Windows 10) Here is what it returned: '"C:\Program Files\Java\jdk1.8.0_65\bin\java" -jar runtime\bin\fernflower.jar -din=1 -rbr=1 -dgs=1 -asc=1 -rsy=1 -iec=1 -jvn=1 -log=WARN "-e=jars\libraries\net/java/jinput\jinput\2.0.5\jinput-2.0.5.jar" "-e=jars\libraries\org/lwjgl/lwjgl\lwjgl-platform\2.9.4-nightly-20150209\lwjgl-platform-2.9.4-nightly-20150209-natives

How to get player's ping in spigot 1.16.4

社会主义新天地 提交于 2021-02-17 03:32:27
问题 I tried to use java reflection in many ways to get the ping of a player. But at 100%, it returns 0ms. I've searched for a long time, so... can someone help me? Try 1 : public static int getPing(Player p) { try { Object craftPlayer = (CraftPlayer) p; return (int) craftPlayer.getClass().getField("ping").get(craftPlayer); } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException e) { throw new Error(e); } } Try2 : public static int getPing(Player p) {

Minecraft Server Client via Discord Bot

南楼画角 提交于 2021-02-11 16:44:41
问题 Currently I am trying to set up a discord bot that would log me into a server, and convey the messages sent by players into a discord channel. I am not an admin nor have any staff related things on the server, so i'm unable to ftp in and use rcon , I want it to log my user in, and just convey messages back and forth. Is this possible? So, I have so far tried via npm packages , but none of them seem to do what i want. I am trying to host a node.js discord.js bot on my home computer that is

Minecraft Server Client via Discord Bot

試著忘記壹切 提交于 2021-02-11 16:43:53
问题 Currently I am trying to set up a discord bot that would log me into a server, and convey the messages sent by players into a discord channel. I am not an admin nor have any staff related things on the server, so i'm unable to ftp in and use rcon , I want it to log my user in, and just convey messages back and forth. Is this possible? So, I have so far tried via npm packages , but none of them seem to do what i want. I am trying to host a node.js discord.js bot on my home computer that is

Minecraft coding error with fabric: Exception while loading entries for entrypoint 'main' provided by 'myfirstmod'

荒凉一梦 提交于 2021-02-11 06:10:47
问题 package net.my.first.mod; import net.fabricmc.api.ModInitializer; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; import net.minecraft.block.Block; public class MyFirstMod implements ModInitializer { public static final Item FABRIC_ITEM = new FabricItem(new Item.Settings().group(ItemGroup.MISC), null); public static final Block FABRIC_BLOCK = new FabricBlock(); @Override public void

Program Minecraft Mods without Changing Environment Variables?

a 夏天 提交于 2021-02-11 02:31:31
问题 I am wanting to program Minecraft mods using forge. I am going through the standard installation to begin creating mods, but I have run into an issue. I ran the code "gradlew setupDecompWorkspace eclipse" and it is telling me "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_Home vairable in your environment to match the location of your Java installation." Is it possible to change something else or do something else that will allow me to

Program Minecraft Mods without Changing Environment Variables?

放肆的年华 提交于 2021-02-11 02:27:37
问题 I am wanting to program Minecraft mods using forge. I am going through the standard installation to begin creating mods, but I have run into an issue. I ran the code "gradlew setupDecompWorkspace eclipse" and it is telling me "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_Home vairable in your environment to match the location of your Java installation." Is it possible to change something else or do something else that will allow me to

Program Minecraft Mods without Changing Environment Variables?

别来无恙 提交于 2021-02-11 02:26:34
问题 I am wanting to program Minecraft mods using forge. I am going through the standard installation to begin creating mods, but I have run into an issue. I ran the code "gradlew setupDecompWorkspace eclipse" and it is telling me "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_Home vairable in your environment to match the location of your Java installation." Is it possible to change something else or do something else that will allow me to

How do I move a file into a compiled .jar file using Java?

放肆的年华 提交于 2021-02-08 12:07:58
问题 I'm making a file import system, and I can't move files into the compiled .jar file the application is in. Here's what I'm trying to do: Path FROM = Paths.get(filePath.getText()); Path TO = Paths.get("C:\\Users\\" + System.getProperty("user.name") + "\\AppData\\Roaming\\.minecraft\\mods\\music_crafter-1.0\\src\\main\\resources\\assets\\music_crafter\\sounds\\block\\music_player"); //jar file Files.move(FROM, TO.resolve(FROM.getFileName()), StandardCopyOption.REPLACE_EXISTING); 回答1: You need

How do I move a file into a compiled .jar file using Java?

一世执手 提交于 2021-02-08 12:06:34
问题 I'm making a file import system, and I can't move files into the compiled .jar file the application is in. Here's what I'm trying to do: Path FROM = Paths.get(filePath.getText()); Path TO = Paths.get("C:\\Users\\" + System.getProperty("user.name") + "\\AppData\\Roaming\\.minecraft\\mods\\music_crafter-1.0\\src\\main\\resources\\assets\\music_crafter\\sounds\\block\\music_player"); //jar file Files.move(FROM, TO.resolve(FROM.getFileName()), StandardCopyOption.REPLACE_EXISTING); 回答1: You need