Everything posted by Draco18s
-
Get Current Minecraft Player
It doesn't work because of the client-server architecture. A SSP game and a SMP game with one connected user are indistinguishable.
-
Help
Are you having chest pains? @OP: Look at my code! Github link is in my sig. Ba da dum ch
-
Setting 1 Id For Multiple Blocks
One of the two of them (onAddedToWorld, I think) returns an int. This returned int is the block's metadata. You should really look at blocks in vanilla that already use the desired behavior.
-
Setting 1 Id For Multiple Blocks
You don't have an onBlockPlaced or onBlockAddedToWorld function to set the block's metadata.
-
Crafting grid generator
No, I can't, because I am not versed in wiki template syntax. All I know is: It works. If you can't paste it into your wiki and get it to work, I cannot help you.
-
Crafting grid generator
Are you seriously having trouble understanding the concept of "copy and paste"?
-
Crafting grid generator
PROTIP: try clicking the link that says "create it now"
- Crafting grid generator
-
[Solved] Multi-texturing on Entity Models!
Hence:
-
Block not correctly breaking
You also need to set the hardness. (this.blockHardness = 3) or this.setBlockHardness(3F).//the F indicates that the value is a float, not a double
-
Crafting grid generator
This: http://www.minecraftwiki.net/wiki/Template:Grid/Crafting_Table If you hit "edit" at the top, you'll see that the rendered page (the documentation on how to use the template) is not the same as the page's actual wiki syntax.
-
[Solved] Multi-texturing on Entity Models!
I have blocks that I "render twice" in order to get an overlay. Icon camo = Block.blocksList[wid].getIcon(l, meta); //meta for the block's facing so that it grabs the icon of the face of the block that it is attached to renderer.renderBlockUsingTexture(Block.blocksList[wid], x, y, z, camo); //render the original block at an offset location renderer.renderBlockUsingTexture(Block.stone, x, y, z, block.getIcon(0, 0)); //render my overlay in the same location The same could be done for entities, but you'd have to rewrite their renderers.
-
Make a Packet send data to a block?
Like I said, it depends on what you're doing.
-
Crafting help?
It's called read the javadocs.
-
[Solved] Multi-texturing on Entity Models!
Technically you can do this with vanilla. However, either: a) you'll need to make base class edits to handle a "double" rendering pass (essentially rendering a second texture on new quads where they need to go) b) reflections (to do the same, but without editing the base classes)
-
Crafting help?
http://www.minecraftwiki.net/wiki/Data_values#Heads
-
Make a Packet send data to a block?
Depends on what you're doing. The one time I used it, I set the radius to about 5 (because it was a BlockContainer and the packet dealt with items in the GUI, which could only be accessed by someone within 4 blocks). That project is more or less abandoned now, but it was a valid use. Got another project I should finish up that needs some (more) packet-y stuff, and I think that will come in handy there too (TE is out of synch when placed, but interacting with it causes it to update because that is being handled already).
-
Make a Packet send data to a block?
You can limit who gets packets too. PacketDispatcher.sendToPlayersInRange(packet, distance) (Note: function name guess--I know it exists, but I don't remember the exact name)
-
Make a Packet send data to a block?
Or you could just code your own packet data (you can literally shove anything into an NBT tag, which can be shoved into a Packet250, which can be sent to the client). And yes. world.markBlockForUpdate() will do what you need. It specifically makes sure that the client receives the block's current status.
-
I Need Some Help
Not to be rude, but I'm going to be rude. How about you do your own damn research? The information is out there and this forum is not here for you to use like your own personal lazy-google.
-
Crafting grid generator
Wikia has templates. Don't know if it uses the same syntax as the Minecraft wiki, but it'd be easy enough to find out.
-
Setting 1 Id For Multiple Blocks
Unless you're Eloraam. This tutorial should help out.
-
Help
class myblock extends BlockContainer Seriously, find a vanilla block that does what you want (cough, a chest, cough) and look at its code.
-
[1.5.1]public boolean used in diffrent class
slot.putStack(ItemStack item) Le gasp
-
Detect Redstone Signal Strength
Here's what redstone wire does: Vanilla Redstone behaviour: - Block update event received - Check if can stay - Update strength of block - Calculate the changes in current - Get the current strength - Get the current strength again but this time with the other set of coordinates, gives the same result - Toggle off flag so wires don't give power themselves - Get the strongest indirect power from the world - Toggle the flag back on - If the indirect power is greater than the current strength minus 1, set the strength to the indirect power - For every cardinal direction, check the strength unless the block is the origin (the block is never the origin) - * If any side has a greater strength than the current strength, subtract one and set it to the current strength * Otherwise subtract the current strength or set it to 0 - If the indirect power is smaller than the current strength minus 1, set the strength to the indirect power (repeat?) - If the resulting strength isn't equal to the original strength, update the block and add the surrounding blocks to a list that holds the blocks that need to update - Copy the list of to-be-updated blocks to a new list - Clear the old list - For every block in the list, trigger a block update
IPS spam blocked by CleanTalk.