Jump to content

SanAndreaP

Forge Modder
  • Posts

    1689
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by SanAndreaP

  1. Add -XX:PermSize=512m -XX:MaxPermSize=512m to your parameters and try again
  2. Update to 1.7+ as 1.6.4 is no longer supported, 9 months is long enough.
  3. First part: You need to create an Item class which extends ItemBlock and override addInformation in there. After that, bind this class to your block instance when registering your block with the GameRegistry: https://github.com/SanAndreasP/EnderStuffPlus/blob/master/java/de/sanandrew/mods/enderstuffplus/registry/ModBlockRegistry.java#L109-L111 Second, this:
  4. Yes, it is necessary to have Forge installed on your client when connecting to a Forge-modded server (preferably the same version as the server). On the other hand, you can connect to a vanilla server with a Forge-modded client. The same goes for mods. You need the mods the server has on your client, but you can have more mods on your client than the server has (they simply aren't working in Multiplayer). Why? The Server does all the work. If the client does not know exactly what the server does / can do, then there will simply be discrepancies (for example the server includes a new hostile entity, client doesn't know because the mod isn't installed, Player gets killed by it and doesn't know why, because he couldn't see it).
  5. Look at this: http://www.minecraftforge.net/forum/index.php/topic,19692.msg99738.html#msg99738 It was a PITA to figure out everything, but it works quite well. I'll also do a PR when I get time.
  6. Check if the entity variable is an instance of the EntityLivingBase class and if true, cast to it, not to Object.
  7. I've included a hook in my coremod. I will do a PR however when I get time (by the way, it's a PITA to recode the horse armor stuff for horses, EVERYTHING is hardcoded in there). For anyone who's interested: Item class: https://github.com/SanAndreasP/SAPManagerPack/blob/master/java/de/sanandrew/core/manpack/util/ItemHorseArmor.java Transformer: https://github.com/SanAndreasP/SAPManagerPack/blob/master/java/de/sanandrew/core/manpack/transformer/TransformHorseArmor.java
  8. You need to send a packet. For tutorials on how, google it, there are a ton of tutorials out there.
  9. That works, too and is less resource-intensive.
  10. To control where the mob spawns, override getCanSpawnHere and return wheter it should spawn (true) or not (false) To check a radius, do this: Math.abs(spawnX - entityX) >= 500 && Math.abs(spawnZ - entityZ) >= 500 will check if it's not in a 500x500 squared perimeter around the spawn Math.sqrt(Math.pow(spawnX - entityX, 2) >= 500 && Math.pow(spawnZ - entityZ, 2)) >= 500 will check if it's not in a circle perimeter with radius 500 around the spawn (I think the math is right, don't count me on that, though)
  11. You can use the TextureStitchEvent.Pre event to register a new icon independent of a block / an item. To do it, register to that event. You also need a field somewhere to hold the icon instance (e.g. public static IIcon sun ). Check if the texture type of the map (the map is a field in the event) represents the type of the icon. Check if it's 0 for blocks or 1 for items. Icon texture files registered as item icons belong next to the "actual" item icon files, same for blocks. Use map.registerIcon like you would register an icon in a block/item, like sun = event.map.registerIcon("enderstuffp:sun"); . After that, you can reference the field anywhere you see fit. No need for ResourceLocations here.
  12. You could be more specific... All your Item/Block registration must go into the FMLPreInitializationEvent
  13. Remove the ${} in both, version and mcversion, since those characters aren't supposed to be there. Also I recommend the formatting "MCVERSION-MODVERSION" (e.g. "1.7.2-0.0.2a" - "a" is for alpha, "b" would be for beta) in your version field.
  14. Why not use the PlayerInteractEvent? Check if the type is RIGHT_CLICK_BLOCK and it'll have the block coords of the block right-clicked. Check if the player has flint and steel and do your custom code if all conditions are met.
  15. localBlock is never assigned to a value. Remove the definition of it and rename the id variable to localBlock
  16. Jup, using it for my custom ForgeGradle helper program: http://files.minecraftforge.net/maven/net/minecraftforge/forge/json
  17. You should not learn Java by modding Minecraft. You will only learn things common in Minecraft, but if there's a problem, you don't know what to do (best example is this thread). I suggest read some basic Java tutorials and make a standalone program yourself first before attempt to mod Minecraft.
  18. Partially wrong. You need to feed it the full qualified class name, which is the package path of the class with its name. rootpacket.subpacket.classname
  19. use the PlayerInteractEvent and check if the held item of the player is flagged. Just cancel the event to disallow the placement / activation of items / blocks. To also disallow the interaction of entities (when a mob is right-clicked), use the EntityInteractEvent and cancel the event.
  20. Or, you know, just override moveFlying and call the super method with a different 3rd parameter: moveFlying(par1, par2, par3) { if isInWater then par3 = aCustomValue super.moveFlying(par1, par2, par3) } No need to copy-paste this monstrosity for a tiny change like this.
  21. This was the case pre-1.7. Look here: http://puu.sh/8Sq6V.png Either there's something missing or the vanilla renderer has exceptions for specific blocks (like the stained glass) EDIT: looking at it again, if the renderBlockPass is > 0, it uses blend (look at the doRender method, line 124 in class RenderItem) BTW: Always add @Override to methods you intend to override! It shows you errors if you, for example, made a typo somewhere or the method signature changed.
  22. Use EnchantmentHelper#getEnchantmentLevel(enchId, itemStack) where enchId is the ID of the enchantment (e.g. Enchantment#fortune#effectId) and itemStack is the ItemStack you want to check (in your case the stack passed as parameter in your method). The method returns 0 if it isn't enchanted, else it returns the level of the enchantment.
  23. You need to override readFromNBT and writeToNBT and save/load you properties there. Also don't forget to call the super method!
  24. A mod like that is veeeeeery easy to make, you literally only need 1 class. But if you really don't wanna start learning java first, then I could make one really quick...
  25. Your pastebin was removed... also it's called authorsList
×
×
  • Create New...

Important Information

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