Everything posted by Draco18s
-
[1.6.4] [Solved] Massive lag setting textures inside a loop
Yes. You're not saving your textures anywhere and are constantly creating new ones.
-
How to make colored armor
Not easily. You'd probably have to write your own renderer. Just swap your pngs and it'll work.
-
How to make colored armor
Yes. But my point is that the "overlay" layer needs to be transparent.
- [1.7.2] Packet Troubles
-
[1.6.4]How to make a spawn egg
EntityList.addMapping(EntityClayGolem.class, "Clay Golem", 3, 13347172, 7033635); Those last two ints are the decimal representation of the egg colors. The first one, IIRC is the base color, the second is the spots.
-
[1.7.2] Packet Troubles
Is there a reason you're not using Packet250CustomPayload? It's super easy.
-
How to make colored armor
It is. Minecraft is weird like that sometimes. Like diamond picks using ToolMaterial.EMERALD. Anyway, I have no idea.... Actually wait. I do. Your PNGs. Do you have a regular and an overlay texture? I assume so. The regular is the one that gets colorized. The overlay is then rendered after with no color adjustment. I think that might be your problem. And yes, it's a total nuisance. But that's how the armor renderer was written.
-
Blocks displayed as tile.null.name
Or move those calls into the constructor: public class BlockClass extends Block { public BlockClass() { super(Material.gourd); this.setCreativeTab(mod_myMod.tabMyMod); setStepSound(Block.soundTypeWood); setHardness(1.0F); setBlockTextureName("mymod:myblock"); setBlockName("myblock"); } }
-
[1.7.2] Reference Blocks and Items
ItemStack.getItem() Also, new ItemStack(Blocks.sapling, 1, 1) for metadata.
-
[1.7.2] Custom block model in inventory
https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/client/ItemRenderSpikes.java https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/client/SpikesRenderer.java
-
Trick Block
You'd need to override the getColor() function. Not sure if there's one that passes the world object to it or not.
-
[1.7.2] NBT not working???
That function, yes, and another. public void onDataPacket(INetworkManager net, S35PacketUpdateTileEntity packet) { readFromNBT(packet.data); } (alert: this code was for 1.6.4, I just updating the packet class type, there MAY be other differences for 1.7) They're both called automatically.
-
not restricted gui
Define "GUI." Do you mean something like the player's health? Or do you mean like a furnace inventory?
-
[1.5.2] Server crash due to ModLoader.addArmor()?
Probably because the server doesn't know WTF a texture is. Also, ModLoader != Forge. You should look to see how Forge handles the same thing and do it that way. ("But," you say, "Forge comes with all of these ModLoader classes." No, that's FML aka Forge ModLoader. It translates ModLoader calls into Forge calls so that ModLoader mods and Forge mods are compatible with each other).
-
[1.7.2] NBT not working???
You (the programmer) don't have to. That's the point of overriding existing functions: they're called by Minecraft's internals automagically.
-
Starting a new PowerNet
Yes, it would. But it's also a hell of a lot easier than trying to implement your own efficient power network yourself. Plus we're up to like four major, different, power systems at this point aren't we?
-
Trick Block
The most complicated thing in it is the camouflage code (getTexture). And that's not even relevant here.
-
[1.7.2] TNT, setResistance, and createExplosion help
You might want to take a look at http://minecraft.gamepedia.com/TNT#Explosive_force http://minecraft.gamepedia.com/Explosions#Model_of_block_destruction
-
Event for EntityItem Falling?
There's also a collide function in the Block class that will detect entities, IIRC. Look at the hopper.
-
[1.6.4] Get the Resource/Resource location of any item.
Item#getTextureName()? Then pass that to new ResourceLocation()
-
Starting a new PowerNet
Why? Why are you building Y.A.P.S.? There's really no point, just go get Universal Electricity and use its API for your machines.
-
Trick Block
Try comparing with this: https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/block/BlockIllusionary.java
-
How to make colored armor
Hmm. Looks like what you have is right.... I managed to get it working. Not sure what I have that you don't. https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/item/ItemArtifactArmor.java
-
Most efficient way to wait?
What Saxon said. If you pause the game your "timer" would keep counting down.
-
[1.7.2] Assets?
You don't need this: @Override public void registerIcons(IIconRegister register) { this.itemIcon = register.registerIcon("test:testItem"); } If you're using a single texture. Also, use all lower case for your texture file name and your setTextureName string.
IPS spam blocked by CleanTalk.