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.

GotoLink

Members
  • Joined

  • Last visited

Everything posted by GotoLink

  1. GameRegistry.registerPickupHandler(new PickupHandler()); Once is enough. The rest sounds good.
  2. You can have damage and NBT. See vanilla enchanted/named tools.
  3. Make the change as soon as the packet is received. You can't know if an outside code can be executed before the next packet arrives. Ho and do some checks, like the packet channel.
  4. I don't know if you still have this in your Packet handler, but just in case: private static String identificationName; @Override public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) { ByteArrayDataInput reader = ByteStreams.newDataInput(packet.data); identificationName = reader.readUTF(); } Don't store a (static : value, actually do something to the tile entity.
  5. You added the player's inventory slots first to your container, so they get the first slots.
  6. I don't know anything about Bukkit, but I'll give my opinion (on your ideas ) Option 1: Reflection. If Bukkit are good and give an appropriate answer to their registering methods, this could be as simple as any code, except you catch more exceptions. Option 2: Brings the syncing issue. I don't know how Forge+Bukkit would load mod+plugin (order, dependency ?), might be messy. About the syncing, I'll say that Forge should keep priority. Isn't the purpose of the Bukkit part for compatibility only ?
  7. You are using two different variables. They don't know about each other unless read/write NBT happens, which doesn't that often. The one "name" variable was good.
  8. You are calling a client only class in a common file. Instant server crash.
  9. ...and what do you get in the reobf folder ?
  10. EntityFX particle = new EntitySpellFXDamage(w, player.posX, player.posY, player.posZ,a,-b,c); FMLClientHandler.instance().getClient().effectRenderer.addEffect(particle); Where did you put this ?
  11. setTickRandomly(true); @Override public void updateTick(World world, args) { if(!world.isRemote) world.spawnEntityInWorld(new EntityItem(...)); }
  12. It makes sense with what addSlotToContainer(Slot) does. Man, extend TileEntityFurnace, use GuiFurnace and ContainerFurnace, and you'll be done with it. Seriously.
  13. Don't assume any logic behind it, benchmarking on Minecraft terrain generation is useless. Mew probably felt like it had an impact, while any other change could have done that. Obviously you need to iterate over the blocks, it would be utterly stupid not to. I prefer to use Iterator by the way
  14. That the receiving hand of the event system. Don't forget to post the event when it should be sent. Event myEvent = new CustomEvent(args); MinecraftForge.EVENT_BUS.post(myEvent); //if(myEvent.isCanceled) ...
  15. @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { // TODO Auto-generated method stub return true; } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { // TODO Auto-generated method stub return true; } Try return false ? Did you ClientRegistry.bindTileEntitySpecialRenderer(args); ?
  16. Changing the player dat file would only affect it if you do it before the player logs in. If you do it after, your saved data will be overwritten on player log out and won't come into effect at all. Make an external program for the client to run before he starts his game. Why do you want to change that data ?
  17. RenderGameOverlayEvent.
  18. Man, if you don't understand how to use the code... learn Java, seriously.
  19. Packets. Send the needed info to client side.
  20. EntityAIHurtByTarget ?
  21. Man, if you want to keep it simple and don't care about modifiers, AttributeInstance oldSpeed = player.func_110148_a(SharedMonsterAttributes.field_111263_d); oldSpeed.func_111128_a(oldSpeed.func_111125_b()*change); that is all.
  22. Not only is it good practice, but more efficient and doesn't breach Minecraft license. Check your transferStackInSlot method in Container, i see some magic numbers that could be wrong. Also make sure you use mergeItemStack(ItemStack, int, int , boolean) correctly. Be aware that you added your slots first, then the player internal inventory, then the player inventory bar. The order is important.
  23. I'd rather think it is downloaded automatically.
  24. @Mazetar If you have organized the generation in chunks, it is a good idea, indeed. Don't expect much improvement though.

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.