Skip 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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. and the filename?
  2. After you right click you would have to set a variable in the itemstack that would then be checked/modified by the updateTick function. Take a look at how I handle it here: https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/components/ComponentFireball.java (right click method) https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/item/ItemArtifact.java (updateTick method)
  3. public static boolean hasConnectedTexture = false; public static boolean isMaelstrom = false; Mmmm....static....
  4. GL11.GL_rotate(angle, amount_on_xaxis, amount_on_yaxis, amount_on_zaxis) So probably, figure out how far to rotate it (metadata) and then GL11.GL_rotate(angle, 0, 1, 0)
  5. And where is your texture located?
  6. Question: What do you want to happen if there is only one entity in the area? What do you want the other 8 rockets do? As for the boolean: yes. anEntity.entityData.setBoolean("targettedByRocket",true) and anEnttiy.entitytData.getBoolean("targettedByRocket") And you'll want to set that value to false after the rocket deals damage or just before spawning any, depending on how multiple shots from your rocket launcher should work.
  7. //in any class that is not EntityPlayer public void someGenericFunctionThatPassesEntityPlayer(EntityPlayer player) { player.entityData.setInteger("level",someValue); }
  8. That code does not help solve the problem as there are NO references to packets in that function.
  9. Considering I forget the [shift] in the shortcut so frequently...
  10. You can do a soft dependency, its just a lot trickier to get working properly. And the other mods need to have an exposed API that you can use in your development environment.
  11. do this: if(data.length < 2) { return; } See if that helps.
  12. Mmm~ Client-server disparity. Solved by packets. You're sure you have this in your TE? public Packet getDescriptionPacket() { NBTTagCompound nbtTag = new NBTTagCompound(); this.writeToNBT(nbtTag); return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, nbtTag); } public void onDataPacket(INetworkManager net, Packet132TileEntityData packet) { readFromNBT(packet.data); } And that right after you change the value you call world.notifyBlockChange()?
  13. You mean these lines? if(type == ItemRenderType.EQUIPPED) { } else if (type == ItemRenderType.EQUIPPED_FIRST_PERSON) { } First off, those aren't case statements. Second, duh. You're not doing anything. Anyway, you can bind textures through the TextureManager passed as data[1] (the player is data[0] by the way) and ItemRenderer.renderItemIn2D will render an item. If that doesn't work you can create a fake ItemEntity and render that instead using RenderManager.instance.renderEntityWithPosYaw
  14. Are you doing something that requires the item to not render as a default item? If so, what?
  15. When I need just one, I don't bother with the shortcut.
  16. It would also make your mod dependent on the other mod.
  17. You also don't need to get the Tessellator from an entity: Tessallator.instance Magic. The better question is: What are you trying to do?
  18. So...you use the EntityLiving to get the ItemRenderer, which you then don't use...
  19. When that happens, just go up a few lines and do this: ItemBlock b; Then it'll ask you to import (or create) the class ItemBlock. Just import it and the "incompatible" conditional error will go away. That error comes up when it doesn't know what type a class is, so the IDE can't make the comparison and check for validity. (After you import, you can delete the line)
  20. Rename your variables. Create new variables. Use your IDE's code hinting and error hinting capabilities. This is BASIC JAVA. I am not going to help you with that, as you should already know it.
  21. public void preInit(FMLPreInitializationEvent event) { { CBingot = new CBingot(5000); CBingot = new CBingot(5001) .setMaxStackSize(16).setUnlocalizedName("genericIngot"); } @EventHandler public void load(FMLInitializationEvent event) { LanguageRegistry.addName(CBItem, "Generic Item"); LanguageRegistry.addName(CBIngot, "Generic Ingot"); // Stub Method } Ok, first off, don't name your variables the same as your class name. Second, you never defined nor declared CBItem.
  22. And you still thought that it was a good idea to call the class constructor from inside the class constructor. Not to mention that that tutorial in no way has you doing that. Compare: package tutorial.generic; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class GenericItem extends Item { public GenericItem(int id) { super(id); // Constructor Configuration maxStackSize = 64; setCreativeTab(CreativeTabs.tabMisc); setUnlocalizedName("genericItem"); } } With public class CBingot extends Item { public CBingot(int par1) { super(par1); final Item CBingot = new CBingot(5000); //you added this line // Constructor Configuration setMaxStackSize(64); setCreativeTab(CreativeTabs.tabMaterials); setUnlocalizedName("Celestial Bronze Ingot"); LanguageRegistry.addName(CBingot, "Celestial Bronze Ingot"); }

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

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.