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.

Differentiation

Members
  • Joined

  • Last visited

Everything posted by Differentiation

  1. EntityEvent fires for any updates with entities. Yes, you should...
  2. Hey! I was curious, what is the difference between World::rand and Random rand = new Random();? And which is better to use? Thanks!
  3. By the way, can you catch NullPointerException? Just curious. ItemStack stack = null; try { hoe.damageItem(1, playerIn); } catch (NullPointerException exception) { System.out.println("NullPointerException caught!"); }
  4. Hey! So every time I run the Java Application (Minecraft Client), it gives me the following error which doesn't crash the game but concerns me a lot. Error: https://pastebin.com/j0ane0J6 Is this important or do I just leave it? Thanks!
  5. Are you positive that you cancelled the event CLIENT-SIDE so that none of that renders?
  6. Is there a documentary I can learn from? I use Eclipse and I tried the debug lines, but I didn't know how to further continue...
  7. Yes, log the side to the console so that I could visually see what current side is running. I know I can make the if statement more condensed and shorter that way, but are there any other methods?
  8. Hey, I need to test for the running side on certain methods or blocks of methods all the time to keep me informed. So I made a method (which I'm currently using) which looks like this: public void getSide(World worldIn) { if (worldIn.isRemote) { Log.info("CLIENT"); } if (!worldIn.isRemote) { Log.info("SERVER"); } } Is there a more enhanced way to accomplish this? Any suggestions are welcome. Thanks!
  9. 1. Post the FML Log to get help. 2. You shouldn't be using ProjectL and OldAnimations mod. Use Orange Marshall's 1.7 Animations mod instead.
  10. I can relate. @Greyscail, your code is very mixed between sides. I would see this documentation by Forge and this video by MineMaarten, both of which explain sides in detail. But please actually read the documentation and watch the video. When I only started modding it took me a good chunk of time and effort to understand sides. I'm finished helping here! Until next time! ~Differentiation
  11. I gotta go to sleep, I'll help more tomorrow! Try to figure it out while I'm gone!
  12. For example: public class PacketSpawnParticle extends LocationDoublePacket<PacketSpawnParticle>{ private double dx, dy, dz; private int particleId; public PacketSpawnParticle(){} public PacketSpawnParticle(EnumParticleTypes particle, double x, double y, double z, double dx, double dy, double dz){ super(x, y, z); particleId = particle.ordinal(); this.dx = dx; this.dy = dy; this.dz = dz; } @Override public void toBytes(ByteBuf buffer){ super.toBytes(buffer); buffer.writeInt(particleId); buffer.writeDouble(dx); buffer.writeDouble(dy); buffer.writeDouble(dz); } @Override public void fromBytes(ByteBuf buffer){ super.fromBytes(buffer); particleId = buffer.readInt(); dx = buffer.readDouble(); dy = buffer.readDouble(); dz = buffer.readDouble(); } @Override public void handleClientSide(PacketSpawnParticle message, EntityPlayer player){ player.worldObj.spawnParticle(EnumParticleTypes.values()[message.particleId], message.x, message.y, message.z, message.dx, message.dy, message.dz); } @Override public void handleServerSide(PacketSpawnParticle message, EntityPlayer player){} }
  13. It doesn't have to be integers. It can be booleans and other values...
  14. ya... you only need to notify the server of that boolean statement at that specific time. This can easily be accomplished via player capabilities.
  15. ONLY this is supposed to be sent to the server, NOT the whole method.
  16. It's a bit ambiguous, especially for me, being an old man and all, skimming through these large chunks of code. I'll need the help of others. @jabelar, please. @Draco18s

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.