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


Forge Modder
  • Posts

  • Joined

  • Last visited

Everything posted by pWn3d

  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.
  15. Minecraft versions between 1.7, 1.8 and 1.9 have a lot of changes in them. A mod for 1.7.10 only works for EXACT that version. A mod for 1.8 only works on 1.8 and a mod for 1.9 only works for 1.9 (and maybe 1.10, this is an exception because there are only little changes so mods from 1.9 may work for 1.10). But other than that mods work for exactly that version they are made for. If you want to play an 1.7.10 mod you MUST play 1.7.10. 1.8.9 is pretty much a dead version now, so it's likely most mods will never be updated to 1.8 If they aren't already.
  16. You could write it like that: boolean netherStarMain = player.getHeldItem(EnumHand.MAIN_HAND) != null && player.getHeldItem(EnumHand.MAIN_HAND).getItem() == Items.NETHER_STAR; boolean netherStarOff = player.getHeldItem(EnumHand.OFF_HAND) != null && player.getHeldItem(EnumHand.OFF_HAND).getItem() == Items.NETHER_STAR; if ( netherStarMain || netherStarOff ){ You could also put both boolean statements directly into the if-condition, but that might be a bit unreadable.
  17. Thanks, thats definitely helps. I will try to make a simple anim on an item. If get it working, I will post the details.
  18. Override the "getIcon(int side, int meta)" method. You can return a different IIcon which is the texture, depending on the side. You must register your Icons in the "registerBlockIcons(IIconRegister reg)" method, save them to variables in your Block class and return them in the "getIcon" method.
  19. Yes thats what I meant with the grammar definition. I have not used an animation state machine before, but I know what a state machine is, didn't think of that, facepalm. Still It would be nice to have another example, a basic one. Whats the minimum setup, Like 1 or 2 state + a simple transition. I want to fully understand how it works so I can make proper use of it. You overlooked my super cool power armor avatar? Pffff
  20. Nobody knows about it, I actually I expected that
  21. How does it work? The only explanation that can be found is: https://github.com/MinecraftForge/MinecraftForge/blob/1.10.x/src/test/java/net/minecraftforge/debug/ModelAnimationDebug.java And there is also a grammar definition, but that is not really enough to understand how it works, since no function/parameter is documented. Has someone managed how to use it? What can it do, what can't be done? How to use it for Items? What exactly is a clip, a state and a transition?.
  22. Aren't the break effects created from the Block texture? Have you tried giving the block a fully transparent texture?
  23. In that case you don't need to bind it to the model, but tell openGL what texture to use. I'm not sure for 1.9, since, but try: manager.renderEngine.bindTexture(ResourceLocation); Maybe you need to bind back the blockstexture afterwards, If you get wrong textures on everything you must do it ;-).
  24. This is a wrong texture, you must bind the texture your custom model should use before you call model.render.
  • Create New...

Important Information

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