TheGreyGhost
Members-
Posts
3280 -
Joined
-
Last visited
-
Days Won
8
Everything posted by TheGreyGhost
-
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
-
[1.8] [SOLVED] Metadata blocks change to 0 when placed
TheGreyGhost replied to Ferrettomato's topic in Modder Support
Keen, glad you solved it -TGG -
[1.8] [SOLVED] Metadata blocks change to 0 when placed
TheGreyGhost replied to Ferrettomato's topic in Modder Support
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 -
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
-
[1.8] [SOLVED] Metadata blocks change to 0 when placed
TheGreyGhost replied to Ferrettomato's topic in Modder Support
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 -
[1.8] [SOLVED] Metadata blocks change to 0 when placed
TheGreyGhost replied to Ferrettomato's topic in Modder Support
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 -
[1.7.10]Check when player holds shift and scrolls
TheGreyGhost replied to grand_mind1's topic in Modder Support
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 -
Cannot find folder where textures goto
TheGreyGhost replied to AHitmansFate's topic in Modder Support
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 -
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
-
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
-
[1.8]How do I render an item with a custom model?
TheGreyGhost replied to The_Fireplace's topic in Modder Support
Hi This link might help http://www.minecraftforge.net/forum/index.php/topic,28873.msg148526.html#msg148526 -TGG -
[1.8] Problem with Custom Block State [SOLVED]
TheGreyGhost replied to TheRedMezek's topic in Modder Support
Hi This link might help http://greyminecraftcoder.blogspot.com.au/2015/03/troubleshooting-block-and-item-rendering.html -TGG -
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
-
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
-
[1.8] [SOLVED] When running test client, it 'locks' up
TheGreyGhost replied to saxon564's topic in Modder Support
Did you try using your debugger to pause the program while it is executing, and seeing what the server thread is doing? -TGG -
[1.8] [SOLVED] When running test client, it 'locks' up
TheGreyGhost replied to saxon564's topic in Modder Support
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 -
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
-
[1.8] Problems using world.setBlockState with Custom Blocks
TheGreyGhost replied to Midbin's topic in Modder Support
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 -
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
-
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
-
Creating a config file in the world save folder
TheGreyGhost replied to Elrol_Arrowsend's topic in Modder Support
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 -
Hi What do you expect to happen? And what actually happens? -TGG