Jump to content

TheGreyGhost

Members
  • Posts

    3280
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by TheGreyGhost

  1. Hi Look in BlockStairs.getActualState(), which uses a property enum called EnumShape. I reckon you might find this link useful for background information. http://greyminecraftcoder.blogspot.co.at/2014/12/blocks-18.html Also this example project (especially MBE03) https://github.com/TheGreyGhost/MinecraftByExample -TGG
  2. You might find the info on this page useful http://greyminecraftcoder.blogspot.com.au/2014/12/item-rendering-18.html Also this example project (MBE10). https://github.com/TheGreyGhost/MinecraftByExample -TGG
  3. so what are the symptoms of your problem? -TGG
  4. Hi Well here's the proof [22:56:35] [Client thread/INFO] [sTDOUT]: [stevekung.mods.moreplanets.planets.diona.blocks.BlockBasicDiona:getBlockHardness:50]: getBlockHardness called at pos BlockPos{x=-295, y=56, z=-219} giving blockstate minecraft:air Probably the best thing you can do is to make your code tolerant of being passed air. For example @Override public float getBlockHardness(World world, BlockPos pos) { IBlockState iblockState = world.getBlockState(pos); Block block = iBlockState.getBlock(); if (!(block instanceof BlockType)) return; int meta = this.getMetaFromState(world.getBlockState(pos)); // etc [code] -TGG
  5. Hi Why not just use the blockmodel file you mentioned, eg "age=0": { "model": "chef:corn_block" }, "age=1": { "model": "chef:corn_block" }, etc Vanilla uses hard-coded tricks to control why reeds have one state for all variants, but the others don't. See BlockModelShapes.func_178119_d() if you're really interested. But it's much easier just to write out the states explicitly, I think. -TGG
  6. Hi The rendering instructions for Blocks are only updated when necessary. If you update the information, you need to trigger a block update. Or alternatively, if your blockstate is only used for rendering, change the rendering to a TileEntitySpecialRenderer instead of a BlockModel. For more information see here (first few paragraphs) http://greyminecraftcoder.blogspot.com.au/2014/12/block-rendering-18.html -TGG
  7. java.io.FileNotFoundException: powerapples:models/item/ObsidianApple.json Do you have a file ObsidianApple.json in this folder.. C:\Users\Marcel\Meine Dateien\powerapples\src\main\resources\assets\powerapples\models\item -TGG
  8. OK, you're probably not then IntelliJ IDEA is an alternative to Eclipse. If you're using Eclipse I have no idea what's going wrong, sorry -TGG
  9. Probably because there is no header at the top of the class saying "This is an internal class whose implementation is not stable from one release to the next; the methods should not be called directly". To me this is always the risk with a pseudo-API that exposes its internals, you can't rely on the contract remaining stable (often can't even tell what the contract is). Personally I tend to assume that, if a Forge method has JavaDoc, it will probably remain stable. Otherwise, better not touch it, or at least make sure your automated test cases verify it hasn't changed. Like the Minecraft code really. -TGG
  10. Hi You might find the topics on this page useful http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html Also this example project https://github.com/TheGreyGhost/MinecraftByExample Short answer to your question: Items don't use explicit IDs any more. They are inserted into a registry which takes care of ID numbers and such. They have names instead. For example GameRegistry.registerItem(itemSimple, "mbe10_item_simple"); For a simple item example, see here https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe10_item_simple -TGG
  11. Did you just upgrade to IntelliJ 14? If so read this http://www.minecraftforge.net/forum/index.php/topic,21354.0.html ---> If you are using Intellij 14 (which you should) you need to add the following to the end of your build.gradle before importing: sourceSets { main { output.resourcesDir = output.classesDir } } If you don't do that, your assets will not work. (Thanks to Cazzar for this solution) -TGG
  12. Hi To be honest I can't really tell if programming is for you or not, it takes a long time (like, months or more) to get reasonably good at it. There is an awful lot to learn. On the plus side, you don't need a lot of maths for programming (although it sometimes helps), but you do need to be able to think logically and break complex concepts down into simple pieces. One thing's for sure, I don't reckon you should try to learn programming by jumping into Minecraft modding. That will kill your motivation for sure because it will be days of frustration for almost no results. I've been at it for more than a year and even now I sometimes want to put my fist through the screen after four hours of wild goose chase and digging through hundreds of lines of obscure code. I'd suggest you try working through the example textbook for a few days, coding small tutorial projects. If after a week you're just finding it frustrating, maybe it's not for you. But if you find yourself going to bed at 3am because you lost track of time, and you get a warm glow and an urge to brag to your friends when you've just coded a text tic-tac-toe game that can force a draw with you every time, then you'll know this is something you could stick with... -TGG
  13. Hi Looks to me like getHardness is being called for your block when it's no longer your block. I've seen similar things before in block mining, I don't know why it occurs... You could verify by @Override public float getBlockHardness(World world, BlockPos pos) { IBlockState iblockState = world.getBlockState(pos); System.out.println("getBlockHardness called at pos " + pos + " giving blockstate " + iblockState); int meta = this.getMetaFromState(world.getBlockState(pos)); -TGG
  14. package de.UnknownAssassin.PowerApples; Path: C:\Users\Marcel\Meine Dateien\PowerApples\src\main\resources\assets\PowerApples\textures\items Or have you changed them since your original post? Cheers TGG
  15. Hi What are the symptoms of the problem? Any relevant console errors, screenshots, or youtube videos we could look at? Cheers TGG
  16. Hi Yes your modid, package names, and folder names should all be lower case otherwise it will cause you all sorts of trouble. -TGG
  17. Hi 5 minutes tracing with your debugger would show you this very clearly.. do you know how to use it? If you don't, I recommend you spend a couple of hours learning how to use it, it's awesome and you'll wonder how on earth you ever managed without it eg http://www.vogella.com/tutorials/EclipseDebugging/article.html -TGG
  18. Hi Best thing to do is to make the original texture grey scale i.e. shades of white. If your original texture is blue and you are trying to change it to red, you are really going to struggle. It is possible using rendering & shader tricks to change the hue (convert your blue to grey scale and then to red) but changing the source texture is a hundred times easier. -TGG
  19. Hi It's more complicated now. The links on this page might help, especially the Bocks and Items sections. http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html This example project also has working examples of sub-blocks (MBE3) and items (MBE11) https://github.com/TheGreyGhost/MinecraftByExample -TGG
  20. Unfortunately, as you've probably already discovered, the documentation for Forge is a bit patchy and of "highly variable" quality. There are a number of tutorial sites around which help. The Tutorials section on this board has some good ones. You might also find this one useful http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html and the accompanying sample project https://github.com/TheGreyGhost/MinecraftByExample But most of the time it comes down to trial and error, reverse-engineering the vanilla code, and good debugging skills... -TGG
  21. Hi What's in C:\UselessThings\eclipse\hs_err_pid3428.log Might be a display driver problem. -TGG
  22. Did you try it the other way? It will take you 30 seconds. The JavaDoc is (as usual) ambiguous, but the error message is very clear that you are trying to substitute BlockDirt for BlockNewDirt, which is back to front. /** * Add a forced persistent substitution alias for the block or item to another block or item. This will have * the effect of using the substituted block or item instead of the original, where ever it is * referenced. * * @param nameToSubstitute The name to link to (this is the NEW block or item) * @param type The type (Block or Item) * @param object a NEW instance that is type compatible with the existing instance * @throws ExistingSubstitutionException if someone else has already registered an alias either from or to one of the names * @throws IncompatibleSubstitutionException if the substitution is incompatible */ public static void addSubstitutionAlias(String nameToSubstitute, GameRegistry.Type type, Object object) throws ExistingSubstitutionException -TGG
  23. I also had problems with Gradle integration in IntelliJ. I use the following method which works for me 1) gradlew setupDecompWorkspace 2) gradlew idea 3) Open project folder 4) When it asks "import unlinked gradle project" or words to that effect, choose yes 5) run the gradle task genIntellijRuns Works every time and gives me the gradle tasks especially build. -TGG
  24. > [18:47:56] [Client thread/ERROR] [FML]: The substitute net.minecraft.block.BlockDirt for craft++:dirt (type com.anon10w1z.craftPP.blocks.BlockNewDirt) is type incompatible. This won't work Looks to me like you did the substitution the wrong way. i.e. you tried to replace BlockNewDirt with BlockDirt instead of the other way around. -TGG
  25. Hi Take a look in the error console, it may give you some hints. Also, it might help to look at this example project, it shows the key things you need including -block registration -names to use including mymodname: -model mesher -directory structure https://github.com/TheGreyGhost/MinecraftByExample (MBE example 10) -TGG -TGG
×
×
  • Create New...

Important Information

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