Jump to content

Aulig

Members
  • Posts

    42
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    Still new to forge!

Aulig's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hey everyone, Id like to find an entity between the player and another entity. I tried doing a raytrace (make the player face the entity thats further away) but it didnt really work. I hope someone knows a different approach. Thanks in advance
  2. Hey, as you can read from the title i want to slow the player down, using my clientside mod. So far i tried changing the player capability, motionX/motionZ and giving the player slowness. Either i did something wrong when testing or those dont work in this scenario. Thanks in advance.
  3. Thanks a ton! Your code is great except for a few minor issues, eg it isnt e.getButton() but e.button. Also the detection if the gui was closed didnt work so i replaced it with a few if clauses and Keyboard.isKeyDown(18) and Keyboard.isKeyDown(1). (18 is "e" and 1 is escape) Wasnt that big of a deal though, just wanted to let you know in case it helps you.
  4. Thanks a ton! Your code is great except for a few minor issues, eg it isnt e.getButton() but e.button. Also the detection if the gui was closed didnt work so i replaced it with a few if clauses and Keyboard.isKeyDown(18) and Keyboard.isKeyDown(1). (18 is "e" and 1 is escape) Wasnt that big of a deal though, just wanted to let you know in case it helps you.
  5. Well i doubt anyone will read this thread to the end. also i had a new idea i wanted to include, but youre the moderator - you decide. Feel free to delete it if you dont think its ok, im sorry in that case.
  6. Well i doubt anyone will read this thread to the end. also i had a new idea i wanted to include, but youre the moderator - you decide. Feel free to delete it if you dont think its ok, im sorry in that case.
  7. Hello, after a conversation with diesieben07 (http://www.minecraftforge.net/forum/index.php/topic,39068.0.html) we noticed that its kind of difficult to get the current villager trade. I want it to work even if the player hasnt put in any items, so ContainerMerchant#getMerchantInventory().getCurrentRecipe() wont work. Maybe its possible to use the MerchantRecipeList or InventoryMerchant#currentRecipeIndex. It just crossed my mind that maybe the GuiMerchant class holds useful information. Slightly modified code: //The integer value corresponding to the currently selected merchant recipe. private int selectedMerchantRecipe; MerchantRecipe merchantrecipe = (MerchantRecipe)merchantrecipelist.get(selectedMerchantRecipe); Could this be used?
  8. Hello, after a conversation with diesieben07 (http://www.minecraftforge.net/forum/index.php/topic,39068.0.html) we noticed that its kind of difficult to get the current villager trade. I want it to work even if the player hasnt put in any items, so ContainerMerchant#getMerchantInventory().getCurrentRecipe() wont work. Maybe its possible to use the MerchantRecipeList or InventoryMerchant#currentRecipeIndex. It just crossed my mind that maybe the GuiMerchant class holds useful information. Slightly modified code: //The integer value corresponding to the currently selected merchant recipe. private int selectedMerchantRecipe; MerchantRecipe merchantrecipe = (MerchantRecipe)merchantrecipelist.get(selectedMerchantRecipe); Could this be used?
  9. Hm okay, thank you. I will create a new Thread just in case someone else knows the answer
  10. I think i could do that, but what do i do with the index then? Can you get the trade (using the index) from the MerchantRecipeList?
  11. So actually (from what ive found out from some testing now) getCurrentRecipe is only then not null when the player puts in enough of the requested item into the villagers input slot so that the trade would be possible. This is kind of problematic as i want to put in the items automatically (before anything is in there). Do you know an alternative?
  12. But how? I am not looking at a villager without a recipe.
  13. Hm... Im getting a Nullpointer Exception with this code: if(mc.thePlayer.openContainer instanceof ContainerMerchant){ ItemStack requested =((ContainerMerchant) mc.thePlayer.openContainer).getMerchantInventory().getCurrentRecipe().getItemToBuy(); The error occurs once i click the villager. Do you know why this is happening?
  14. Thanks, how do i move an item into the villagers input slot though?
×
×
  • Create New...

Important Information

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