Everything posted by Draco18s
-
Still Get Forge Scala-Library Failed To Download After I've Downloaded!!
Corrupt file? Works for me.
-
[ERROR] Setup MCP and "bug" in Forge SRC.
- Still Get Forge Scala-Library Failed To Download After I've Downloaded!!
Read the EAQ- [1.6.4][SOLVED]Dynamic Tooltip
This is what System.out.println() is made for.- [1.6.4][SOLVED]Dynamic Tooltip
It's called automatically. All you need to do is add your string to the list passed as a parameter.- How to make a item/itemStack have multiple damage bars
MinecraftForgeClient.registerItemRenderer(...) ?- [1.6.4][SOLVED]Dynamic Tooltip
You have to save the information somewhere. Then the right-click changes that datavalue, then the addInformation function interprets that datavalue as whatever you want it to say.- [1.6.4][SOLVED]Dynamic Tooltip
Dynamic, how? In any case, this might help: https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/item/ItemArtifact.java Look for addInformation(...)- [SOLVED] [1.6.4] Spawning mobs in other mods biomes
I have this feeling you didn't read what they're trying to do.- [SOLVED] [1.6.4] Spawning mobs in other mods biomes
In post init loop through the list of biomes: public static void generateBiomeData() { for (int i = 0; i < BiomeGenBase.biomeList.length; i++) { BiomeGenBase biome = BiomeGenBase.biomeList[i]; if (biome != null) if (biome.biomeName == null) { System.out.println("[Wispy] Biome (id " + i + ") has null name, could not build spawn information."); } else { String name = biome.biomeName.toLowerCase(); float E = biome.temperature; float F = biome.rainfall; float H = biome.minHeight; int I = biome.theBiomeDecorator.flowersPerChunk; int J = biome.theBiomeDecorator.grassPerChunk; int K = biome.theBiomeDecorator.treesPerChunk; } } } } There are other factors too, those just happened to be ones I was using for a mod (my variable names ended up coming from an excel spreadsheet. F was column F, etc).- [1.6.4] How to change part of the texture of a block?
I figured. I tend to do really bizarre things when I mod. Works out to be great examples in so many ways for much simpler purposes. I didn't know about multiple render passes when I did that block, though. It dates about six months older than the Item...I should redo how several of the blocks are rendered. The spikes block uses three textures (I could probably just use setTextureOffset instead!)- [1.7.2]textures don't work
Oh good catch.- [ERROR] Setup MCP and "bug" in Forge SRC.
...Forge 737? What version of Minecraft are you trying to mod with here? If it's not "1.7.x" then Lex is just going to jump in here and say "Use the current version."- [SOLVED][1.6.4] Config file creation/load
It saves all changes made to it. There are ways to set values, even if those values already exist. And one of the changes you'd have to save is its initial setup. Leave that out and the file will be blank!- [SOLVED] Change player dimension on item right click
It's because vanilla assumes that travelToDimension() needs to create a nether portal. The reason you're "ending up back in the nether" is that you transitioned to the overworld, vanilla placed a nether portal, and because you didn't have any teleport-cooldown set, you were instantly sent back to the nether (because you were touching the created portal). I had this problem and the only solution I found was to send the player to the overworld, then move them to a new location. Even then there's a small possibility of creating a nether portal (but the player doesn't end up touching it).- Problems with shapeless recipe
Huh. I've got no idea. And you're welcome for making it neater.- [1.6.4] How to change part of the texture of a block?
Yes. Use multiple passes. First pass renders the background, second pass uses the overlay. Here's an example for an Item, but I'm pretty sure Blocks can do it too. https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/item/ItemArtifact.java (Keeping in mind that I'm using NBT data to store which icon to use and the icons themselves are stored in an API referenced hashtable) If it doesn't work in a similar manner, an ISimpleBlockRenderingHandler will work https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/client/RenderArrowTrap.java Line 109 renders the base texture and the switch statement on 110 renders an overlay across one face. Not the best code in the world, but it works, so I haven't cleaned it up.- Problems with shapeless recipe
Know what's cool about Object... ? GameRegistry.addShapelessRecipe(new ItemStack(MyMod.MyNewBlock), new ItemStack(MyMod.MyOtherNewBlock), new ItemStack(Block.dirt)); Voila!- [1.6.4] How to change part of the texture of a block?
You don't need a TESR, I was asking if you were using one. For a full cube you can either go the standard block renderer route or you can go ISimpleBlockRenderingHandler, if the default renderer won't work for you. Likely the default renderer will work and you just need to write a getIcon() function to handle your needs. There's one in the Block class that has an IBlockAccess or World parameter passed to it. Use that parameter to get your TE and determine the state and which Icon should be returned as a result.- Sync container inventory
Super easy As long as you've set up your read/write NBT functions (inventory persists across a save/load boundary) then all you need is this: 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); }- [SOLVED][1.6.4] Config file creation/load
In your pre-init function (the @EventHandler that takes a FMLPreInitializationEvent, though the others work as well, but best practice is pre-init) do this: Configuration config = event.getSuggestedConfigurationFile(); BAM. Now you have access to the file. config.load(); //read the file config.getBlock("name", defaultID); config.getItem("name",defaultID); config.save(); //writes any changes to the file Example: https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/DragonArtifacts.java- [1.6.4] How to change part of the texture of a block?
How is your block being rendered? ISimpleBlockRenderingHandler, TileEntitySpecialRenderer, or neither?- [1.6.4]Subscript in item name
Those are tooltips, not subscript. The OP wanted subscript.- Achievement page with CUSTOM BACKGROUND AND BORDERS
FTFY- [1.6.4] How to change a name of a item in code when right clicked.
Noooooo.....Don't use the language registry. That's what language files are for! So much easier and it makes translation work easier because you don't have to write code to do it. - Still Get Forge Scala-Library Failed To Download After I've Downloaded!!
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.