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

TrashCaster

Members
  • Posts

    115
  • Joined

  • Last visited

Converted

  • Gender
    Male

TrashCaster's Achievements

Creeper Killer

Creeper Killer (4/8)

8

Reputation

  1. What I did for my sledge hammer in a previous mod was to make the texture double resolution, so I had more drawing space to make the item longer. Then for the scale, I doubled the values (except for I think Z, so your depth doesn't scale up). So basically, your model scale should be Obviously the equations won't parse, so do them yourself and fill in the values. Resolution X and Y are the dimensions of your texture. Keep them square values (16,32,64), or else you could get distortion or texture and/or runtime errors.
  2. What is your end goal? To apply power, without placing a power block, basically to forcibly turn on redstone dust?
  3. Why don't you make it use player data (using IExtendedProperties, or PlayerCapabilities), and then use a LayerRenderer to render it. The item layer renderer would be a starting point. Then make it render a chicken model instead of an item model. I suppose you could also accomplish this by making a unique entity, keep it "invisible", where the entity itself doesn't render, then with a layer renderer, check that the entity is riding the player (simple way to keep it at the player's location all the time, and track when you have a chicken), and render in hand with the above method. That's just me thinking about how to re-use existing approaches, to save you a ton of time getting the math. I don't have the documentation and code out in front of me, so I'm not going to be of any help with the actual code, but I figure pointing you in the general direction, and you digging around ought to suffice. Good luck.
  4. Like the title says. If you give yourself an item, it counts as if you tossed it, and there is no way to test that it is from a give command, since setOwner isn't called in time. I've noticed that the event fires from "dropPlayerItemWithRandomChoice", and the boolean parameter is "unused". Perhaps it could be used to signify it should have an owner?
  5. If you drop an item from your inventory by means of dropping it out of the window, or pressing your drop key on the moused over slot, the dropped item entity (EntityItem) doesn't set the thrower. If this is considered not a bug, and it's working as intended, then consider this a suggestion.
  6. Ok, I have solved this. I actually had the inventory loading from item every update, which caused the duping. I had originally done this to ensure it was getting loaded (cause when I dropped it on the ground, the inventory was always empty), and forgot to remove it when that didn't resolve it. It now applies the inventory to the entity from the itemstack tag when I drop it, and that fixed all of it. Thanks again for the time anyone took to read/reply to this. Mods, you can close this
  7. No, no, that's not the problem. That's how it is supposed to function. They share the same pointer. The problem has to be somewhere in the saving/loading of the inventory. I just can't put my thumb on where.
  8. Well of course it's not rendering, you haven't written the rendering code! Sarcasm aside, nobody is going to be able to help you without you showing what code you have written.
  9. I don't mean to prematurely bump this, but if there's anyone who can point me in the right direction, that'd be swell.
  10. I would suggest grabbing a new MDK, just to be safe, and be sure there are no bad files lingering that would cause it. You can copy your project source out to the new MDK source, and run the usual steps. Granted, this doesn't really "solve the problem", but it does shoot past it.
  11. Alright, so I added some backpacks to my mod. The backpacks are entities with items stored in NBT, which hold the inventory. When you throw the back pack from your inventory, it creates a backpack entity instead. Right clicking opens the backpack, punching gives you back the item, etc, etc. My problem is that after throwing an item into it, and moving the item, it dupes instead. Everything else is working as I need it (or so I believe). This has been solved. Sorry.
  12. Alright, so I've utilized some of your code, Choonster, to make sure that I'm doing it right, however I still can't get it to work. Here's my GitHub: https://github.com/TrashCaster/BroadAdditionsMod/ It's a bit messy, sorry. I tried to keep it relatively clean and easy to find things. Packaging is similar to the vanilla packaging.
  13. Unfortunately, the only way you'll be able to utilize direct calls is through means of overriding the default rendering system, which can mean conflicts. So if it really is necessary to tweak the base classes to do so, then go for it. But it's heavily discouraged by the Forge team, simply on the fact that it has a high chance of breaking when used with other mods. And actually, I've heard of people utilizing the getModel method in the item class to do direct GL calls. That's also discouraged do to the possibility to break, and may get patched. But that may be your easiest entry point for now. Good luck, and have fun.
  14. You can use the item model system to put use your item's texture, and then have an additional layer with an animated texture with the effect you want. It's really simple. Just look up the info for resource packs. Also, IItemRenderer didnt get "replaced". It got removed. SmartItemModel was added to give flexibility to the baked model system that Mojang added. It's not a replacement though.
×
×
  • Create New...

Important Information

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