-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
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.
-
You're going to need to use debug statements to figure out why. I can't help you do that.
-
Yes. And don't forget a push and pop matrix, if you don't already have one (you should).
-
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.
-
The solution is now a bit different too. You just have to make a change in your code and it will be fine.
-
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!
-
Also mod_MinecraftForge will break under certain conditions. If you do want to declare the dependency, use just "Forge" (no quotes).
-
Bad modder! No cookie! That function is no longer an override. public int tickRate(World par1World) { return 6000 + par1World.rand.nextInt(100); } Magic!
-
Delete the Forge log, then run the game, then copy and paste the entire contents of the forge log here.
-
and the filename?
-
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)
-
public static boolean hasConnectedTexture = false; public static boolean isMaelstrom = false; Mmmm....static....
-
[Question] Is it possible to use blocks from other mods?
Draco18s replied to ColdFox's topic in Modder Support
You can. -
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)
-
And where is your texture located?
-
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.
-
how to set player specific nbt tags outside of the EntityPlayer class
Draco18s replied to Gnomorian's topic in Modder Support
//in any class that is not EntityPlayer public void someGenericFunctionThatPassesEntityPlayer(EntityPlayer player) { player.entityData.setInteger("level",someValue); } -
That code does not help solve the problem as there are NO references to packets in that function.
-
[SOLVED] only getting blocks from itemstacks
Draco18s replied to Casual Dutchman's topic in Modder Support
Considering I forget the [shift] in the shortcut so frequently... -
[Question] Is it possible to use blocks from other mods?
Draco18s replied to ColdFox's topic in Modder Support
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. -
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()?
-
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
-
[SOLVED] only getting blocks from itemstacks
Draco18s replied to Casual Dutchman's topic in Modder Support
When I need just one, I don't bother with the shortcut.