Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/21/19 in all areas

  1. All of them except your seed, which unless you add it to those lists in the constructor (terrible idea). No. Probably because its using the default crop inspector, which is mature if the metadata value >= 7. You'll have to write your own inspector is my guess.
    1 point
  2. Ah great, thanks! Looking at the code, I believe the value in Minecraft.getInstance().ingameGUI will be an instance of GuiIngameForge, even though it's stored in a field of type GuiIngame. So that should be perfect, thanks! I think I can just watch RenderGameOverlayEvent.Post and re-do what was done in GuiIngameForge.GuiOverlayDebugForge.update(). EDIT: Rather, take the GuiIngame, pull out its protected GuiOverlayDebug overlayDebug (find the field name for that), and then do as you described to set GuiOverlayDebug.rayTraceBlock and rayTraceFluid.
    1 point
  3. My approach is to create a folder in the user's .minecraft folder (which you can get from Minecraft.getInstance().gameDir) putting a subfolder for my mod, and then subdirectories for each world named after the server address (Minecraft.getInstance().getCurrentServerData()). It works most of the time, but the problem with this approach is that if you're connected to a server, then you use a command or something that moves you to a different server without going back to the connection screen, your mod will still think you're in the server you originally connected to.
    1 point
  4. 1. You should create a new PotionEffect each time; do not store it in a static field. 2. You cannot create a field and use it as the cool down value; the field will be “shared” across all players, thus will mess up your cool down. 3. Check World#isRemote to make sure your code is only ran on the server side.
    1 point
  5. Yes, you can play on 1.12.2 with 1.12.2 mods, and then play on 1.13.2 with 1.13.2 mods when they come out.
    1 point
  6. I got the chrome extension StopModReposts. Consider me signed up for the repost war! Also, after redownloading all my mods, updating my Java version to the latest 64-bit version, and updating my forge version to the latest, it seems like everything is working! My server hasn't crashed in ages and I'm crossing my fingers it won't happen again.
    1 point
  7. By the way: if(false && !world.isRemote) // Forge: NOP all this. Why do you still have that block it does nothing? Its also a terrible idea to use +10 as your UPPER/LOWER value. Metadata is limited by 16 states, meaning you're limiting your max age to 6, whereas if you used a single bit (+8) you could have max ages up to 8. It also means you can use bitwise logic instead (int age = meta & 7; int halfAsInt = meta & 8). this.seed = new CoreSeedFood(name, 3, this); You can't do this. You are not allowed to create items at this point in the startup process. How do you even register this item? The return value from setBlock is not useful in any capacity that I've ever seen. And after a lot of testing, I've determined the issue. This function is run when you use bonemeal: @Override public void onBlockAdded(World world, BlockPos pos, IBlockState state) { if(getHalf(state) == EnumCropHalf.LOWER) world.setBlockState(pos.up(), getDefaultState().withProperty(HALF, EnumCropHalf.UPPER), 2); } It does not run when the block updates.
    1 point
  8. https://stackoverflow.com/questions/23931546/java-getter-and-setter-faster-than-direct-access Basically if you look at the resulting code after a few iterations of it's execution it should be identical in most cases.
    1 point
  9. Here’s an example (in 1.12.2) https://github.com/Cadiboo/Example-Mod/blob/5fe80fde8a41cd571593c02897b06b5822e9a738/src/main/java/io/github/cadiboo/examplemod/client/render/tileentity/RenderExampleTileEntity.java
    1 point
  10. I've pondered this issue too, and for now, I am content to spread my gaming time a bit more broadly. I tried Skyrim SE (The Elder Scrolls) for the first time, a week or so ago. Interesting to me, that game ALSO has a bit of diversity in how people mod it and run it. Several different "mod organizers" are in use in that gaming tribe. Like @vpontin, I am mostly happy to continue on 1.12 Minecraft games while we wait for a new Forge update. (My two young grandsons casually play 1.13, but they are not seriously doing a lot there, so I get a glimpse when I visit them, of the updates. ) I do admit that checking on the status of work on Forge keeps me looking in here, and staying abreast of things MineCraft! Neither game is all that bad played Vanilla, IMO. However, both do look a lot nicer with mods and some of the things mods can let a player try, are worth the wait.
    1 point
  11. That makes sense. Its still possible to recreate this by editing the HTML markup while editing I think. I think that you shouldn't try to remove this because letting users customise their comments with markup is pretty cool. Apparently all you need to do is set the width style and the table-layout style to fixed.
    1 point
  12. A lot of the complaints about Java are sourced from it's verbosity - as diesieben07 mentioned. But that verbosity is also the reason why Java is so popular in the enterprise sector - it makes large projects and collaboration MUCH easier. While it's of course a good idea to write lots of inline comments, Java's main benefit is that it's self-documenting. But again, others might consider it as "too verbose". If you plan on making an opensource mod and like collaboration, I think you really should stick with Java. To save time on the verbosity and repetition, use Project Lombok (it's essential for me these days). Also if you use Eclipse, switch to IntelliJ IDEA - I was resistant to switch for a long time, but after a few days of configuring and learning I am VERY glad I swallowed my pride and took the time to switch and learn. I know Kotlin is gaining ground, and is even now an officially supported Android development language, but sticking to relatively obscure languages will keep your contribution level similarly obscure. I tried to get into Kotlin but I honestly didn't see the point in partitioning my language focus for it's minor benefits. No companies out there will expect you to know it. I personally don't care much for Kotlin. The null-phobia is a reactionary one that is yet-another level of abstraction that isn't necessary IMO and doesn't always provide NPE safety much anyway. But I'm the kind of guy who has my IDE warn me on fields that aren't explicitly declared to null Also it got rid of the ternary operator, and various other little things that just seem counter-productive. But I have a C++ background so yeah. It's obviously loved by a lot of people but it just isn't for me. Java gets a lot of hate, and I've had my fair share of annoyances with it (I started working with C# a while ago and it's really a fantastic language) but I always come back to Java mostly because of the massive community, availability of resources and the volume of capable programmers. It's very easy for any programmer to grasp any Java that even loosely follows the standards and conventions (which is exactly why some criticize it as being too verbose). In summary: I suggest Java with Project Lombok if you want to be community-friendly and keep your commercial-level programming well practiced. Almost all of the major issues people have with Java are solved with Lombok and Java 8's new functional programming additions (i.e. lambda's and method references).
    1 point
×
×
  • Create New...

Important Information

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