TheGreyGhost
Members-
Posts
3280 -
Joined
-
Last visited
-
Days Won
8
Everything posted by TheGreyGhost
-
[1.7.2] Block with metadata - Blocks textures the same
TheGreyGhost replied to Eastonium's topic in Modder Support
Hi This link might be of some help http://greyminecraftcoder.blogspot.com.au/2013/07/rendering-standard-blocks-cubes.html It looks to me like you need to change your getIcon to take account of the metadata, not just the side. -TGG -
[1.7.2] Overriding Item and block attributes
TheGreyGhost replied to turangur's topic in Modder Support
Hi I think that creating your own new items & blocks for an edible hay and wheat is probably the best way to do it. It's not as difficult as you might think, and actually- is there a particular reason you couldn't have both edible hay and (vanilla) non-edible hay in the game? -TGG -
[1.7.2] Custom dimension NullPointerException
TheGreyGhost replied to Bektor's topic in Modder Support
Hi Did you try this? Which variable on that line was null? Are you sure your PFBiomeBase.init() is called? You seem to have some strange recursive initialisation thing happening where the constructor of PFBiomeBase creates a number of other PFBiomeBase objects. As a general rule that is asking for trouble. -TGG -
[1.7.2] Custom dimension NullPointerException
TheGreyGhost replied to Bektor's topic in Modder Support
Yes, Forge triggers several Null Pointer Exceptions during startup. Just keeping resuming until it stops with a NullPointerException on your code PFGenLayerBiomes.java:41. Then look to see which variable is null. -TGG -
[1.7.2] Custom dimension NullPointerException
TheGreyGhost replied to Bektor's topic in Modder Support
Hi My guess: one of these is not initialised properly (is still null) PFBiomeBase.magicalforest, PFBiomeBase.mountains, PFBiomeBase.pineForest, PFBiomeBase.primevalforest, PFBiomeBase.silverwood If that doesn't work, you could try setting your debugger to break on NullPointerException, and see which object is causing the problem. That will give you a clue on where to look next. -TGG -
Hi This link might help a bit http://greyminecraftcoder.blogspot.com.au/2013/07/rendering-non-standard-blocks.html Look at BlockSnow for some examples. -TGG
-
Hi > public instead protect ? Yes, but modding will be very hard until you learn Java. I suggest - find a good book on Java in your native language. It will be much more fun if you practice basic Java first. -TGG
-
Hi Why do you want to use protected? The whole point of protected is to prevent exactly what you're doing in your main mod. I reckon you probably actually want something else. -TGG
-
Hi The player Y position is at your feet or at your eyes depending on whether you're on the server or on the client. I forget which. The eye height is found using EntityPlayer.getDefaultEyeHeight(); I'm pretty sure you don't need it though, if you are setting blocks on the server. Are you calling this method on the client side? -TGG
-
FYI, what I do when I get an error like this: java.lang.NullPointerException: Unexpected error at net.minecraftforge.common.ForgeHooks.isToolEffective(ForgeHooks.java:131) Looking at ForgeHooks.java:131 public static boolean isToolEffective(ItemStack stack, Block block, int metadata) { List toolClass = toolClasses.get(stack.getItem()); // NPE here return toolClass != null && toolEffectiveness.contains(Arrays.asList(block, metadata, toolClass.get(0))); } Not sure what a NullPointerException is? Google -> http://stackoverflow.com/questions/218384/what-is-a-null-pointer-exception-and-how-do-i-fix-it So that means that I am using an object which is null. There are only two on this line - stack and toolClasses. Since stack is being provided by my code when it calls this method, it's a good guess that stack is null. Why is it null? It was called at com.willr27survivalplus.handler.WSPEventHandler.setBreakSpeed(WSPEventHandler.java:18) if(ForgeHooks.isToolEffective(event.entityPlayer.getCurrentEquippedItem(), event.block, event.metadata)) { and that means that event.entityPlayer.getCurrentEquippedItem() returned null. Why did it return null? Well the name is a strong clue, because the crash only happens when you're not holding anything. -TGG
-
Hi Do you know about the MCPbot? http://mcpold.ocean-labs.de/index.php/MCPBot -TGG irc.esper.net 12:46 Started talking with MCPBot on Sunday 1/06/2014 12:46:15 TheGreyGhost gcm getDropItem MCPBot [ GET CLIENT METHODS ] MCPBot Side : client MCPBot Name : EntityLiving.getDropItem MCPBot Notch : ri.u MCPBot Searge : func_146068_u MCPBot Type/Notch : ()Lnet/minecraft/item/Item; | ()Labn;
-
As I'm sure it can be quite annoying to be pestered with small problems such as this, but what's the point in just writing that? Dude, as this may seem like I'm not putting any "effort" I've done my best effort to learn as I go along. May you please reply with a little bit more help - I'm not asking for someone to write this for me, only to point me in a direction of which I can learn. Hi This thread has some advice on how much Java is useful to know before starting modding, might be of interest: http://www.minecraftforge.net/forum/index.php/topic,16784.msg84954.html#msg84954 Unfortunately I don't know which of the online "learn Java" sites are the best. The Sun/Oracle official ones are a bit obscure even for me sometimes. The "Java for Dummies" books and similar are usually a good way to ease into it. Practicing making your own simple programs for a few days will help a lot too. -TGG
-
[SOLVED] [1.6.4] Spawn custom EntityFX on server side
TheGreyGhost replied to BlackCrafer666's topic in Modder Support
Hi EntityFX are used on the client only. So you could use your packet something like this: 1) When the server wants to create the effect on the clients: send a packet to all clients who are nearby. Something very simple, like an integer specifying which effect you want, and the coordinates it should be created at. 2) When the client receives the packet, spawn the appropriate EntityFX using the information in the packet. The fact that it currently works for only the player who's running the server, means you've probably got a serious bug - i.e. your server side code is accessing client-side objects. That will eventually cause your mod to crash (and it won't work on dedicated server either). Some background on the concepts here, in case you're not familiar with them http://greyminecraftcoder.blogspot.com.au/2013/10/client-server-communication-using.html http://greyminecraftcoder.blogspot.com.au/2013/11/how-forge-starts-up-your-code.html The information is for 1.6.4 (and packet handling in particular is quite different) but the concepts are still the same. -TGG -
[1.7.2][10.12.1.1103] Help me understand the RotationHelper
TheGreyGhost replied to ZZT's topic in Modder Support
Hi Unfortunately I don't think there is a standard way to rotate non-vanilla blocks which your mod hasn't created. Everyone is free to implement their block directions in any metadata coding they want, and I'm pretty sure there is no standard method to rotate the block (eg an overridable Block method). It's a good idea, perhaps I'll suggest it as a possible improvement and see if they bite. In the meantime, you might be able to get the effect you want by manipulating the player's position / facing direction (rotationYaw) when placing the block (for onBlockPlacedBy) or the side (for onBlockPlaced) methods. For example - your code could create a small "test region" in the world somewhere, out of sight, place the custom block six times, once for facing each six directions, read the metadata for each successful placement, and use that. But to be honest that's a not very robust and I'm not sure it's worth the effort unless your mod absolutely depends on being able to rotate unknown blocks. -TGG -
[1.7.2][SOLVED] Custom Rendered Blocks - Transparency
TheGreyGhost replied to Kimpton's topic in Modder Support
Nah, dude, that's a good sign. It means your ClientProxy code is actually running now. So now you're finding the next bug If you look at this part here java.lang.NullPointerException at com.kimpton.block.model.ModelCollumStone.<init>(ModelCollumStone.java:100) ~[ModelCollumStone.class:?] It tells you that there's something wrong in your ModelCollumStone constructor, at line 100: probably here I think Shape16.mirror = true; Shape16 = new ModelRenderer(this, 0, 0); Techne is notorious for this bug, i.e. using Shape16 before initialising it. Compare the Shape16 lines to the others (eg Shape15). -TGG -
[1.7.2][SOLVED] Custom Rendered Blocks - Transparency
TheGreyGhost replied to Kimpton's topic in Modder Support
Well that's strange. When I put @Override before a static method it refuses to compile and tells me "static method xxx in derived class cannot override instance method xxx in base class" What happens if you remove the static from your RenderInformation()? (BTW you should really name it renderInformation() to be consistent with Java naming conventions ) -TGG -
[1.7.2][SOLVED] Custom Rendered Blocks - Transparency
TheGreyGhost replied to Kimpton's topic in Modder Support
Hi I suspect the problem is that you've made your RenderInformation static, so it doesn't override CommonProxy.RenderInformation. It's a good idea to put @Override before any methods you want to override, so the compiler will tell you you've got a problem. i.e. try this and see what it tells you public class ClientProxy extends CommonProxy { @Override public static void RenderInfomation(){ -TGG -
Hi From memory, MovingObjectPosition.subHit isn't implemented in vanilla. For blocks - sideHit tells you which side, and hitVec tells you the position of where the line-of-sight raytrace intersects the block cube onBlockActivated is given hitVec, with the coordinates adjusted relative to the block position, i.e. from [0,0,0] to [1,1,1] I haven't seen chickenbones' code, but I imagine that overriding Block.collisionRayTrace will give you the flexibility you need. Your block can use the vector information to check against its multiple hitboxes and decide which one (if any) were hit. And set subHit appropriately, I guess, so that onBlockActivated can use it later (never tried that) -TGG
-
[solved]texture issues/hitbox alteration[unsolved]
TheGreyGhost replied to majesticmadman98's topic in Modder Support
Hi I'm not seeing an obvious problem. These links might give you some things to try http://www.minecraftforge.net/forum/index.php/topic,18371.msg92948.html#msg92948 and http://www.minecraftforge.net/forum/index.php/topic,11963.0.html -TGG -
Hi Check out the vanilla raytracing code in EntityRenderer.getMouseOver. MovingObjectPosition is the class used to store information about where the player's line of sight ends. The raytracing on blocks is done in EntityLivingBase.rayTrace --> World.clip -TGG
-
SOLVED[1.7.2] Block/Item Names and Textures won't work in jar
TheGreyGhost replied to Yashagoro's topic in Modder Support
Hi This link might help http://www.minecraftforge.net/forum/index.php/topic,18371.msg92948.html#msg92948 -TGG -
[solved]texture issues/hitbox alteration[unsolved]
TheGreyGhost replied to majesticmadman98's topic in Modder Support
Hi The clues you need are on this line Using missing texture, unable to load dma:textures/blocks/textures:model:DalekConsole2.png.png and this line this.blockIcon = iconRegister.registerIcon(main.MODID + ":" + "textures:model:DalekConsole2.png"); -TGG -
HELP: Light appearance while holding a torch!
TheGreyGhost replied to MikaXD's topic in Modder Support
Hi Dynamic Lights Mod is open source https://code.google.com/p/atomicstrykers-minecraft-mods/source/browse/ Should be straightforward to adapt his code to do what you want. -TGG