Jump to content

Vogner

Members
  • Posts

    73
  • Joined

  • Last visited

Everything posted by Vogner

  1. Case is always important in Java. Is the method capitalized in MFL 1.5.1? It should be giving him a compile-time error otherwise, considering the @Override annotation.
  2. Would anybody mind elaborating a little on why that works? I'm not sure why it would even be necessary, tbh. As of right now I have zero experience with server modding.
  3. Title says it all, really. I have craftable (and placeable) chocolate milk in my mod, but I can't get the bucket to stop persisting after crafting, resulting in a dupe. Can anyone help me out with this?
  4. I figured it out last night, too. I actually came here with the intention of simply giving you my CowHandler code, but it's better that you worked it out for yourself. However, in my mod I made milk an ingame liquid, and I have a problem where interacting with a cow with my wooden bucket prematurely uses the bucket, placing the liquid immediately. I'll figure it out, though. Anyways, for those who care, here's my CowHandler.class: //registration = commented out in Fleshwerxx.class package fleshwerxx; import net.minecraft.block.Block; import net.minecraft.util.MovingObjectPosition; import net.minecraftforge.event.Event; import net.minecraftforge.event.entity.player.EntityInteractEvent; import net.minecraft.item.ItemStack; import net.minecraft.item.Item; import net.minecraft.world.World; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.event.Cancelable; import net.minecraftforge.event.Event; import net.minecraftforge.event.ForgeSubscribe; import net.minecraft.entity.passive.EntityCow; import net.minecraft.entity.player.InventoryPlayer; public class CowHandler { @ForgeSubscribe public void milkCow(EntityInteractEvent event) { ItemStack currentItem = event.entityPlayer.inventory.getCurrentItem(); InventoryPlayer inv = event.entityPlayer.inventory; int heldItemID = currentItem.itemID; if(event.target instanceof EntityCow) { if(Fleshwerxx.debug) event.entityPlayer.addChatMessage("Debug: right clicked cow!"); if(heldItemID == Fleshwerxx.bucketWood.itemID){ inv.consumeInventoryItem(Fleshwerxx.bucketWood.itemID); inv.addItemStackToInventory(new ItemStack(Fleshwerxx.bucketWoodMilk)); } }//else if (target instanceof EntitySquid) //Code to get ink } }
  5. My mod has an identical feature, with the same issue. I've tried everything, I'm beginning to think we're going to have to create an event handler for interacting with the bucket with the custom bucket.
  6. Likewise. I'm trying to figure out how to remove the terrain generation lakes, or better yet, replace them with my own liquid.
  7. Is this the same reason why my custom bucket won't return one of my custom milk buckets when I right click on a cow, even though I use the exact same code as the vanilla bucket?
  8. To clarify, INSIDE the zip folder that actually contains your mod, you need to add another folder called mods.. Here's what I mean: Zip File: LotsOBlocks.zip These are the folders you'd need inside that zip file: LotsOBlocks mods And inside of that mods folder will be the textures folder, and inside of that you'll need another folder called LocksOBlocks, and inside of that two folders, called items and blocks, respectively, and inside of those two folders, finally, will be your textures. Minecraft will then recognize your textures, provided all your code is in order.
  9. Hm, you seem to have typed lamchoprawID instead of lampchoprawID. That said, it's spelled lambchop. Can you show me your item class?
  10. I'm sorry if this doesn't help, but make sure that the methods you're overriding still have the same number of parameters as before the patch.
  11. Alright, I got off my lazy ass and figured out how all the bitwise AND expressions work, since they seem to have popped up all over the place in 1.5 code. Bitwise AND operations produce a value no greater than the second operand. You'll need a very basic understanding of reading binary numbers to understand this little lesson. A bitwise and produces a 1 if both bits of two compared numbers are one, and a zero under any other circumstances. Here's how it works: Let's try the expression (3 & 9) 1001 (9) 0011 (3) ______ 0001 (3 & 9) becomes the binary number 0001, because the far right digit is the only one in which both values have a 1. If you do the arithmetic, (x & 3) will always become either 0, 1, 2, or 3. 0 & 3 = 0 1 & 3 = 1 2 & 3 = 2 3 & 3 = 3 4 & 3 = 0 5 & 3 = 1 6 & 3 = 2 7 & 3 = 3 8 & 3 = 0 9 & 3 = 1 10 & 3 = 2 11 & 3 = 3 12 & 3 = 0 13 & 3 = 1 14 & 3 = 2 15 & 3 = 3 Obviously if you use (x & 4), or (x & 2), the resultant value will never exceed 4 or 2, respectively.
  12. Seems like a bunch of block placement-related methods in World have gotten a fancy new parameter. I have a hard time with bitwise operators, would anybody mind explaining what this new parameter is used for? Edit: If you check my post below, I at least describe how to understand the bitwise AND operator, which appears with greater frequency in 1.5 code Edit 2: Regarding the setBlockAndMetadataWithUpdate method, the extra parameter supposedly specifies what, exactly, the "Update" part of the method does. See the post below by Turtle7878 for details.
  13. starting from your mod's root directory: /textures/blocks/
  14. Check the src for Buildcraft or EE. They're open source.
  15. There's an unofficial one at this forum: http://www.minecraftforge.net/forum/index.php/board,57.0.html Oh, and give your mod a config file if you haven't already.
  16. They have to manually rename methods after major updates. It takes time to get them all caught up. Chill, mon.
  17. There is now a mandatory directory architecture. Check this thread for details: http://www.minecraftforum.net/topic/1722368-15-icons-and-block-textures/
  18. If you're referring to an animated texture, you use .txt files to config them now. Check the vanilla textures folders inside the minecraft.jar If you mean sprite sheets in general, they've been done away with. Every texture has its own file now. Check the link above.
  19. Works great, thanks a lot!
  20. The computer I play Minecraft on does not have internet. How do I turn off the check before the game starts? At the very least, can this check be bypassed, or optionally ignored? Oh, and your "who is the creator of Minecraft" question accepts neither Mojang or Markus Persson, caps or no.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.