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.

DoctorBooooom

Members
  • Joined

  • Last visited

  1. Can you write example or post link?
  2. Is there a way to execute code asynchronously? For example I need to make a request in MySQL. Something like this: public static void execute(final String query) { Bukkit.getScheduler().runTaskAsynchronously(Main.plugin, new Runnable() { @Override public void run() { if (!hasConnected()) { connect(); } Logger.debug("Sended Query: " + query.replace("\\", "\\\\")); try { connection.createStatement().execute(query); } catch (Exception e) { Logger.debug("Возникла ошибка. Запрос не может быть выполнен или база недоступна."); } } }); }
  3. I have class, which extend GuiScreen, i'm trying override mouseClicked, but nothing happens @Override protected void mouseClicked(int i, int j, int k) { System.out.println("Clicked!"); if ((k != 0) || (this.hover < 0)) return; if (this.multipleSelection) { if (this.selectedList.contains(this.list.get(this.hover))) this.selectedList.remove(this.list.get(this.hover)); else this.selectedList.add(this.list.get(this.hover)); } else { if (this.hover >= 0) this.selected = this.hover; this.hover = -1; } }
  4. I want to send a string (eg player name) through the netty, however, the method writeString() and readString() do not exist. How i can do this? And how i get EntityPlayer which send the packet? package ru.DoctorBooooom.LastWorld.network.packet; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; public class Packet extends APacket { @Override public void encodeInto(ChannelHandlerContext ctx, ByteBuf buffer) { buffer.writeString("PlayerName"); } @Override public void decodeInto(ChannelHandlerContext ctx, ByteBuf buffer) { String name = buffer.readString(); } @Override public void handleClientSide(EntityPlayer player) { } @Override public void handleServerSide(EntityPlayer player) { } }
  5. @SubscribeEvent public void onEntityGetDamage(LivingHurtEvent event) { String type = event.source.damageType; if (type.equals("cactus")) { event.entityLiving.setHealth(event.entityLiving.getHealth() - 100500); } } Also, you can check the entityLiving is a player
  6. okay, it works fine, but there are ideas how to remove the mesh around the block?
  7. Something like this http://pastebin.com/hKyAgBwP ? And further check on the server when you try to break the block?
  8. But how do I get a block simultaneously exist and not exist? And if two players stand next to it and one can see it, the second should not see it. It's like magic points in taumсraft
  9. I put a block. if I'm creative mode (or put on a helmet for example), then I see him and I can break / change. If not, the block is not displayed and I can't see him / break / step
  10. How create block, that visible only for players in creative mod?
  11. entityPlayer.addChatMessage(new ChatComponentTranslation("msg.message_name.txt")); You need to create a language file (make sure its UTF-8 encoded) assets/<modID>/lang/<langID>.lang Example File: en_US.lang msg.message_name.txt=Displayed Message
  12. I created a wild boar (https://www.dropbox.com/s/ly87tofi7m0zo9u/2014-02-16_17.31.16.png), but he has no animation: he does not look at the players around, when attacking crashed with a run. I would like that he would sometimes dug the ground head and react to players. How to do it? EntityBoar class: http://pastebin.com/r7LTdGkT EntityBoar renderer: http://pastebin.com/eQqNbCS5 EntityBoar model: http://pastebin.com/BwHDisXT
  13. As it turned out, writes NBT date correctly. However reads not correctly. Probably a mistake in NBTTagList nbtListStats = nbtPlayer.getTagList("Stats", 9); , because there was no 1.6.4 2nd parameter, and now I have taken it at random.
  14. myblock= new BlockClass().setStepSound(Block.soundTypeWood).setHardness(1.0F).setBlockTextureName("mymod:myblock").setBlockName("myblock"); GameRegistry.registerBlock(myblock,"MyBlock");

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.