Everything posted by Draco18s
-
[1.8] [SOLVED] Trying to get the highest block at the location
No, no you cannot. For two reasons. 1) @SideOnly(Side.CLIENT) 2) Returns horizon height for use in rendering the sky. As in, where the sun gets clipped: return this == FLAT ? 0.0D : 63.0D;
-
[1.7.10] Check If Birch Is In Hand?
And now you know why we use trace statements. They tell you what the program is doing as it does it, and lets you locate the problem area of code rather than BLINDLY GUESSING.
-
[1.7.10] Check If Birch Is In Hand?
Ok, now make your code look like this: System.out.println("Right clicked with: " + hand.getItem() + ":" + hand.getItemDamage()); System.out.println(hand.getItem() == Item.getItemFromBlock(Blocks.log)); System.out.println(hand.getItemDamage() == 0); System.out.println((hand.getItem() == Item.getItemFromBlock(Blocks.log) && hand.getItemDamage() == 0)); if(hand.getItem() == Item.getItemFromBlock(Blocks.log) && hand.getItemDamage() == 0) { System.out.println("Right clicked with the right block!");//this is the only new line And give me the output again.
-
[1.7.10] Check If Birch Is In Hand?
Just above that if statement, put this: System.out.println("Right clicked with: " + hand.getItem() + ":" + hand.getItemDamage()); System.out.println(hand.getItem() == Item.getItemFromBlock(Blocks.log)); System.out.println(hand.getItemDamage() == 0); System.out.println((hand.getItem() == Item.getItemFromBlock(Blocks.log) && hand.getItemDamage() == 0)); Then tell me what it prints out when you use various blocks.
-
[1.7.10] Check If Birch Is In Hand?
- [1.7.10] Check If Birch Is In Hand?
?- [1.8] [SOLVED] Trying to get the highest block at the location
Ah, yeah, that'd do it. Also, try to use the [code ] tag.- [1.8] [SOLVED] Trying to get the highest block at the location
Ah, you're right, I missed that. Also, the pos = pos.add(0, 255, 0); might not be what you want. Don't you want to set the Y value to 255 not add 255? Though, is getBlockState the right function to use here? Pretty sure that's equivalent to getBlockMetadata , although not having actually played with 1.8 I'm admittedly guessing.- [1.8] [SOLVED] Trying to get the highest block at the location
world.getBlockState(pos) <-- and where is j? You're looking at the same block every single time.- Brewing recipes
Potions are mo***fu*** weird. Those "weird strings" are basically a serialized way of doing bitwise math. Add, subtract, AND, NOT, XOR, etc. This is because every single potion in vanilla is a single item with 140 different damage values: Basically, each potion ingredient makes a change to the bits, only works if certain bits are active (for example, you can't make a splash potion out of a bottle of water even though if you give yourself a potion with those flags you will get a splash potion that doesn't exist) etc. etc. The one time I dug into the code I was duplicating it for my own purposes and even then it was tricky to work with and ended up redefining how the string options even worked because I couldn't get the original to do what I wanted/needed.- [1.7.10]NBT data reverts to 0 after right click
So I removed all of my int clip = itemStack.stackTagCompound.getInteger("clip"); and replaced it with just the itemStack.stackTagCompound line, but I get the same result. No, not that. Those are local variables. He means this chunk and anything that references these: Item ammoType; String name; double reloadTime; double shotTime; int clipSize; float damage; float baseDamage; String fireSound; String reloadSound; int durability; int currentShotTime = 0; int currentReloadTime = 0;- Right click event that triggers after block interaction
I know that. I don't have a certain block I'm trying to check for though. I'm trying to check for all blocks that interact only so I can spawn my entity if it doesn't interact. So you want any item when right clicked on any block to spawn something? Jesus christ, talk about a terrible idea...- Recompiling and Reobfuscating 1.7.10
"JAR files are fundamental archive files, built on the ZIP file format and have the .jar file extension."- Right click event that triggers after block interaction
Or you could fix your RIGHT_CLICK_BLOCK section of code to actually check for your block. More than one block returns false when right clicked and more than one returns true...- Rendering Custom Cake
Well. Did you call setTextureName ? What'd you pass?- help 1.8 for why minecraft is not loading this item texture <SOLVED>
Change "modmercenario:/items/materiales/aceromercenario" to "modmercenario:materiales/aceromercenario"- Distance limit for the chat.
No error included in post. Cannot help. If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. Now go and learn Java. That is an order.- Distance limit for the chat.
Have you tried creating a new IChatComponent?- Distance limit for the chat.
That function returns void.- [1.7.10] Check If Birch Is In Hand?
You need to add the metadata check, duh.- read and write NBT help <SOLVED>
If you're looking at a GUI, you may need to call: if (worldObj != null) worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); So that the server detects and sends changes to the client.- Problem with Custom Furnace
drawTexturedModalRect(guiLeft + 47, guiTop + 19, 176, 16, k + 1, 16); Lets see. So you're drawing it at an X and Y position (good, that works correctly) with a particular UV (good that works), with a width of K+1 (seems fine) and a height of 16. Uh, it looks like your height is wrong.- Adding Vanilla Items into an another Creative Tab
All of the functions you're not declaring as overrides automatically default to the version in the superclass. Ergo, you do have supers, they're just not written down.- Differences in packets
SMP / SSP have no differences in packets. As long as you do this: @Override public Packet getDescriptionPacket() { NBTTagCompound nbtTag = new NBTTagCompound(); writeToNBT(nbtTag); return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbtTag); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) { readFromNBT(packet.func_148857_g()); } Your TEs will update properly.- [1.8] BlockState use.
Ahhh. I wondered if it had gone TE. - [1.7.10] Check If Birch Is In Hand?
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.