Jump to content

Failender

Forge Modder
  • Posts

    1091
  • Joined

  • Last visited

Everything posted by Failender

  1. you can create your own commands and allow every user to use them. i dont think there is another way without making players op
  2. That seems like an quite good api tbh. I will give it a shot, thank you!
  3. Hey folks, I am triing to rework how crops work. What I am triing to achieve is that crops, that are fully grown and dont get harvested go bad after a specific time. Sadly Im not sure how to do that. One idea I had was to subscribe to the event that was fired when IGrowable groes, and start a timer there (mb TickEvent or MinecraftQueue) that will check if the crop is still there after x seconds, but Im not sure if that is the correct approach. Any help is appreciated. Greetz Fail
  4. sending a list is pretty easy. just send the size of the list first, after that iterate over the list and send each of the 3 ints of the blockpos. when reconstructing the list just read the first int, you know the size of the list, after that iterate over the size and create x blockpos
  5. EntityNikora entitynikora = new EntityNikora(world, player); player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.RED +"You de-summoned Nikora.")); entitynikora.spawnExplosionParticle(); entitynikora.setDead(); what exactly are you triing to do there
  6. My way was to do it recursive with the logs and every time you check for a log destroy each leaf in radius x
  7. Well you could take the position of the entity that broke the block and the position of the block and calculate it
  8. sounds like u need to do some kind of GL rotating, not rotating the texture
  9. https://github.com/coolAlias/Forge_Tutorials/blob/master/CustomPlayerInventory.java
  10. Well if i google minecraft modding I find a lot.. Hint of the day : Learn java the minecraft
  11. there is no way to do that implemented in vanilla. you will need to write your own algorithm for it
  12. int[] itemCounts = new int[recipe.length] for(i<recipe.length) { for(j<inventoryCount) { if(recipe[i].getItem()==inventory.get(j)) itemCounts[i]+=inventory[j].stacksize; } } bool flag=true for(i<recipce.lenght) { if(!(itemCounts[i]>=recipe[i].stacksize)) { flag = false; break; } } if(flag) doYourStuff();
  13. would you mind to tell us the error? We are not the best at guessing
  14. im not certain with it, but I think getStrVsBlock means how much "your tool helps". which means if you can harvest the block there is factor that tells you how much ur mining time gets reduced. that might be getStrVsBlock
  15. Tools can only accelerate the speed of breaking a block. So if you try to harvest a block with a tool thats is returning false its like mining it with bare hands
  16. This is the wrong forum - This is the forum for help with creating mods not modpacks. Anyway it seems like one of your mods is doing wrong. (noppes.mpm.client.RenderMPM) I dont know which mod of the list it is so try removing mods until you find the bad one
  17. 1. calculate the size of the gui to draw 2. calculate the x where u want to start to draw (xmax-size) 3. draw the gui!
  18. did you try some basic debugging? add sysos and check if ur code is getting called etc
  19. Well you create the library like you create any other library? you tell eclipse to export as jar and make a guide thats tells ppl how to use it
  20. wait what. what are you doing there and why. you want to have the total amount, so evaluate the string AFTER the loop and use the variable count. the variable total is redefined for each loop iteration so will always be only the count of the actual stack
  21. int i foreach itemstack in inventory i+=itemstack.size
  22. ur item has nothing to do in the armor slot. dont put it there..? modify ur random so its not giving u a random number that is a an armor slot
  23. Also im not sure why you are checking the random stack you get for null, since its not really making any difference. keep your code clean and it makes errors much easier to find
  24. So. On update gets called everytime you have the item in your inventory. and still you are checking if you have items in your inventory. If you got a crash it helps A LOT if you show the crash.
  25. So you want to know which item was just removed right? Maybe you should store the item inside a variable inside your te. Or go like diesieben mentioned and whenever the inventory slot should get set to null do your thing
×
×
  • Create New...

Important Information

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