Jump to content

yorkeMC

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by yorkeMC

  1. In 1.12, to get an entity class from a String, I used Class<?> entityClass = EntityList.getClass(new ResourceLocation(str)); How would I go about doing the same thing in forge 1.17.1?
  2. I'm sort of new to capabilities; could you elaborate?
  3. Hello! I am attempting to render an effect on the player when they have a specific item in their inventory, however, other players on the server cannot see this effect because their clients can't see that the other player has the item in their inventory. How can I sync the player's inventory to other players on a server? Code: Render method, called from the ClientProxy
  4. When debugging server, the code replace always fails and prompts to restart. This happened with forge 1.7.10, and is continuing to happen with 1.10.2. Any help?
  5. My custom bow is not spawning an entity when I call world.spawnEntityInWorld(entity). I have even tried with other entities that are not arrows and they are still not spawning in the world. Help please? CLASS
  6. So with forge, how would I go about first off, finding the rotation angles that a player's head is rotated at? This is so I can make some tesselator code 'stick' to the player's head. Also, how can I make an armor pieces texture different IF it has a certain NBT tag? This tag can be applied to any armour be it vanilla armor, or armour from another mod. Are these things possible?
  7. So I am trying to make a recipe class that lets you attach 'spirits' to an item, and you can attach multiple spirits with different metadata, etc. But, for some reason it only works when the item you are attaching to is in a certain slot. I've tried everything I can think of, can anyone help out? CLASS:
  8. Never mind, solved. Here is the class if anyone was wondering:
  9. 1. Download your JAR then run it through this program called BON (I will link the file) to deobfuscate it. 2. Use JD-GUI to open the file, then save all the sources to a .zip folder. 3. Create a directory with forge decompiled in it (extract forge and run in a command window gradlew setupDecompWorkspace, gradlew decompile, and gradlew eclipse). 4. Go to the src/main/java directory and remove the examplemod package, and then remove the mcmod.info from the resources directory. 5. In src/main/java drop your source code from the JD-GUI zip file, and the resources from your JD-GUI zip file. 6. Run from a command window gradlew setupDecompWorkspace and gradlew eclipse once more. 7. Open it into your eclipse workspace, and continue as normal. ... Btw, this has happened to me before. Link to BON: https://www.dropbox.com/s/z44a8tlf1ujewbc/BON.jar?dl=1
  10. I haven't debugged the runes Boolean. It works fine, the problem isn't weather the runes are found. It is to do with the client and server sides of spawning the entity. Plus I had to add another check to that Boolean... public boolean checkRunes(World world, int x, int y, int z) { int[][] pos = { { 1, 0 }, { -1, 0 }, { 0, 1 }, { 0, -1 }, { 1, 1 }, { -1, 1 }, { 1, -1 }, { -1, -1 } }; ArrayList<Boolean> b = new ArrayList<Boolean>(); for (int i = 0; i < 8; ++i) { if (world.getBlock(x + pos[i][0], y, z + pos[i][1]) == BlockRegistry.BlockSpiritRune) b.add(true); else b.add(false); } if (world.getBlock(x, y, z) == Blocks.air) { b.add(true); } else b.add(false); return !b.contains(false); }
  11. Yeah it is not perfect, and can be improved. But that doesn't do anything to change the fact that my items wont spawn / spawn ghost items.
  12. It used "!worldObj.isRemote". And it is registered under MinecraftForge.EVENT_BUS and FMLCommonHandler.instance().bus()
  13. If I remove the worldObj check all works fine, but the items are ghost items and I cant pick them up. I don't think it is the for loop.
  14. So, if there is a circle of runes on the ground and you throw a pair of wings and a spirit into the circle is binds the spirit to the wings. That works fine. (there are visual effects too) then if you shift click with only a pair of wings in the circle and there are spirits already bound to the wings it will remove the spirits from the wings nbt and drop the spirit item in the world. There are different spirits hence different metadata.
  15. Yeah, but the metadata is supposed to change (in the for loop)...
  16. The size of the array is stored in another array because I need the length to be stored for later use in another file. So, I added it to an array. Also, there is a comment saying where the EntityItem is spawned. (this is code for a ritual to bind one item into another) Everything works perfectly except for the item spawning.
  17. So I am trying to spawn an item in the world, but it is not spawning at all. EventHandler Class EDIT: Solved. Here is the class if anyone was wondering:
  18. I have absolutely no idea why the arraylist is not containing the return for getNotesKey()... I can't find it :L
  19. So, I am using Vazkii's Lexica Botania code (with his permission). The bookmark feature for some reason crashes when you remove a bookmark, and I cannot figure out why. For some reason it is trying to remove -1 from an array list even when it shouldn't be told to. Here is the GUI code (modified version of vazkii's, slightly messy ATM) And the crash...
  20. It is quite easy actually, and you don't need to include the source of COFH's RF in your mod. I do this with Thaumcraft (I write the TC addon Tainted Magic). Basically, in short, you need to add a deobfuscated version COFH's lib as a referenced library. You do this by first downloading a deobf / dev version, then going into your build path - assuming you're in eclipse - and adding it as a referenced library from an external jar. Add this jar to a folder in your modding folder called libs so it builds properly. If you need more help DM me on twitter.
×
×
  • Create New...

Important Information

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