Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

TheGreyGhost

Members
  • Joined

  • Last visited

Everything posted by TheGreyGhost

  1. Hi I suggest to use the ASM Access transformer to turn the private to public http://www.minecraftforge.net/wiki/Using_Access_Transformers Relatively simple compared to modifying the class. -TGG
  2. Hi The editing appears to be done in GuiEditSign and completion of the sign is in actionPerformed; I don't see any suitable hooks there. I have two suggestions then- 1) you could use ASM + Reflection to modify GuiEditSign.actionPerformed() to call your own code 2) You could write your own MyGuiEditSign extends GuiEditSign, override actionPerformed, and use the GuiOpenEvent to intercept the vanilla GuiEditSign and replace it with your MyGuiEditSign instead (replace event.gui with your own) Never tried those, but they should both work with a bit of tweaking. -TGG
  3. Dude those diagrams are awesome, seriously! I wish all posters were so clear about describing their problem Sounds like you've run into a client-server synchronisation problem. Anything you do to the entity on the client side will only last a short time until the server resynchronises it and your client changes are lost/overwritten. There is a similar problem I wrestled with quite some time ago for EntityArrow http://www.minecraftforge.net/forum/index.php/topic,14315.msg73758.html#msg73758 Changes are often done to both the client and the server at the same time to reduce the apparent lag caused by packet transmission time, normally they stay in synch closely enough that when the resynch occurs the difference is small and you don't notice it. It looks like there's something slightly different about Snowball so that when you push on both client and server, they have different effects so there is a big desynchronisation happening. Unfortunately I don't know why that is. The easiest fix might be to push the Entity on the server only and force a resynch (1.6.4 this was by sending Packet28 and/or Packet34, which will be slightly different in 1.7.2 but probably still very similar) -TGG
  4. Hi I imagine that your bow class probably worked because the spawning code in your bow was running on the server side, you just didn't know it. Spawning entities on the client will just lead to trouble. You need to spawn it on the server, because the server is responsible for keeping track of the game state and synchronising it to all the other clients. If you spawn on the client (or worse, on both) then you wind up with phantom entities that suddenly disappear, the other clients can't see your entity, and in the worst case can crash your game. You could either use a custom packet, or you could trigger something that the client transmits to the server (for example - right-clicking with the item you are holding). (PlayerController MP - see http://greyminecraftcoder.blogspot.com.au/2013/10/user-input.html) -TGG
  5. eugh what a mess It looks to me like the body parts aren't grouping together correctly, so whenever you rotate bits of the model, they don't stay stuck together. Or something to do with the choice of rotation points perhaps. I've never used Techne so I can't be of much help. Trial and error on a simpler model might help, i.e. start from a very simple base that works, then add one bit at a time - for example just the nose - and tweak either your Techne model or the generated code until the nose moves properly with the head rotation. -TGG
  6. Hi That's curious, I would have expected it to work like what you said (i.e. create EntityItem, then set .motionX etc to 0). Are you sure you did it right, and you didn't try to place the EntityItem so that its bounding box was clipping into a block? I'd suggest a breakpoint in EntityItem constructor and onUpdate() should get to the bottom of it. -TGG
  7. Look at his code. Yes, it does. @dieSieben I agree the static is a potential problem if he or she wants each player to have their own XP, but I don't think it's causing the problem he or she is describing. The problem looks to me like he is mixing up an EventHandler with IExtendedEntityProperties. The implements IExtendedEntityProperties looks like a red herring because if it had been used as a normal IExtendedEntityProperties, the symptoms should be different (i.e. all entities have the same XP level, not that the XP level is persistent after restart). @TwIxToR_TiTaN Anyway because I'm not sure what you are trying to do, I don't know the best way to suggest to fix it. There are several potential problems with how you're implementing this and once you give more info we can help you work them out. -TGG
  8. Hi I don't really understand what you are asking. Could you describe it in a bit more detail (be specific)? 1) what you expect to happen 2) what actually happens A bit of background on what you're trying to do (what mod feature this is) would also help. I suspect that static doesn't have anything to do with your problem, but then I'm not actually sure what you are trying to do. -TGG
  9. Hi Show your error log? Use a "Spoiler" (the Sp icon in the toolbar) -TGG
  10. Hi I would suggest you drill further into here @Override public Entity findPlayerToAttack() { return this.angerLevel == 0 ? null : super.findPlayerToAttack(); } perhaps you angerLevel is wrong in this method, or alternatively super.findPlayerToAttack() is not what you think (are you extending EntityMob?) Do you know how to use breakpoints? If not, and you're using Eclipse, try this link... http://www.vogella.com/tutorials/EclipseDebugging/article.html -TGG
  11. Hi For an example of how to use this properly, check out GuiScreenBook; in the constructor and addNewPage and sendBookToServer. -TGG
  12. Hi I'd suggest you trying adding breakpoints or System.out.println to your code (eg attackEntityFrom, findPlayerToAttack, etc) so that you can tell which parts are being called, and which ones aren't. That will narrow it down a lot. -TGG
  13. Hi You might find this link useful http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html (The Item Rendering sections) Essentially you've got two choices ISimpleBlockRenderingHandler, or IItemRenderer. If your item is also a block, ISimpleBlockRenderingHandler is probably the best. -TGG
  14. Hi So I gather you want your potion to affect vanilla entities too? You may be able to force the yaw and pitch in the RenderLivingEvent.Pre event. Otherwise, your best bet is probably to use reflection to modify the EntityBodyHelper class, or alternatively use an AccessTransformer to transform EntityLiving.bodyHelper to be public, and when an Entity is created, overwrite its bodyHelperfield with your own MyEntityBodyHelper class extends EntityBodyHelper. No guarantees it would work, but could be fun to try -TGG
  15. Hi What error message are you getting? These links might help (although they're basically just the same as what sequitiri is already saying) http://www.minecraftforge.net/forum/index.php/topic,18371.msg92948.html#msg92948 http://greyminecraftcoder.blogspot.com.au/2013/12/overview-of-forge-and-what-it-can-do.html -TGG
  16. Hi A couple of suggestions > this.iconFront = IconRegistry.registerIcon(MoreMetalsMod.modid + (this.isActive ? ":blockRefueler_Front_Active" : ":blockRefueler_Front_Idol")); This probably won't work because registerIcon is only called once, at startup. Also, this.isActive will be the same for all of these Blocks, so if one becomes active, they all will. If you want some of your blocks to be active but not others, use metadata. This link might explain it in more detail: http://greyminecraftcoder.blogspot.com.au/2013/07/blocks.html and http://greyminecraftcoder.blogspot.com.au/2013/07/rendering-standard-blocks-cubes.html A good idea to put @Override in front of your getIcon, eg @Override public IIcon getIcon(etc) What are you intending to use the metadata for? the default value is 0, so if you never change it to something else, side will never match meta. If you are deliberatly changing meta, I would suggest you add System.out.println("Side = " + side + "; meta = " + meta); to your getIcon and see what's going on. -TGG
  17. Hi The scissor would be my first choice but if that's causing you issues you could consider using a stencil mask http://www.glprogramming.com/red/chapter10.html Alternatively, you could render into a FrameBuffer and use that as a texture for rendering your GUI http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-14-render-to-texture/ -TGG
  18. Aha That is a good clue. onUpdate should also be called from the server side if this is working properly. Are you spawning your entity on the server side? (you should) i.e. if (!par2World.isRemote) { par2World.spawnEntityInWorld(entityarrow); } I think you are on the right track about entityHit and attackFrom. -TGG
  19. Hi This link might be interesting for you http://greyminecraftcoder.blogspot.com.au/2013/11/how-forge-starts-up-your-code.html -TGG
  20. Hi So I gather that your code prints ITS A HIT but doesn't damage anything? Are you sure your entityHit is what you think it is? Have you tried tracing into if (movingobjectposition.entityHit.attackEntityFrom(DamageSource.generic, (float)k)) { and seeing why it returns false? (i.e. maybe the arrow is hitting itself, or something silly like that) -TGG
  21. You mean - like Mojang? :-P @Russoul You can partially deobfuscate a 1.7.2 mod by searching for the calls to vanilla methods and renaming them, probably you can use the forge srg2src program for that (although I don't know how since I've never looked into the details). As for the variables and functions within the mod itself, you're on your own there. Just have to figure out what they do and figure out what a good name would be. Or talk to the mod author, of course. -TGG
  22. Yeah an unfortunate side effect of the gradle setup is that it's a lot difficult to put testing statements into the vanilla code. That's why you can't paste anything in. But you can still use breakpoints in there (you're looking in the right place), which in this case should be all you need. If you're not sure how to use them, try this http://www.vogella.com/tutorials/EclipseDebugging/article.html It's really quite awesome what you can do with the debugger and once you've learnt how to use it you'll wonder how you ever managed without it... I don't see any obvious issues with the Campfire class, if you have no luck with the debugger, post a link to your project and I can download in the next couple of days to try it myself. -TGG
  23. Hi Yes it's possible. Use the Tessellator in a ISimpleBlockRenderingHandler. Vanilla uses the Tessellator for nearly all the blocks, so you could copy that, or you could try to update the tutorial - it probably won't have changed much. The main trick is to nudge your snow texture slightly so that it sits "on top" of the first texture, otherwise you will get weird banding effects where the two textures fight each other to get drawn on top. Some background information on block rendering here http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html (see the "Block Rendering" sections). -TGG

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.