minecraft

Handling Huge Multidimensional Arrays in C++

↘锁芯ラ 提交于 2019-12-20 04:30:32
问题 I'm designing a game in C++ similar to Minecraft that holds an enormous amount of terrain data in memory. In general, I want to store an array in memory that is [5][4][5][50][50][50]. This isn't bad since it amounts to about 100mb of virtual memory since my structure will only be about 8 bytes. However, I'm having trouble figuring out the best way to handle this. I do want this to be in virtual memory, but obviously not on the stack. And I keep making the mistake some how of creating this

Pointers - decreasing memory consumption

不问归期 提交于 2019-12-19 10:18:09
问题 I have been writing a Minecraft replica for OpenGL practice (as many do I guess), however after writing the basic rendering API I noticed the real Minecraft uses a lot or memory - around 800MB! I can fully understand why this is with all the blocks it has to remember along with mobs and probably terrain data for the generator...I asked myself "This block is exactly the same as that block..can they be in the code?" and remembered C++ has pointers, so I have attempted to do the same in Java the

error: no suitable constructor found for

狂风中的少年 提交于 2019-12-17 20:28:42
问题 I am new to java, and am trying to make a mod for Minecraft, but I can't figure out how I can fix this error: src\minecraft\net\minecraft\src\ThreadConnectToServer.java:39: error: no suitabl e constructor found for Packet2ClientProtocol(int,Minecraft,String,String,int) GuiConnecting.getNetClientHandler(this.connectingGui).addToSendQueue (new Packet2ClientProtocol(51, GuiConnecting.func_74254_c(this.connectingGui), t his.Username, this.ip, this.port)); ^ constructor Packet2ClientProtocol

“Picked up _JAVA_OPTIONS” when no such environment variable exists

孤街浪徒 提交于 2019-12-17 20:26:33
问题 This issue pertains specifically to Minecraft, but it is affecting all Java programs that run on my computer. It would seem that something is forcibly setting a _JAVA_OPTIONS environment variable. When I run my server, I have specified to allocate 4 GB of RAM to it with -Xms4G -Xmx4G in the startup batch file. However, when the server runs, It prints "Picked up _JAVA_OPTIONS: -Xms2048M -Xmx2048M" to the console, only allocating 2 GB. I have checked my system settings and there is no _JAVA

Using Java reflection, can I access a private field of type private static nested class?

ぃ、小莉子 提交于 2019-12-14 04:03:35
问题 I've looked through every entry related to Java reflection I can find and none seem to address the situation I'm dealing with. I have a class A with a static nested class in it, B. Class A also has as one of its fields, an array of type B, called bArray. I need to access this field from outside the class as well as the private members of the elements of bArray. I have been able to get the static nested class using getDeclaredClasses and I would normally get the private field bArray with

How do I generate the Minecraft launch command for versions 1.8+ in Python?

天涯浪子 提交于 2019-12-14 01:41:52
问题 I am currently working on a little Python project that will function as a custom and highly-configurable launcher for the popular game Minecraft to practice new skills I have been learning recently! However, I am having one problem really throwing me for a loop, and it's just how Minecraft goes about launching the actual game. From my extensive searching, I have learned that the new Minecraft login system sends the user's username and password to authserver.mojang.com/authenticate (the

Bukkit Map Voting

五迷三道 提交于 2019-12-13 23:49:35
问题 I need help. I creating mini game plugin with map voting and I don't know how to do that. HashMap<World, Integer> votes = new HashMap<World, Integer>(); Let's say the votes are closed and the server is choosing map. Which one? What when 2 maps will have the same biggest num. of votes? Thanks for help, eNcoo. 回答1: Tie-Breaker Vote Have another vote, but restrict choices to top worlds with equal high score. Random Tie-Breaker Use a random number generator to break the tie, such as shown in the

Execution failed for task ':compileJava'. - Issue 3 in this series

若如初见. 提交于 2019-12-13 20:12:23
问题 Before this question gets closed for already being asked, as far as I can see it is a vague and common error so this is different from other questions. I fixed the error in my previous post by installing a slightly different version of Forge, but have now reached Step 5 of this tutorial. When I use .\gradlew build with the example mod, everything seems to work fine (although I cannot find the console output) But when I edit the mod to how the author describes, I get many errors. The example

Minecraft Forge Custom Player Command Issues

别来无恙 提交于 2019-12-13 19:26:45
问题 I am trying to make a new command for the first time and was following this tutorial which is slightly old but I believe will still work. After finishing it I tried running my mod and everything ran fine but my command did not exist. Here is my code: public class MainRegistry { @EventHandler public void serverStart(FMLServerStartingEvent event) { MinecraftServer server = MinecraftServer.getServer(); ICommandManager command = server.getCommandManager(); ServerCommandManager manager =

Use jQuery to get session from Minecraft.net [duplicate]

折月煮酒 提交于 2019-12-13 10:13:22
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: XmlHttpRequest error: Origin null is not allowed by Access-Control-Allow-Origin I'm trying to use jQuery to get session id's and stuff from Minecraft.net using https://login.minecraft.net?user=<username>&password=<password>&version=99999 But I can't get it because there is the "Access-Control-Allow-Origin". The data I receive from the server isn't even json which is even harder for me to figure out how to get