Jump to content

TheGreyGhost

Members
  • Posts

    3280
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by TheGreyGhost

  1. Hi You might find this tutorial project useful. See MBE10. https://github.com/TheGreyGhost/MinecraftByExample Some background explanation here http://greyminecraftcoder.blogspot.com.au/2014/12/item-rendering-18.html And you'll probably need this link at some point http://greyminecraftcoder.blogspot.com.au/2015/03/troubleshooting-block-and-item-rendering.html -TGG
  2. Hi This troubleshooting link might help http://greyminecraftcoder.blogspot.com.au/2015/03/troubleshooting-block-and-item-rendering.html A key thing to look for is error messages about textures or block variants in the console, they will often give a very good clue on where the problem is. -TGG
  3. Does your block have a missing texture when placed, or just when held (as an Item)? You could try this troubleshooting guide, it might help (not certain though) http://greyminecraftcoder.blogspot.com.au/2015/03/troubleshooting-block-and-item-rendering.html Failing that, I think your best best is to set a breakpoint on this line in ModelLoader else FMLLog.log(Level.ERROR, e, "Exception loading model %s with vanilla loader, skipping", modelLocation); and then looking back up the stack frames to see which variants are in the registry, eg here at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:120) [ModelLoader.class:?] hopefully this will give you some more clues. Bit of a fishing expedition, sorry. Unless someone else can see the problem... -TGG
  4. Hi You will need to add properties to your Block, for example like BlockStone's VARIANT public class BlockStone extends Block { public static final PropertyEnum VARIANT = PropertyEnum.create("variant", BlockStone.EnumType.class); the VARIANT is used to keep track of the type of block - so ORE and WALL in your case. The BlockStone converts metadata to property VARIANT using public IBlockState getStateFromMeta(int meta) { return this.getDefaultState().withProperty(VARIANT, BlockStone.EnumType.byMetadata(meta)); } and it converts property VARIANT to metadata using public int getMetaFromState(IBlockState state) { return ((BlockStone.EnumType)state.getValue(VARIANT)).getMetadata(); } You will have to do the same thing for your ORE and WALL variants. Alternatively, since you only have two variants - ore and wall - you could just make two separate Blocks - one for ore and one for wall. That would be much simpler. -TGG
  5. Hi Block.getMetaFromState() and Block.getStateFromMeta() This link explains it a bit more http://greyminecraftcoder.blogspot.co.at/2014/12/blocks-18.html See also this tutorial project (MBE03) https://github.com/TheGreyGhost/MinecraftByExample -TGG
  6. Hi I suggest subscribing to MouseEvent. Have you used events before? if not there are a couple of good tutorials on this board. @SubscribeEvent public void interceptMouseInput(MouseEvent event) { if (event.dwheel == 0) return false; -TGG
  7. Hi If you copy the folder structure in this tutorial mod it should work fine https://github.com/TheGreyGhost/MinecraftByExample eg https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/resources/assets/minecraftbyexample/textures If you're using IntelliJ 14, you should read here too http://www.minecraftforge.net/forum/index.php?topic=21354.0 -TGG
  8. Hi Pls include the console error log. That will show the location where something is using an item and doesn't realise it might be null. Some background info on debugging null pointer exceptions http://www.terryanderson.ca/debugging/run.html -TGG
  9. Hi This link might help for missing textures http://greyminecraftcoder.blogspot.com.au/2015/03/troubleshooting-block-and-item-rendering.html Here is a tutorial project with a working example of item textures (see MBE10) https://github.com/TheGreyGhost/MinecraftByExample -TGG
  10. Hi This link might help http://www.minecraftforge.net/forum/index.php/topic,28873.msg148526.html#msg148526 -TGG
  11. Hi This link might help http://greyminecraftcoder.blogspot.com.au/2015/03/troubleshooting-block-and-item-rendering.html -TGG
  12. Hi To be honest I don't know details because I haven't personally done it yet however this post looks like it will show you how - i.e. ICustomModelLoader http://www.minecraftforge.net/forum/index.php/topic,28714.msg147632.html#msg147632 -TGG
  13. Hi I suggest - stitch your 100 textures into the block texture sheet, then use ISmartItemModel to modify the baked quads it returns to give the correct [u,v] coordinates for the desired texture. Never tried it. Should work, but will take a fair bit of experimentation I think. -TGG
  14. Hi THe ConcurrentModification exception means that you are updating that array in both the server and the client thread, which is a very bad thing. In other words, your updateEntity method is running on the server; it shouldn't - add a check for this.worldObj.isRemote() before adding the sound. Also, this line is supposed to check if the sound is playing if(Minecraft.getMinecraft().getSoundHandler().isSoundPlaying(new TOS_WorkSound(this))){} but it won't work as you expect because you're creating a new sound instance each time, which of course wasn't playing before, so the check always returns true. You need to keep your instance of the playing sound and check if it has finished. -TGG
  15. Personally I think the json is a much better way than before. All that hardcoded render block switch statements, what a nightmare.... remove as much coding from block customisation as possible, put it back into the hands of folks creating the resourcepacks I reckon. All "proper" commercial games are written that way- the coders code, the artists create content. But if you really really want to do your autotexture assignment , you can use ISmartBlockModel to do exactly the same thing as before. -TGG
  16. Did you try using your debugger to pause the program while it is executing, and seeing what the server thread is doing? -TGG
  17. Sounds like your server thread is in an infinite loop somewhere (probably in your code). Try using your debugger to pause the program while it is executing, and seeing what the server thread is doing. -TGG
  18. In 1.7 just change the icon you return from Item.getIconFromDamage(), should work fine. Alternatively - IItemRenderer is your friend. You can render anything you want with that. -TGG
  19. Hi MyCustomBlock c = new MyCustomBlock(); That's not how Blocks are used - you don't create a new instance of your block every time you place it. Instead, you create an instance once, during preInit(), and register it with Forge. It's probably worth reading a few of the introductory tutorials on modding. This is one, there are lots of others. Wuppy29 has some good ones. http://greyminecraftcoder.blogspot.com.au/2013/10/the-most-important-minecraft-classes_9.html and http://greyminecraftcoder.blogspot.co.at/2014/12/blocks-18.html -TGG
  20. Hi This tutorial example might help https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/mbe11_item_variants/Notes.txt Every time you use the item, it changes its texture (it's a bottle that you gradually drink empty) Alternatively you can also use ISmartItemModel. -TGG
  21. Hi This tutorial project will show you how to write transferStackInSlot properly. https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/mbe30_inventory_basic/ContainerBasic.java -TGG
  22. Hi Sorry, I don't understand what you mean. I can't really help fix the problem, if I don't know what the symptoms are. -TGG
  23. During the the appropriate world loading event, (see WorldEvent and its derived Event classes), create a Configuration with the desired File location as constructor parameter, just like you normally do. The File comes from the code fragments I showed you. If this will never be installed on a dedicated server, then new File(Minecraft.getMinecraft().mcDataDir, "saves").toPath(); should work just fine -TGG
  24. Hi What do you expect to happen? And what actually happens? -TGG
×
×
  • Create New...

Important Information

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