Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. Ah yes. I tend to remember things in vernacular and use the IDE code hinting features to get the name I'm trying to use.
  2. You're going to need to use debug statements to figure out why. I can't help you do that.
  3. Yes. And don't forget a push and pop matrix, if you don't already have one (you should).
  4. Probably because getNearestEntity() can't return null. If it fails to find a target that's not already targetted, it's going to return the last one it checked.
  5. The solution is now a bit different too. You just have to make a change in your code and it will be fine.
  6. Bad modder, no cookie. Don't use the LanguageRegistry. Use lang files instead. So much better. And they're easy, to boot. Just create a file called en_US.lang inside /assets/lang/ and add whatYouNeedTranslated=what it should be: entity.Artifacts.SpecialArrow.name=Arrow Done!
  7. Also mod_MinecraftForge will break under certain conditions. If you do want to declare the dependency, use just "Forge" (no quotes).
  8. Bad modder! No cookie! That function is no longer an override. public int tickRate(World par1World) { return 6000 + par1World.rand.nextInt(100); } Magic!
  9. Delete the Forge log, then run the game, then copy and paste the entire contents of the forge log here.
  10. 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)
  11. public static boolean hasConnectedTexture = false; public static boolean isMaelstrom = false; Mmmm....static....
  12. 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)
  13. And where is your texture located?
  14. 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.
  15. //in any class that is not EntityPlayer public void someGenericFunctionThatPassesEntityPlayer(EntityPlayer player) { player.entityData.setInteger("level",someValue); }
  16. That code does not help solve the problem as there are NO references to packets in that function.
  17. Considering I forget the [shift] in the shortcut so frequently...
  18. 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.
  19. 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()?
  20. 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
  21. Are you doing something that requires the item to not render as a default item? If so, what?
  22. When I need just one, I don't bother with the shortcut.
×
×
  • Create New...

Important Information

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