Jump to content

SanAndreaP

Forge Modder
  • Posts

    1689
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by SanAndreaP

  1. 1. No need for you to create new variables, just directly reference the fields from your ModBlocks class. 2. shouldRefresh has different parameters, that's why you can't override it. Use your IDE's auto-complete feature or look at the TileEntity class for the right implementation. Hint: The first and second parameters are Block type, not int. 3. You don't need to call it, that's why you should override it 4. By second block parameter I meant the second Block parameter from the (correct) shouldRefresh method. 5. You can shorten your check to one return statement w/o an if-else block.
  2. xCoord, yCoord and zCoord should be used as parameters inside world.getBlockMetadata . Are you new to Java as well? If so, I strongly recommend to learn Java outside of MC modding first (there are Java tutorials all over the internet) or you'll have a hard time figuring stuff out.
  3. In your TileEntity, override shouldRefresh and return true when the second block parameter does not match one of your PyrolysisChamber blocks (the active and inactive one).
  4. public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) x, y and z are referring to the rendering location, which is not centered on the world center 0,0,0, but actually on the player position. Use tileEntity.xCoord, .yCoord and .zCoord to get the correct world coordinates of your TileEntity. The renderer still needs to be translated with the rendering coords x, y, z, though, so keep GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F); as it is!
  5. Add -Djava.library.path="C:/ForgeGradle/build/natives" to your VM arguments in your debug configuration. Replace C:/ForgeGradle/build/natives with the actual path to the build/natives folder in your ForgeGradle environment.
  6. Add FMLCorePluginContainsFMLMod: true Then it should work.
  7. C:\Users\MY_USERNAME\.gradle\caches\minecraft\net\minecraftforge\forge\FORGE_VERSION\srgs
  8. You forgot break statements.
  9. Those 2 calls you get is because of server and client. Just check for worldObj.isRemote == false to make sure you're on the server. To update the rider's position, override updateRiderPosition and use this.riddenByEntity.setPosition(x, y, z) . Make sure you do not check for the server here, you need to do that on both client and server or else it will stutter.
  10. To add on what diesieben07 said, you need a subclass of TextureAtlasSprite. Mine is a variation of the vanilla compass texture (it just points to a different location). https://github.com/SanAndreasP/EnderStuffPlus/blob/master/java/de/sanandrew/mods/enderstuffp/client/util/TextureAvisCompass.java I also have a texture file, but you don't really need one, you can just supply your own image data (look at the methods inside the TextureAtlasSprite class) Next thing is you need to register a new instance of your custom sprite and hold this instance in a variable for the item to return as IIcon. So handle the TextureStitchEvent.Pre to register it to the texture map: https://github.com/SanAndreasP/EnderStuffPlus/blob/master/java/de/sanandrew/mods/enderstuffp/client/event/TextureStitchHandler.java and set the itemIcon field to the instance of the sprite instance (You can of course use the IIcon-returning methods if you happen to have multiple textures): https://github.com/SanAndreasP/EnderStuffPlus/blob/master/java/de/sanandrew/mods/enderstuffp/item/ItemAvisCompass.java#L65
  11. You can make a super class BlockColoredBed and have all your custom colored beds extend that class. Then in your superclass, override isBed and check if this instanceof BlockColoredBed .
  12. Or, you know, just read the EAQ... Basically: Update your Minecraft and Forge.
  13. Nope. Forge made a hook for that. @kander16: I don't see you overriding isBed() in your blocks class. You need to do that in order for it to be recognized as a bed. (The original implementation checks if the block instance is Blocks.bed , so it will return false on your block instance).
  14. Use the 1.7.10 version of Forge. 1.7.2 is outdated.
  15. I skipped it, 1.7.2 is outdated anyway and there's no reason to not go straight to 1.7.10.
  16. Where do you do blockArray[1] = ModBlocks.modblock; ? You said next line... so directly below where you initialize the array? That is wrong. You need to set it inside a constructor/method/initializer.
  17. Well, I did. From the TF jar file: @Mod(modid="ThermalFoundation", name="Thermal Foundation", version="1.7.10R1.0.0B3", dependencies="required-after:CoFHCore@[1.7.10R3.0.0B4,)", canBeDeactivated=false)
  18. Do you even want to read the EAQ? If 3 different people tell you to read the EAQ, your error is most likely answered there. And surprise: it's there. HINT: it's the 5th last point in the link I gave you / the section diesieben07 mentioned. Also don't double post.
  19. I point you to the EAQ again: http://www.minecraftforge.net/forum/index.php/topic,20.msg8027.html#msg8027 Also, net time use spoilers or a pastebin site.
  20. No logs. No help. Also read the EAQ: http://www.minecraftforge.net/forum/index.php/topic,20.0.html
  21. what? @coolAlias I can't explain this behavior either. Did you try to reproduce this crash with only LiteLoader? Either way, I doubt it's a Forge issue, unless you can reproduce this with only Forge. But when casting something to a subclass, always assume the class is something different, so always check if it's the class you want to cast to before the actual casting.
  22. Capitalization, mate: fireSilver_Layer_0.png fireSilver_layer_0.png.mcmeta
  23. http://lmgtfy.com/?q=forge+event+tutorial
  24. GuiContainerCreative has an implementation of scrolling.
×
×
  • Create New...

Important Information

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