Jump 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.

Mazetar

Forge Modder
  • Joined

  • Last visited

Everything posted by Mazetar

  1. Oh wait a sec, the func_110147_ax() is run before the rest of the constructor runs. And super constructors must be called first in java I seem to recall... Hmm maybe I could move the code currently inside the func_110147_ax() into the end of the constructor for my super class?
  2. but when I'm setting it to for example 300, how does it end up defaulting to null?
  3. Hi! So I'm working on updating a mod to 1.6 and I figured I would be smart and make a super class to handle some of the stuff for me. So I made a super class which takes inn the speed, health, dmg and followRange of a mob as params to the constructor. Then I register the attributes like this: protected void func_110147_ax() { super.func_110147_ax(); this.func_110148_a(SharedMonsterAttributes.field_111267_a).func_111128_a(maxHealth); this.func_110148_a(SharedMonsterAttributes.field_111264_e).func_111128_a(attackDmg); this.func_110148_a(SharedMonsterAttributes.field_111265_b).func_111128_a(followRange); this.func_110148_a(SharedMonsterAttributes.field_111263_d).func_111128_a(moveSpeed); } Which in theory should enable me to do the following (or so I thought): // The default constructor for the mob public EntitySomeMob(World world) { // Speed, hp , atkDmg super(world, 0.3F, 300, 10); this.isImmuneToFire = true; this.experienceValue = 20; } Now there seems to be something with the code not liking my HP values, as mobs seems to die instantly when they are spawned into the world? It seems that the health when set above 255 is set to 0, so I assume it's cast to a byte somewhere, I'm guessing for use with data watchers? So my questions are the following: 1. As I know there's possible to have mobs with large amounts of HP, there must be a solution to this, does anyone here have any pointers? Could I perhaps write myself around the use of the datawatcher, or am I perhaps mistaken about that part? 2. Are there better ways to handle the setting of attributes? or is this a good and simple way compared to other methods?
  4. There are many functions of the Item which you can look into. If you look into the Item.java class of the minecraft project you will see many methods, look into them and you will find several interesting ones like onItemUse and so on. If you press Ctrl+Shift+T inside eclipse and type Item you should be able to find the main Item class rather quickly
  5. I'm not sure what you mean by click it. Do you mean having it in the hand and then clicking?
  6. This worked for the texture problem, now I just need to remove the particles that come off of it. I took a look at BlockTorch.java and at the bottom (lines 281-320), it describes how they are generated. Is there a way for this section to be disabled/skipped? it's simpler to change the recipe or to replace the block edit: the alternative is ASM.
  7. Yeah that's one way to do it, and hope you don't get too many compatability problems But since his item is from crafting only, he can get away with the just changing the recipe result.
  8. set the texture name to modid + ":" + "textureName"
  9. Check what the console output says about your texture.
  10. Aye that's one easy way to do it
  11. Mazetar replied to ss7's topic in Modder Support
    ss7: public ElectricerRenderer(ModelBase par1ModelBase, float par2) What do you think you're supposed to pass in as an argument here?
  12. world.getTopSolidOrLiquidBlock(x pos, z pos); Gives you the height (y value) of the top block at the x/z position.
  13. Isn't that the old one which uses blockID's? if that's the case then it should work regardless of version Anyways you could check out LibSchematic by TehBeard it's a Schematic Import lib for forge mods. You can check out the LibSchematic.sh repo as well to find an example of how to implement and use it
  14. Mad's wrote a tutorial of sorts which contains similar code to yours for "Loading Images from an External Folder" maybe you could discover what's wrong by looking into his post? http://www.minecraftforum.net/topic/1963245-162-mads-forge-modding-tutorials/
  15. Hmm in order to stop the vanilla function for those methods you will either have to prevent them from firing their given methods or change the default keybindings to something obscure so they won't get hit at all I guess?
  16. What about storing the Te in a temp variable so you can set it back to the original te after the Block has been replaced?
  17. Does world.getWorldInfo() have any helpfull methods for this perhaps?
  18. Maybe you need to tell the world to re-calculate lightning? I know from working with schematic API's that there are many which have problems correcting light issues, due to it not updating properly after being set
  19. This may be of interest to you: http://greyminecraftcoder.blogspot.com.au/2013/08/lighting.html
  20. There are several block methods called "onBlockXXX" some of them are related to being added or placed into the world. All of them have params for the position.
  21. Uhm and this ever becomes a problem for you? I don't see why you would ever encounter that problem with Stack Size being higher than Short.MaxValue From oracle's java documentation: Edit: Oh I see, I misunderstood completely due to the name of the variable I thought it was about ItemStack's stack size or how many you could have in a slot. After watching the video I understand what ya mean I'm on way to bed so I can't look more into it, It's an interesting problem though
  22. Consider the logic behind that for a second, what would happen if you do that, would the thing still be null? or go try things
  23. Place a breakpoint at WelcomeMessages.java:15 and see what is null during runtime?
  24. Awesome plan! I approve!
  25. joaopms, you should check out http://courses.vswe.se it will learn you all the basics of the arts to which you are an apprentice Also it will introduce you to packets, Guis, models, server->client "instant" sync, and much much more. It's way better than any tutorial on the wiki or anywhere else and it's the most complete introduction to minecraft modding you can find. It's not a tutorial, it's an actual course you take, and it's 100% free! I advise you to take your time to follow those courses, from start to end without skipping lectures or assignments. Start with "a cup of java" and move down the lists of lectures and then do the next course after completing the assignment. Do those courses and pass the final assignment and tho shall be a mere apprentice no more

Important Information

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

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.