Everything posted by Bedrock_Miner
-
ItemTooltipEvent - Rendering Textured Icons
Well, I now need to render some text showed on my rendered picture. The problem is, that the zLevel setting seems not to work, because the text is rendered under the items although the zLevel is set to 300. How can I solve this problem?
-
ItemTooltipEvent - Rendering Textured Icons
I now solved it... To be honest, it's very easy. ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight); int x = Mouse.getEventX() / scaledresolution.getScaleFactor(); int y = (mc.displayHeight - Mouse.getEventY()) / scaledresolution.getScaleFactor();
-
ItemTooltipEvent - Rendering Textured Icons
Actually I was inspired by thaumcraft... But the problem is, that Azanor didn't made his code publicy available.
-
ItemTooltipEvent - Rendering Textured Icons
Thank you! But I now need to know, where the tooltip is rendered to adjust the position of the Icons. How can I find this out?
-
[1.7.2] Images as buttons in a Gui
Please be accurate when writing some error posts. WHAT exactly should happen -> How should the button look like? What DOES exactly happen -> How does the button look? What is your CODE -> The method in which the problem is caused (That's what you have done ) AND the corresponding objects => Is the resourceLocation set correctly? I don't know if this object is right if i can't see its declaration. I actually don't understand two things: 1st: Why do you render two textured rects? 2nd: You use two arguments in the second call of drawTexturedModalRect for x and one for y, but both of them use this.width. Is this correct? (this.xPosition + this.width / 2, this.yPosition, 200 - this.width / 2)
-
[1.7.2] My pickaxe crafting recipe isn't working, can somebody help?
The first String "PPP" is three letters long while the others are only two letters long " R"! Let me give you one advice: Structure your code and don't put everything in one class, this is a little bit confusing..
-
ItemTooltipEvent - Rendering Textured Icons
Hello Everyone! I want to make the vanilla Items (and others) showing a small Icon when you hover over them. But with the ItemTooltipEvent, I don't get the required Objects to do this. I need a gui object to call drawTexturedModalRect. How can I get this object? Or is there another way? Thanks in advance!
-
Adding a database to a mod
Thanks a lot, it worked now
-
Adding a database to a mod
Sorry, but I actually don't manage it. My File is in the folder src/assets/magicum/data/item_essences.csv. What do I have to write into the argument of this method to get access to this file?
-
Adding a database to a mod
Sounds quite nice, but what am I supposed to write as the argument? If I just write "item_elements.csv" I get an NPE. (The file exists of course)
-
Tile Entity Problems
Thanks a lot! It works now.. The deobfuscated names are a little bit weird sometimes, you're right.... I think, ICrafting would better be called ICraftingUser or something, because thats what it is used for....
-
Adding a database to a mod
Hey Guys! I want to add some effects to each block and I'm wondering if you can add a kind of a database to the mod to keep the assignments Block->Effect or Item->Effect outside of the code, because there are so much Items. I thought about a csv, txt, dat or json file which keeps the assignments and is read at runtime. But: Where can I save this file, that it is available in minecraft as well as in the development environment and doesn't have to be created at runtime? Or do you have a better Idea to handle the data? Thanks in advance!
-
Tile Entity Problems
I copied some code and now I think I found the problem.. I have a button in the Gui which controls the furnace. (Sorry, I havent posted this part of code) The Furnace only works if this button is pressed (It's a toggle-button) I thought, this would work, thats why I didn't post it. But: The value of the button is not synchronized with the server. Do I need a packet to do this or is there another way?
-
Tile Entity Problems
I don't exactly understand what you mean. Which data should I sync and when?
-
Tile Entity Problems
If no one has an idea, I'm going to delete the TE, copy the code from tileEntityFurnace and recreate everything.
-
Tile Entity Problems
Do you have to read the inventory seperately? I thought this is automatically linked to the inv..
-
Tile Entity Problems
Hey Guys! I created a TileEntity which should work nearly the same as a furnace with the difference that it uses no fuel. I have a problem with this furnace: If I place a stack in the slot to take the ingredients from, it starts taking them, but if I leave the Gui and reopen it, the process is back at zero. Why? Code: Actually, the block should smelt every tick because of the onUpdate method. Actually it resets everytime I open the gui.
-
[1.7.2] Damage an ItemStack properly
I now created a small method which reads the damage of the stack, adds one, sets this new value to the stack and finally sets the stack as a slot of the inventory. But WHY is this that complicated?!
-
[1.7.2] Damage an ItemStack properly
Hey Guys! I wanted to create a crafting table which uses a special item to craft. The item has a durability of 64. One damage point should be added on crafting. The problem is that this doesn't work. Code: Item: onCrafting: I hope someone understands the problem...
-
Start value for Extended Properties
Hm, I think, you're right. I'll change it to an array of values rather than a hashmap
-
Start value for Extended Properties
Well, I did it now in the constructor and it worked. The HashMaps have the advantage of easier packet handling: one packet for all values without a switch statement to get the correct one.
-
Start value for Extended Properties
I wanted to do it with a hash map because you can enlarge the maximum amount of mana. And actually I wanted to add some more values. But I'm going to try the method with the nbt check. Thanks for this.
-
Start value for Extended Properties
Hey Guys! I've created some extended properties for the player's mana. I want the player to have 200 Mana on the first spawn. How can I do this? This is my code: PS: init doesn't work, its only called on client side.
-
Where to fine the obfuscated MC Method names?
You are talking about AccessTransformer, right? You can do this with AccessTransformer I think, but on the Wiki was written that it would be better to use reflection. How I did this is quite simple to explain: First I tried to get the obfuscated object (cause this would be the default case) in a try-catch block. In the catch statent for ClassNotFoundException I created another try-catch block which contains the code to get the deobfuscated object. If you are now in development, the first one fails and the second one is executed.
-
Where to fine the obfuscated MC Method names?
Hey guys! I've been working on some renderers and I used the block destroy texture for one of them. I accessed this private field via reflection. The problem is: In minecraft itself (not in eclipse) the names are different because of obfuscation. Where can I find a list of all obfuscated Classes/Fields/Methods? Thanks in advance!
IPS spam blocked by CleanTalk.