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.

Filipsi

Members
  • Joined

  • Last visited

  1. You are writing data to packet at TileEntity#getDescriptionPacket, but you have to implement reading as well. You need to override TileEntity#onDataPacket, you can get NBTTagCommpound from the packet using S35PacketUpdateTileEntity#func_148857_g.
  2. Where do you register your event? KeyInputEvent is fired on client side, so it should be registered in your client proxy on init. Also, it would probably be a good idea to mark KeyPressEvents class as Client-Side only if you are using it only for KeyInput handling. As far as I know, there is no problem with your code. Tested it in 1.7.10 and worked fine.
  3. NBT can store entire ItemStacks. Take a look at: ItemStack#writeToNBT(NBTTagCompound) ItemStack#loadItemStackFromNBT(NBTTagCompound) EDIT: What list? ArrayList? LinkedList? How do you store your items? What do you need a list for? If you want to just save and load items, array would be better.
  4. Block#getIcon(int, int) is used to create EntityDiggingFX, try override that.
  5. Possible? Yes, of course. Complex? Somewhat. Like allways, know the java first. Let's start with GUIs and Containers, here are some tutorials: (1.6.4) Containers and GUIs on Forge wiki Jabelar's Minecraft Forge Modding Tutorials: Tips For GUI and Input Google is your frend.
  6. Well, there is this, but it goes slow: MinecraftForge/Documentation
  7. I hope that you know at last basic Java, if not I would suggest to start there. So, if you want to make an arrow, a good start would be to take a look at vanilla's EntityArrow. Checking for collision with an entity is done in EntityArrow#onUpdate. Spawning a lightning should be done on server side, you can spawn EntityLightningBolt using World#addWeatherEffect
  8. Here is a few values: link Just combine it with a string. TextColors.darkGrey + "this string has color"
  9. You should be really using @Override annotations. About your problem: You have to read the items from NBT in the same order in which they were saved. You are saving two shorts and then tagList, so you have to read them in the same order.
  10. You are not overriding writeToNBT and readFromNBT correctly. Also readFromNBT is misspelled (redFromNBT).
  11. 1.) TileEntityFusionReactorBlock should implement ISidedInventory, you have methods from the interface in there, but implementation is missing 2.) Like Draco18s said, the ReactorBlock (dummy) should have reference to the main block's TE. This will allow you to insert items to the main's block inventory using ISidedInventory methods
  12. First of all, nice model. Could you post TileEntities for main and dummy block? Also, there is a tutorial on how to make Multiblock structures by MineMaarten. You can take a look at the code, If I remember correctly there is a part about sharing inventories. Here is a
  13. I did it like this: I created a map with TileEntities around the block, witch is updated with onNeighborBlockChange and then if the TileEntity is IEnergyReceiver I try to push energy to it. shareEnergyWithNeighbors pushEnergy getTileEntityNeighborMap
  14. Yeah, right. GuiScreen is Client-Sided too. But that could be solved it by using enum or numerical IDs.
  15. You can't use direct call to Minecraft class, because it has annotation @SideOnly(Side.CLIENT), meaning that Minecraft class is not packed during compilation with dedicated server, so if you even try to reference it, even if you don't use it on server (with world.isRemote condition), dedicated server will crash with java.lang.classnotfoundexception, because that class don't even exists. So, you have to call it through SidedProxy. Something like this: public class CommonProxy { public void displayGui(short guiId) { //NO-OP } } public class ClientProxy extends CommonProxy { @Override public void displayGui(short guiId) { switch(guiId) { case 0: Minecraft.getMinecraft().displayGuiScreen(new GuiTest()); break; } } } Edit: Fixed the code, thanks to diesieben07 for pointing to my mistake

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.