Jump to content

DavidM

Members
  • Posts

    1830
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by DavidM

  1. In simple words, World#isRemote returns true on the logical client side and false on the logical server side. In your case, you want the code to run on the server side, thus you should check if World#isRemote is false. To learn more on sides, check out: https://mcforge.readthedocs.io/en/latest/concepts/sides/ The page also covers World#isRemote.
  2. Of course nothing worked. You can't just copy everything out of its original context and expect it to work. Define "nothing worked" Show your code. We can't do anything without seeing your code.
  3. You can check the time when the event triggers. Also, I would avoid logging pointless info when publishing the mod. This can fill up the log quickly, making useful information hard to find.
  4. Remove FrostCraft and perhaps report to the author of the mod. EDIT: Just realized this is 1.7.10. 1.7.10 is no long supported on this forum; it is so old that people don't know how to help you with it.
  5. Try running gradlew runClient in the command prompt instead. Also, what version of minecraft are you modding for?
  6. EntityPlayerSP is not EntityPlayerMP. You cannot cast from one to another. if (player.world.isRemote) { EntityPlayerMP entityPlayerMP = (EntityPlayerMP) player; //Game crashes here can't cast EntityPlayerSP to EntityPlayerMP The if statement here will only be true on the client side, thus the player is SP, not MP. Are you sure you didn't meant: if (!player.world.isRemote) ?
  7. The mods you installed are not for 1.13.2. Where did you get your mods?
  8. Try updating the mod. If that does not work, try removing the mod or reporting to the mod's author. EDIT: Just checked CurseForge. The author of the mod stopped updating, and the latest version of the mod has problems. You should remove the mod.
  9. You should have stated this before (XY Problem). If that is the case, there is (probably) no need to recreate all the functions of a sword. I haven't looked at TiC's code, but I assume it should have everything built in for a sword. AFAIK all you have to do is override some methods such as Item#getEnchantability.
  10. 1. Use the spoiler to post long pieces of text/log (or, even better, use pastebin or gist). 2. Update your mods. specifically Ender IO related (integrations, Ender IO, etc) All of them.
  11. Depends on your IDE. In my case (Eclipse), looking up a class is Cmd+Click. However, you should probably just make your item extends ItemSword instead of building another sword class from the ground up just for minor changes. What exactly are you trying to do that a vanilla sword cannot do? There are probably ways to achieve without creating another sword class.
  12. Your ResourceLocation should be something like this: private static final ResourceLocation TEXTURE = new ResourceLocation(YOUR_MOD_ID + ":textures/gui/some_gui.png"); Your ResourceLocation looks like this: ResourceLocation texture = new ResourceLocation(Reference.MOD_ID,"/textures/gui/moduleListGUI.png"); 1. Notice the colon (shouldn't be needed if you are using the 2 parameter constructor though). 2. You are adding an extra slash. (The resource location should be toString to "modid:textures/gui/blah.png")
  13. The issue is fixed (as far as I tested) after setting a blend function. I just updated the repo. Thanks for all your help.
  14. The problem seems to no longer occurs after I changed GL11 to GlStateManager. However, I am not sure whether that indeed was the fix to the problem; since the "turning white" only happens randomly, I cannot reproduce it intentionally and test it. The problem might just temporarily not appear for a period of time. As far as I know, GlStateManager handles GLXX operations more smoothly and provides some *insert some advanced and cool nouns here that accurately describe what GlStateManager provides* that optimizes GL operations. I am not aware if GlStateManager can fix problems such as transparency problems though. Currently fixing the blend function as V0idWa1k3r pointed out. Fixed. Oops. The translation was meant for something else earlier; it seems like I set the values to 0 instead of removing it. Thanks for pointing it out.
  15. Thanks. I did indeed disable lighting while enabled blending, and the result is shown in pic 2 (just realized that my wording of “alpha” in the title was inaccurate; I was referring to transparency in general). I am suspecting that I missed setting an attribute at some point. I just updated the repo and replaced GL11 with GlStateManager (I have no idea why I left it GL11).
  16. I am using TESR to render liquid inside a tank as well as animated arrows (blue/orange) that indicate the input/output configuration of the tank. Normally, the tank should look like this: However, when I move to a certain angle, the liquid inside the tank losses transparency and becomes opaque, while the arrows turn to a lighter color: This is not desired. How would I make it so that the arrows and the liquid in the tank stay the way they are as shown in the first picture regardless of the angle I am viewing them? TESR: https://github.com/davidmaamoaix/CommunityMod/blob/master/src/main/java/com/mcmoddev/communitymod/davidm/extrarandomness/client/render/RenderCapacitor.java AnimationHelper: https://github.com/davidmaamoaix/CommunityMod/blob/master/src/main/java/com/mcmoddev/communitymod/davidm/extrarandomness/core/helper/AnimationHelper.java
  17. 1. Do not hijack other people's thread (especially when it is a year old). Please create your own thread. 2. Delete the config for CodeChicken Lib.
  18. I have a tile entity that implements ITickable; I would like the tile entity to perform a function every 20 ticks. However, I would also like to have all instances of my tile entity to perform the function at the exact same tick; therefore, I probably cannot use a counter, as counters are not synchronized across instances of tile entities. My current approach to this problem is to mod totalWorldTime by 20: if (this.world.getTotalWorldTime() % 20 == 0) { someFunction(); } However, modding has a rather big impact on performance, and I am concerned about how performing the modulo operation every single tick might cause significant performance issue if a large amount of my tile entity exists in the world. Is there a more preferable way to achieve this?
  19. The 4 lines you've posted do not show anything. Please post the entire log.
  20. No. This depends on how you register the event bus subscriber. Nothing needs to be static. Refer to this post: @fallOut015 As a suggestion, next time please create your own thread; this thread is almost a year old.
  21. Is it just me or do other people also have trouble going to hastebin.com? The page appears to be blank.
  22. There should be only one launcher for everything. Why do you have multiple launchers?
×
×
  • Create New...

Important Information

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