Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Cadiboo

  1. Please mark it as solved and post your solution for people in the future
  2. Double click the line-number on the line you want to break on, a blue dot should appear. Run the program _in debug mode_ and when the program reaches that line it will pause and Eclipse will ask you if you want to open the debug perspective. Click yes (you can switch back to the default java perspective in the top right later) and you will be able to see the call stack and the values of all your fields and more.
  3. Those methods are called to create the slots on the screen when the GUI is created. If your trying to find what called those methods use the debugger. What IDE are you using?
  4. This? This is your code that you posted. Can you clarify what you mean by request?
  5. Don’t use IHasModel, All items need a model and nothing that is needed to register models is private
  6. Try reloading the file or restarting eclipse.
  7. Look at the horse class (the abstract one should have the code you want), neither the pig or boat really move - the pig follows the carrot on a stick and the boat appears to literally use the paddles for control (+1 for realism Mojang) which makes it a little useless for your task (if I didn’t read the code wrong and they really are using the paddles). You could also take a look at the minecart class, but there’s lots and lots of track logic.
  8. The models are just JSON (JavaScript Object Notation) files. If you don’t understand JSON just google it. It’s a (semi-) efficient way to save objects to (and load objects from) files. What do you mean by this? You can’t open the files? You can locate the files? You can locate your Minecraft folder? If you need help finding the files look at https://help.mojang.com/customer/portal/articles/1480874-where-are-minecraft-files-stored-,it would also be helpful to know what operating system you are on as the way to find them depends on your operating system? I recommend using BlockBench to create the models and then tweak them as needed in the json files (changing texture locations i.e. resource domains). BlockBench can run in, and works well in, your browser - though it works best if you download it.
  9. Thanks for using Gist! This might not be related to your issue, but try disabling Tinkers Construct & Gravestone. If that doesn't help you could also try disabling MoCreatures and/or Optifine.
  10. Use NBT in the crafting recipe. http://mapmaking.fr/give1.12/ https://crafting.thedestruc7i0n.ca/
  11. How dynamic is your block? Does it need a TESR or can it be rendered with a custom baked model? If it can be rendered with a custom model, do it this way for the block first, then work on the item model.
  12. I have, I even tried always returning false, it didn't help. I still didn't get the pulling animation & the server continued to shoot after the client stopped. https://github.com/Cadiboo/WIPTechAlpha/blob/9304a1745aec48891841a0d9d8703a01cda72ca3/src/main/java/cadiboo/wiptech/item/ItemHandheldGun.java#L309-L333
  13. Basically, I don't know why its causing an error, but it is. As I said, if I stop the capability's NBT being written to the ItemStack I stop getting any problems. This works fine for the circuit control capability as it doesn't really need to be synced, but an Ammo capability will definitely need to be synced. Forgetting ammo entirely, my gun uses energy so that will need to be synced.
  14. The first capability (list of attachments) is used for animation, control and pretty much everything. The second capability (Circuit control) is only used to control when the gun can fire (burst mode, auto mode, semi-auto mode) and _should_ remain the same on the server & client without syncing. I've removed syncing for the Circuit control capability and everything works perfectly, but if I plan to do stuff with capability based ammo (which I do), I'm going to need to solve this.
  15. No, all items need you to register their models in code.
  16. do you mean a Missing Model? did you register a model for your item (in your code)?
  17. the model is created upside down because of how texture coordinates (U V) work - and how its easier to work with them upside down. Then it is (should be) rendered upside down. Please be more specific when you say somethings wrong. can you provide screenshots please? I don't understand what you mean
  18. I've got the same problem as Daniel336Cobra in this thread I've got an Item (a gun) with a capability storing a list of ItemStacks (attachments - scopes, circuits, etc.). My circuit in that capability is an ItemStack that has another (different) capability that controls how often the gun should fire. Every time the gun is shot (in onUsingTick) a counter in my circuit's capability is incremented. This counter is reset in onPlayerStoppedUsing. Both capabilities are stored in the Gun's NBT and it seems that because of this when I'm using the gun the item stack is constantly updating and animations don't get applied successfully. ALSO when I stop using the gun on the client usually the server isn't made aware of this and keeps shooting. My problem is that the server keeps shooting when the client has stopped. I believe it's the capability because when I comment out line 149 the animations & server/client shooting work fine (except obviously without the control provided by the capability). This makes it seem like the solution is not to sync (write NBT to the item stack) the capability & just hope they remain the same client/server. My code - https://github.com/Cadiboo/WIPTechAlpha/blob/9304a1745aec48891841a0d9d8703a01cda72ca3/src/main/java/cadiboo/wiptech/item/ItemHandheldGun.java#L74-L192 and a couple videos to illustrate https://streamable.com/rv9c0 https://streamable.com/o4dq6 The relevant part of my debug log - https://gist.github.com/Cadiboo/1db00e79ccd6e6a644b9670990e93cec
  19. Double post
  20. Ok, I'm updating my code to use the default methods, how should I send a client->server update?
  21. I was trying to avoid using a sync request. I've always used custom packets because I couldn't figure out the default sync methods when I first started modding, could you give me some examples of people using them?
  22. don't do this, use the latest version - models haven't changed much at their base since 1.8.9 and your probably going to be getting a similar error with less people willing to help
  23. I'm sending a sync packet in my TileEntity.onLoad method and its getting to the client before the tile entity is created on the client, is there any way to delay sending the packet or send the packet after the tile entity exists on the client? my code: https://github.com/Cadiboo/WIPTechAlpha/blob/d38b6f136293df8cbb606f1781f1d4b56c0c698d/src/main/java/cadiboo/wiptech/tileentity/TileEntityPeripheral.java#L84-L88
×
×
  • Create New...

Important Information

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