Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

pWn3d

Forge Modder
  • Posts

    39
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

pWn3d's Achievements

Tree Puncher

Tree Puncher (2/8)

4

Reputation

  1. Write your fields you need to store to nbt in the write method, and read them from nbt in the read method. nbt.setBoolean("tagname",boolean1); boolean1 = nbt.getBoolean("tagname");
  2. https://mcforge.readthedocs.io/en/latest/datastorage/capabilities/ You need to copy them on PlayerCloneEvent.
  3. 1.10 is already 2 versions old, update to 1.12 !!!! And no, 1.7 got still at least as many players as 1.10. 1.7.10 posts usually will get closed soon. Look at how vanilla code for following works (wolves) and try to copy that. For attacking you might need an own task.
  4. If you don't get that you should learn programming better. Read about Object oriented programming and inheritance. What you should do is override the "attackEntityAsMob" method in your entity.
  5. Or do it in the attackEntityAsMob() or any other attacking function... Yes, thats even better, since it doesn't even need an event.
  6. You should not do this in onUpdate, Use eventhandler for "LivingAttackEvent" and check if it was your entity that attacked.
  7. For a multiblock structure of that kind, you use a central block (containing a tile entity with a model, = the waterwheel) and fake blocks around it which are invisible but have collision, so they block the space. For a multiblock forming/unforming code you will need tileentities in your fake blocks too. I would use a Master TileEntity in the middle and slave Tileentities around it. How exactly you code the multiblock depends on how you want it to function. should it be built by the player? Or only one block should be placed and the fake blocks spawn automatically?
  8. You should let run your item creating/removing code only on the server. (In tile entity update). On the client you should only change progress. If the server changes something with it's contents or state (finish/start), you need to send out a sync packet. This is done by marking the block for update. When getDescriptionPaket and onDataPaket is implemented in the tileEntity a sync with NBT tags is made.
  9. This is possible from the behaviour you described. The client does not know what the server does. This is normal. The DetectAndSendChanges method in the Container should sync the values when the gui is opened. Maybe there is a bug somewhere. But it's a lot of code to look through, I could not see an obvious mistake in a quick look. You could try debugging with System.out.println, there you see what thread has written it to the console. If it's in a code that gets called on both sides you can see possible desyncs.
  10. pWn3d

    AABB Help

    All 3 coordinates go from 0 to 1. 0 as min and 1 as max means full block size in that axis. If you want it something in size (6x1x6)/16 your x and z min are 5/16, x and z max are 11/16. Your 1min is 0 and yMax is 1/16 if you want it on the ground. For a size of 6 the span between min and max must be 6. Min is the distance away from the lower border, and (1-Max) is the distance to the higher border.
  11. McJty released something called "compatLayer" that allows to support 1.11 and 1.10 with the ItemStack changes. This should make it possible to just have to compile it once for 1.11 and once for 1.10/1.9.
  12. This is a very good feature. I would definitely use it if I update my Mod to 1.11 and it's there. (I would use it in 1.7.10 too, but I don't think the forge team is willing to add stuff to 1.7 :'(). One thing that I think needs to get added is a submenu. So you have a button "Mod Sound Sliders" which opens a submenu with a list of all modded sound sliders. (Similar to keybindings). Every mod is a major category, and maybe allow mods to add a minor category within the mod.
  13. In before "1.7.10 not supported bla bla": You need to store the rotation[0-15] somehow in your tileentity. And then in your tileentity renderer read this rotation field and do a glRotate by 360/16 * <rotation field>. to store the rotation you would do this on block placement. (Your Block class). You then get the tileentity and set the rotation according to current player rotation. (you need to map the degrees to 0-15). Look for tutorials about TileEntity Rendering in 1.7. There should be some. Or tile entities in general for how to store the values.
  14. The text above the image actually describes it: Look at BlockGlass source file what it does in shouldSideBeRendered() method. Also, remove this 4 lines, they don't to anything. You should try to learn java more before you try more complex things. Read about object oriented programming, inheritance and what methods are and what overriding a method does.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.