Jump to content

DavidM

Members
  • Posts

    1830
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by DavidM

  1. *Person looks at the two log. *Person finds one line being the same while the rest can potentially be totally different. *Person gets frustrated and accuses others who tell him "the error might not be the same" cannot read. Balanced, like all things should be.
  2. The point is the values cannot be static, and should contain the data to be send across the sides each time.
  3. Make sure you are consistent with the way you are achieving stuff. Either set all register names in the constructor, or set them when the object is instantiated and registered. The same applies to setting creative tab. I can see that you are trying to create a clean, neat method of registering everything with ModUtil; unfortunately, your ModUtil is currently achieving the exact opposite effect. The main problem of your ModUtil is that it is lacking a solid structure; registries don't follow a clear routine, and will result in redundant registering and other undesired effects.
  4. Write a method that search for wood nearby, and use path finder to navigate your entity toward to position. Destroy the wood blocks and add the wood to the entity's inventory. Navigate the entity back to the start position with the path finder. I would suggest searching up how entity AI and path finding work. Don't just copy code you find from the internet; instead, learn how the code work and write it yourself. You will learn more this way.
  5. Craftable Spawner mod is broken. Remove/update it or report to the author. I thought this is the support forum. Sorry. Please post your code. 1. You don't seem to own organicapple.com, as it is currently already registered by a corporation. You cannot use the domain as package name if you don't own the domain. 2. "csm" is not a good mod id; it is too short, and will cause conflicts with other mods.
  6. How can the player teleport to the nether after he is already dead? Please elaborate. Perhaps you want him to respawn in the nether?
  7. 1. All methods, except final ones, are overridable. 2. This does not mean you should try overriding without the @Override annotation. 3. No, you don't need to subscribe to everything; you just have to override Block#onBlockActivated.
  8. I am very sorry to tell you this, but the code and structure of your mod is a complete mess. Judging by the class names, I assume that you followed HarryTalks' videos. Stop following his tutorials, as they are terrible and promote bad practices and outdated methods. These bad practices (static initializers, etc) will eventually cause more problems. One example is the crash you are facing now. Personally, I would recommend to follow a better guide/tutorial and rewrite the majority of your mod. Examples of good tutorials are: https://github.com/Cadiboo/Example-Mod/ and https://github.com/TheGreyGhost/MinecraftByExample, both of which explained some difficult concepts of modding in details.
  9. 1. Your repo is set up incorrectly; the root of your repo needs to be the root of the forge mdk. 2. Why do you have .class files in your src? 3. Stop using static initializers. Read the Common issues and recommendation for more details. 4. Stop using BlockBase/ItemBase. Read the Common issues and recommendation for more details. 5. Stop using IHasModel. Read the Common issues and recommendation for more details. 6. Your tile entities use bad practices like getters like this. Use normal getters instead. 7. Clean up your repo. There are random .gitignores splattered around everywhere. 8. As for your problem: Move this to your client proxy. Alternatively, you can move it to the ModelRegistryEvent (not the best idea tho), which only triggers on the client side.
  10. What launcher are you using?
  11. AFAIK some server plugins check whether players' actions are valid, and cancel the actions if they are too... abnormal. You would be better off to just implement the whole mechanic on the server; this will save a lot of hassle.
  12. AFAIK wavefront models already contain the UV data in it; does that mean I'll have to create a new model for every texture?
  13. I haven't really rendered wavefront models in Minecraft before; how would I bind textures to wavefront models via code? Is it still through TextureManager#bindTexture (Minecraft.getMinecraft().renderEngine.bindTexture)?
  14. I am trying to render a sphere (with 3 layers) with textures as such: https://github.com/DanielHeEGG/RapidOxidation/blob/e5736a1eb97db41727802883dfc0906bd33507a3/src/main/java/com/daniel_egg/rapidoxidation/client/render/RenderFireball.java#L28-L50 The texture I used look like: However, the sphere in-game looks like: This is not desired; I would like the sphere to have the texture in picture one. My current guess is that the texture on the sphere is scaled too large, resulting in only a tiny fraction of the texture is displayed. How would I fix this problem?
  15. Thanks. I am currently rendering my sphere with callList: https://github.com/DanielHeEGG/RapidOxidation/blob/507cb3bdb5e0fca20c3308ec6fa8a47b3a94de32/src/main/java/com/daniel_egg/rapidoxidation/util/RenderUtil.java#L20-L29 Is it possible to apply UV then? (AFAIK no?)
  16. I've create animated textures for items and blocks with .mcmeta files. However, I would like to apply an animated texture to a sphere rendered with lwjgl. Is it possible to bind animated textures to GlStateManager?
  17. Why are you doing this on the client side? A better way would be to implement such interactions on the server side.
  18. Thanks???. That explains everything.
  19. I've created an entity that extends EntityThrowable. The projectile is at: https://github.com/DanielHeEGG/RapidOxidation/blob/master/src/main/java/com/daniel_egg/rapidoxidation/entity/ProjectileFireball.java I've created the Rendering class as such: https://github.com/DanielHeEGG/RapidOxidation/blob/master/src/main/java/com/daniel_egg/rapidoxidation/client/render/RenderFireball.java Render factory (currently a separate class): https://github.com/DanielHeEGG/RapidOxidation/blob/master/src/main/java/com/daniel_egg/rapidoxidation/client/render/factory/RenderFactoryFireball.java I've made sure the render factory is called by adding printlns. However, the entity is rendered as a white block in-game: After adding printlns to the RenderFireball#doRender, I realized that the doRender method is not called at all. How would I fix this? In addition, is there anything else I am doing wrong in terms of rendering and registering entities?
  20. That is what the @Override annotation is supposed to do: throwing an error when the signature of your method does not match methods in the parent method. Your problem is caused by the method signature being incorrect.
  21. No. HarryTalks is one of the worst tutorials out there as it teaches you bad practices and cargo-cult programming. This is a common problem of youtube tutorials. Personally, I would recommend text-based examples such as https://github.com/TheGreyGhost/MinecraftByExample and https://github.com/Cadiboo/Example-Mod, both of which explained in details about what everything does.
  22. I have a "wand" item that, when right-clicked, should shoot a fireball. I would like the wand to act somewhat like a vanilla bow. When right-click is held, a fireball is summoned (stationary) in front of the player; the longer right-click is held, the bigger the fireball gets. When right-click is released, the fireball is shot forward. I'm currently unsure on what is the best method of rendering the "stationary" fireball during the period of time right-click is held, as I want the fireball to be rendered both in first-person and third-person. In first-person, the fireball should appear in front of the screen. In third-person, the fireball should appear in front of the player. What is the best method to achieve this? Should I create a fireball entity and hold it in front of the player? Should I subscribe to RenderPlayer and RenderScreen and manually render the fireball?
×
×
  • Create New...

Important Information

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