Jump to content

TheGreyGhost

Members
  • Posts

    3280
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by TheGreyGhost

  1. Hi The error log should show a line something like "texture not found: showing missing texture" Pls post that here? > none of the functions have methods assigned in the class This might be an obvious question- do you realise that, if BlockTulipTreeLeaves extends BlockLeavesBase, and BlockLeavesBase extends Block, then you can override Block methods in your BlockTulipTreeLeaves? -TGG
  2. Hi You need a TileEntity with TileEntitySpecialRenderer for this. Alternatively, you can use a block with metadata. That will let you choose from up to 16 different textures for each block, varied independently. A quick google should find you a number of tutorials on both of these. -TGG
  3. Hi This link might help. http://greyminecraftcoder.blogspot.com.au/2013/11/how-forge-starts-up-your-code.html Looks to me like you're missing a declaration of the proxy variable in your main class. -TGG
  4. Hi The bounding box is "centred" around around the entity location [posX, posY, posZ]. It doesn't automatically rotate as the entity rotates, it always stays aligned with the x, y, and z axes. The units are the same as the blocks, i.e. 1.0 is 1 metre is 1 block. -TGG
  5. Hi the code you posted is close, I reckon it will work if you modify it slightly to use the following event: /** * Fires before mob spawn events. * * Result is significant: * DEFAULT: use vanilla spawn rules * ALLOW: allow the spawn * DENY: deny the spawn * */ @HasResult public static class CheckSpawn extends LivingSpawnEvent In your handler you should call event.setResult(your result here); -TGG
  6. Hi Could you post your code somewhere? I can try downloading it and seeing if I can trace through what's wrong. Will take a couple of days, though... -TGG
  7. Hi Name is Block.getTextureName() for vanilla blocks so you can probably just use that. Re TextureStitchEvent: Yes, that's what I meant. Background info on events here if you need it: http://www.minecraftforum.net/topic/1952901-172164-eventhandler-and-iextendedentityproperties/ > Sorry, first time trying modding animations. No worries. Some of this is new ground for me too in 1.7.2 :-) -TGG
  8. Hmmm I'm rather rusty on animations unfortunately but from memory you need to register it in a special way; TextureMap.setTextureEntry instead of registerIcon /** * Adds a texture registry entry to this map for the specified name if one does not already exist. * Returns false if the map already contains a entry for the specified name. * * @param name Entry name * @param entry Entry instance * @return True if the entry was added to the map, false otherwise. */ public boolean setTextureEntry(String name, TextureAtlasSprite entry) { if (!mapRegisteredSprites.containsKey(name)) { mapRegisteredSprites.put(name, entry); return true; } return false; } You could try hooking into the TextureStitchEvent.Pre, and in the handler create your TextureNullOre and then call setTextureEntry(name, textureNullOre) . Unfortunately I've lost my old test code for this so I don't remember details -TGG
  9. Hi No the tutorial looks like it is for 1.6.4, however all the important concepts you need are in there. If you take your 1.7.2 mod for a normal block / item, and adapt it to match the extra / special stuff in the tutorial, it should work fine. -TGG
  10. Hi If you put a breakpoint in public void updateAnimation() { does it actually get called? When you say- "Ok, now it is cycling through red, orange, and yellow." 1) are the textures correct? i.e. it cycles through the correct textures, or 2) are the "red, orange, yellow" just random textures that are totally wrong, or 3) are the "red, orange, yellow" a single correct texture that is changing colour by itself? -TGG
  11. Hi seen this tutorial? Havvy's stuff is usually pretty good. http://www.minecraftforge.net/wiki/Plants -TGG
  12. Hi There were a couple of recent posts in this forum (1-2 weeks ago?) with exactly the same symptoms, you could try a search for those eg http://www.minecraftforge.net/forum/index.php/topic,18775.msg94918.html#msg94918 -TGG
  13. Hi I'm pretty sure you're right, just creating a File doesn't actually create it on disk until you ask it to (eg createNewFile()), likewise canRead() doesn't create it automatically either. -TGG
  14. Hi This part in Configuration.load() creates the new file automatically if it doesn't already exist if (!file.exists() && !file.createNewFile()) { return; } -TGG
  15. Hi Could you post the crash log pls? That will help us narrow it down. -TGG
  16. Hi You could either use a TESR as DieSieben suggested, alternatively you could use an animated texture and change the texture based on whether the player is wearing a helmet or not. This can be tricky to get right but I think it should work. Check out TextureClock. This link may also help - see the clock and compass sections http://www.minecraftforum.net/topic/1881638-animation-in-resource-packs-a-minecraft-16-tutorial/ -TGG
  17. Ah. public static Item ChocoDust; @EventHandler public void load(FMLInitializationEvent event) { ChocoDust = (new ItemFood(5000, 3, 3, false)); LanguageRegistry.addName(ChocoDust, "Chocolate Dust"); } The problem is that you never create an instance of your ChocoDust class. I'm guessing that you're just starting out Java? Your code should look something like this public static ChocoDust chocoDust; @EventHandler public void load(FMLInitializationEvent event) { chocoDust = new ChocoDust(xxx); LanguageRegistry.addName(chocoDust , "Chocolate Dust"); } and your ChocoDust class should probably extend ItemFood, not Item. (I haven't tried to compile that code there so it might not be exactly right) Here's a link you might find useful if you're just starting out with Java http://www.minecraftforge.net/forum/index.php/topic,16784.msg84954.html#msg84954 -TGG
  18. Does your error log have an error in it something like this [sEVERE] [Minecraft-Client] Using missing texture, unable to load: testitemrendering:textures/items/Error.png If so, pls post it? -TGG
  19. Hi Try http://greyminecraftcoder.blogspot.com.au/2013/12/overview-of-forge-and-what-it-can-do.html -TGG
  20. Hi My guess: it's finding a file, but not the one you think. When running the published mod, try renaming the file you think it is reading, and see if it complains. That might give you a clue. -TGG
  21. Hi I don't think there is any such command in OpenGL, I imagine it would take a bit of work with shaders which is out of my experience... What I would do - take the player texture and create a greyscale version of it, either using the CPU or by using render-to-texture for the three channels with appropriate blending. http://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color Personally I'd use CPU because I haven't used OpenGL render to texture before, although I'm told it's quite easy. -TGG
  22. Hi Looking at the error logs, when you removed the ".obj", it actually failed earlier than before, so removing ".obj" is probably not a fix at all. It seems more likely to me that you've just put the .obj in the wrong folder, or the name doesn't match exactly (upper/lower case is important) Curious that the URL resource = AdvancedModelLoader.class.getResource(resourceName); appears to work, but the loadObjModel(resource.openStream()); doesn't. You could try putting a breakpoint into the WaveFront constructor, the fileName and URL resource parameters might tell you where it's looking. Alternatively this has worked for me with textures, might be worth a try. http://www.minecraftforge.net/forum/index.php/topic,11963.0.html -TGG
  23. The blending is done using the source and destination colour instead of alpha information, due to this command GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_SRC_COLOR); This makes the blending use the source colour and destination colour, instead of the more usual alpha blending GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); You may also need GL11.glEnable(GL11.GL_BLEND); before the rendering. These bits are also important to make the cracks stand a bit proud of the block surface GL11.glDisable(GL11.GL_ALPHA_TEST); GL11.glPolygonOffset(-3.0F, -3.0F); GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL); GL11.glEnable(GL11.GL_ALPHA_TEST); See this link for more information... http://www.glprogramming.com/red/chapter06.html -TGG
  24. Hi From AdvancedModelLoader:: public static IModelCustom loadModel(ResourceLocation resource) throws IllegalArgumentException, ModelFormatException { String name = resource.getResourcePath(); int i = name.lastIndexOf('.'); if (i == -1) { FMLLog.severe("The resource name %s is not valid", resource); throw new IllegalArgumentException("The resource name is not valid"); } It thinks your resource name is not valid because it doesn't contain a period '.' Are you sure that the reason that it couldn't originally find the file was because it ended in .obj? What did you change to fix it? (i.e. did you rename the file, the resource name, or both?) -TGG
  25. Hi Some help with textures: http://greyminecraftcoder.blogspot.com.au/2013/12/overview-of-forge-and-what-it-can-do.html http://www.minecraftforge.net/forum/index.php?topic=11963.0 Typically this problem is caused by the upper/lower case doesn't match exactly. -TGG
×
×
  • Create New...

Important Information

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