Skip to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. Question: Why do you require your items to take an unlocalized name via their constructor? You don't use the class for more than one item, so there's literally no point in doing this. Second, why do you use the unlocalized name to register the item? This is bad practice.
  2. Massive amounts of ASM. #DoNotRecommend
  3. In case 2: is the coordinates that the player is teleported to the same as where the player ends up at (albeit underground)?
  4. So glad you fixed that problem on you own so I didn't have to call you an idiot. As for the tiling: Your texture is smaller than the screen. In order to stretch it, you need to draw the exact size that fits on the texture to a much larger area. Minecraft's GUI system is set up to draw 1 texture pixel to 2 screen pixels (at default GUI scaling). You might want to take a look at drawTexturedModalRect .
  5. Uh, let me check. Pretty sure that "Before" and "After" are two different phases. But you know what, do it in only one and see how that works out for you. Oh wait, you did.
  6. The arrow model isn't circular, it looks like 3 intersecting planes. Amazing how realistic this looks: Only....not.
  7. Before it renders: push the state, change the state After it renders: restore the state
  8. The arrow model still has a texture associated with it. That doesn't mean it renders it as a single plane though.
  9. Arrows are 3D objects. You will not be able to render a flat texture in such that it appears to be a sphere. The closest you can come is a camera-facing-billboard, like name tags.
  10. if(meta == 1) { getTE() } ... if(meta == 1) { getTE() } ... if(meta == 1) { getTE() } ... if(meta != 1) { getTE() } //crash here Hmm. One of these things is not like the others.
  11. Draco18s replied to a post in a topic in Modder Support
    Functions and methods aren't the same thing, a method is a special kind of function: http://stackoverflow.com/questions/155609/difference-between-a-method-and-a-function
  12. Haha, boats. Wasn't that long ago that I was fooling around in my own mod (1.7.10, dedicated server that was the same machine as my client) and the server's location for me was so far out of synch that the chunk directly under me go unloaded.
  13. Also, some potion effects will be utterly harmless when you tick them once (poison, hunger, slowness, weakness, fatigue, wither) while others will be super deadly (instant damage).
  14. Draco18s replied to a post in a topic in Modder Support
    http://www.learnjavaonline.org/
  15. Draco18s replied to a post in a topic in Modder Support
    Except that this isn't math, this is English, and I told you to write a story of your summer vacation. And you want me to provide you with an example summer vacation story that includes you traveling to Disney Land. Or alternatively if you want to stick with the math analogy, it looks like this: Me: "With the function f(x): y = x2, what is Y when X equals 3?" You: "What do you mean 'squared'?"
  16. The crash tells me that your code is wrong.
  17. Draco18s replied to a post in a topic in Modder Support
    Because you do not know how to invoke a method then any response we could give to help you would be spoon feeding. Because you do not know a basic, fundamental, operation of object oriented programming.
  18. If you follow the World#getBiomeForCoordinates() call stack you'll see how it gets access to the biome stored at a particular coordinate. You'll then have to write your own method(s) to change the value.
  19. There are other, better ways of doing this. For one, if your mod is required client and server (which 90% of most mods will be) then Forge does this automatically for you and disallows the connection if the mod is missing. If its only optional, then you can get access to the list of mods the client connection has, because see above. Normally the mod list can't be considered reliable (as someone can make a mod that doesn't report itself to the server) but as you're not doing something asinine like that, then your mod will show up in said list.
  20. Item#hasContainerItem(ItemStack) / Item#getContainerItem(ItemStack) are part of the blender. The blender tells the crafting table that its container item stack is itself. This isn't a recipe thing, this is an ingredient thing.
  21. Because you asked for a field named "maxDamageArray" not "field_77882_bY" which is what it will be in a runtime (not development) environment (at least, in 1.7.10, I can't find the mappings for 1.8.9 as quickly).
  22. Been a while since I looked at it, TBH.
  23. replaceBlocksForBiome is intended for replacing the top 4 blocks of stone with grass or sand (or at least, that's what Minecraft uses it for). The bottom bedrock is handled by the chunk provider the last time I looked at it.
  24. Oh god. Why is your render registration code inside your item? That will absolutely positively crash the server, it does not give a shit that you only call that method from the client, the JVM still needs to load the class and validate it and the mere existence of a reference to a client-side class will cause it to attempt to also load that class. Why are you using getUnlocalizedName()? The unlocalized name shouldn't be used for anything other than language localization. You did not include your JSON
  25. You will want the data in two places. Place 1 is where it gets read from the config file and stored. I would store this in my ServerProxy (or CommonProxy, whatever you want to name it). These values will still exist when the player logs into a server, but won't be used unless the player starts a local server. Place 2 is where the client would store the values it receives from the server and uses for display. I would store this in my ClientProxy. Note: this is a separate field that is public in the ClientProxy along side the public field in the ServerProxy. These client-side values would be overwritten every time the client receives the info packet the server sends on login (sent in the PlayerLoggedInEvent from the sever). The cool thing is, you don't have to do anything special for this setup to work for a singleplayer game: the single player instance would send a packet to the single player client and the values would be updated correctly.

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.