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. GotoLink replied to ashtonr12's topic in Modder Support
    Use .equals(obj)
  2. It is missing an animation metadata file.
  3. Forgot to register the renderer ? Please, do: public final static ResourceLocation electricer = new ResourceLocation("brickcraft", "textures/models/electricer/ElectricerModel.png");
  4. Briggybros' idea could work fine, but might be a bit slow in multiplayer. Let's go all out, and do our own air counter (added in player data), and our own gui with drown bar (using RenderGameOverlayEvent). This way you can change whatever you want, from the air duration to the gui color.
  5. GotoLink replied to wyler0's topic in Modder Support
    Then remove the player references in your code. As for AI, there is no place to learn that. You can read the AI classes from Minecraft, but an AI is mostly your own code anyway. You don't have to follow the vanilla AI system either.
  6. GotoLink replied to ashtonr12's topic in Modder Support
    You can add data to the zombies with IExtendedEntityProperties, then check for it in this event.
  7. GotoLink replied to ashtonr12's topic in Modder Support
    With the LivingDeathEvent: if(event.entityLiving instanceof EntityZombie)//allows subclass of EntityZombie or if(event.entityLiving.getClass() == EntityZombie.class)//more specific
  8. Use a breakpoint on this line. I suspect playerNetServerHandler to be null.
  9. Well you said WorldReading was a World class. But seeing this method, it is just a utility class. So, I worried too much I would take a more object-oriented approach rather than this static method, but whatever floats your boat. You limit yourself to 6 sides when there is 26 neighbours to any given block by the way.
  10. I think there is a decreaseAirSupply(int) method in EntityLiving. You can use player ticks to check if the player is inside your block and call that method.
  11. Side sensitive functions... You don't understand the World class, do you ? Your flowing method should only do things on server side anyway. Add a check in it, or only call it server side.
  12. 1. Client ticks, cache the current ressource pack and check it against every so often. 2. RenderLivingEvent.Specials events 3. KeyHandler for ease of use, Keyboard class for more advanced purposes.
  13. Search where Block.fire or DamageSource.inFire are called.
  14. It is also good practice to have lowercase package name, and to not use obfuscated names for your own fields and methods. Is your entity (with item or not) properly rendered ?
  15. So: if(!world.isRemote) world.getWorldInfo().getWorldName()
  16. If you have a specific nametag: if(tag.hasKey("mynametag"))
  17. Check your imports. Sometimes the client only class is called here. Also check that you never do Minecraft.theWorld when in a common class.
  18. Let me pseudo code what I understand: if(gaz.meta<9){ BlockPosition block = gaz.getFreeNeighbour(); if(block!=null){ setMeta(new Gaz(block), 9); gaz.meta++; } } If i am right, the original block will indeed deplete and should only give a maximum of 9 gaz blocks with 100millibuckets.
  19. See Wiki tutorials for PacketHandling Minecraft.getMinecraft().thePlayer returns a EntityClientPlayerMP
  20. world.getBlockTileEntity(x,y,z); cast to IInventory, then setInventorySlotContents(int ,ItemStack);
  21. Then override getContainer(ItemStack) by returning the itemstack, damaged as you want it to.
  22. Fast answer: Switch player and entity in your code. Done. EntityLivingBase is a subclass of Entity by the way. Long answer: Check if attacked entity is a player instance, cast it, check for item held, if the desired one, do damage to entity attacking.
  23. I don't see how you can confuse 10 in millions within a single for loop. Anyway, i would assume that after you cut the block into pieces, you removed the original block, right ?
  24. I would blame your getContents() returned array. By the way, there is a lot of chance that getQueen() would return null. Hopefully, you added some check for it before the two lines using it.
  25. In your key handler: //perform item checks... Packet packet = new CustomPacket(data);//build a packet with data, like a boolean to switch between tiers and the player entityid to identify him player.sendQueue.addToSendQueue(packet);//send packet to the server In your packet handler: //handle the packet, read data, use it to check and perform changes... if(player instanceof EntityPlayerMP)//avoid endless loop { ((EntityPlayerMP)player).playerNetServerHandler.sendPacketToPlayer(packet);//send packet to the player client }

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.