-
Posts
613 -
Joined
-
Last visited
Everything posted by Bedrock_Miner
-
Working mod causes Error out of eclipse
Bedrock_Miner replied to Bedrock_Miner's topic in Modder Support
Well, my code is working that way. I pass null as the world, because I want to render the Item. There you need no world object. Also, the renderer should be global, so I used getBlockFromItem The problem was, that I added this mod and loaded a world in which other mods have been added previously. I made a new world and it worked. But: WHY does Forge not manage to fix these Bugs? If you save a list of ID-UnlocalizedName combinations for each world, you won't have this problem any more. This would take, of course, add a little bit of space of the disk, but not that much. I really don't understand, why these problems still appear, as they are so easy to solve. -
Working mod causes Error out of eclipse
Bedrock_Miner replied to Bedrock_Miner's topic in Modder Support
Anyone? -
[Solved] Negating mirrored crafting recipes [1.5.2]
Bedrock_Miner replied to larsgerrits's topic in Modder Support
Here i have posted a solution for this problem: http://www.minecraftforge.net/forum/index.php/topic,17964.0.html -
The Idea with copying the recipe worked! @larsgerrits and others: Make a new class "extends ShapedRecipies". Add a constructor (eclipse should create a template) Override the method "matches". There, the method checkMatch is called two times, once with the last parameter true, once false. Delete the call with the last parameter set to true, cause this is the mirrored check. Finished! To set up your recipe, you can copy the methods from the craftingManager to create recipies from three strings and a Object list. Copy it into your class into a method maybe named "create" which returns a recipe (the class you made) Edit the code, that it returns a new object of this recipeclass and you're finished!
-
Hey guys! I created a mod which works perfect in eclipse, but if I compile and run it, I get the following Error if one of my Items should be rendered in the Inventory: Looks like a Blocks.air is passed to the renderer instead of the expected ModBlockLargeSign instance. Here are the corresponding code parts: I hope, anyone of you understands this Error. As I said, in eclipse it works well... If you need more code, please write!
-
Hey Guys! I need to create some recipes which differentiate between left and right side. The problem is, that the normal recipes are mirrored to fit both sides. How can I disable this mirroring for my recipes?
-
Be honest: Would you associate some variables called field_xxxxxx_a with a position variable if the entity has got another position variable itself? But apart from this it works now. thanks a lot!
-
Could the problem be, that I'm running Forge 1.7.2 (build 1024) and you maybe another version? I was wondering, which variables you used in your code example: xPosition, yPosition, zPosition. In my Entity class, there are only variables named posX, posY, posZ and they are not Integer but Double values. Which Forge version are you working with?
-
Entities, Collision Boxes and Lighting
Bedrock_Miner replied to Bedrock_Miner's topic in Modder Support
This could be a possibility, but then you have to tell me how to hide this block completely (no boundingbox, no break particles and so on) and how to make it replaceable if you right-click -
Several problems: First, I encountered that with IEntityAdditionalSpawnData the Entities take much longer to spawn: I place an entity and three seconds later it appears. Additionally, the console is spammed with: Spawning entity on client Entity spawned on client (This is written instant, the Entity appears three seconds later. No problem with the renderer, I removed it for testing) Second, if I register the Entity with your settings, they don't appear after a minute or on relogging.
-
Wooh, fast reply But unfortunately this didn't work. I did it like this: @Override public void writeSpawnData(ByteBuf out) { out.writeDouble(this.posX); out.writeDouble(this.posY); out.writeDouble(this.posZ); out.writeByte(this.hangingDirection); } @Override public void readSpawnData(ByteBuf in) { this.posX = in.readDouble(); this.posY = in.readDouble(); this.posZ = in.readDouble(); this.setDirection(in.readByte()); }
-
Hey Guys! Just a few questions concerning entities. First: Can you make an entity emitting light, just like a block? Or can you add light sources to the world? Second: Can you add a collision box to an entity that a player or other entities can walk over it? If not, would it be possible to do so by teleporting the entities which are inside the base entity on top of it? Thanks in advance for every piece of information!
-
Hey Guys! I created a EntityHanging. If I place it in the world and wait a bit, it moved 0.5 Blocks upwards. why? The renderer is of course only registered on client side.
-
Text Rendering problems with EnumChatFormatting
Bedrock_Miner replied to Bedrock_Miner's topic in Modder Support
I looked into TileEntitySignRenderer till i finally found out that I forgot to set the normal. But I really can't understand, why this has such big effect -
Hey Guys! I want to create a Block which drops itself with several NBTTags, based on the TileEntity, but only if the Player is NOT in creative Mode. For this I need a method which is fired before the TileEntity gets destroyed, but has got a player object in its parameters. Does anyone know, which method to use?
-
Text Rendering problems with EnumChatFormatting
Bedrock_Miner replied to Bedrock_Miner's topic in Modder Support
Anyone? -
Text Rendering problems with EnumChatFormatting
Bedrock_Miner replied to Bedrock_Miner's topic in Modder Support
The problem is, that the error appears not in the gui, but in the world. I want this sign to be grey, but in the world it's white. Everything from §8 up to §f is rendered white in the world, but it shouldn't! A problem might be this method: brightness = block.getMixedBrightnessForBlock(world, teX, teY, teZ); because with this code line brightness is set to 1.572864E7 as my debugging test showed. But I also tried setting it to different values manually, nothing worked. It could be this problem, but I don't know, how I could solve it: The brightness of the texture is always set to 1.0F. So, if you get orange (R:1.0F; G:0.5F; B:0.0F) it is turned to yellow (R:1.0F; G:1.0F; B:0.0F). Also, al the Colors up from §8 have little parts of all color and this is set to 1.0F each. This could be the problem, but I don't know why it appears -
Use setBlockBoundBasedOnState() . You'll get a world object and the position with this method, so you can find out the metadata. Here is an example of this method: (Used in my SignCraft-Mod)
-
Hey Guys! I created a sign, which can be used to write colored text. If you press a button in the GUI, a EnumChatFormatting object is added to the signs string. The problem is, that the text is rendered wrong. Here is one Text in the GUI (where everything is fine) And here is the same text ingame: The Renderer method: The Renderer Superclass: Call in the GUI: Why is the sign rendered different ingame than in the GUI?!
-
Thanks a lot, this works!
-
Well, I now created a class that extends Packet. But how can I get access to the world or the Tile Entities in processPacket to commit the sended changes?
-
Oh, ok.. But which packed should I use instead?
-
The GUI is opened, of course, on client side, so I can't understand why a Serverside packethandler is passed.
-
Hey Guys! I created a new Sign for my mod. The problem is, that I can't sync the sign after exiting the gui, because the method I tried leads to an error. If i click on done in the gui, the game crashes. onGuiClosed Important parts of the TileEntity: And the error screen:
-
I added ReadableBookshelf to the mod list! Have fun with this minimod!