Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Cadiboo

  1. Consider making a PR to forge or submitting a bug report to Minecraft. A PR probably won't be accepted because of how much work is being done because of 1.13 & forge doesn't like to (unnecessarily) tamper with Minecraft's code and submitting a bug report will probably go no-where because they have like 5 people, it works for them and they still have game-breaking bugs that haven't been fixed for many years to deal with. Of the two, I think a PR is the better option.
  2. If you want data to persist over deaths I think you want to subscribe to both the PlayerEvent.Clone event and the PlayerEvent.Respawn event In the PlayerEvent.Respawn event I think that theres some weirdness to do with you technically dying when returning from the end so watch out for that
  3. take a look at EntityPlayer#damageShield I think you should be able to make it take damage by just overriding Item#isShield() and returning true OR if you want to be a bit more accurate check if the EntityLivingBase passed in isn't null & check if they are blocking and return true if they are
  4. Blocks have their models loaded automagically by their block states. If you mean ItemBlocks private static final String DEFAULT_VARIANT = "normal" //inside model registry event for(Block block : myBlocksWithItemBlocks) { ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), DEFAULT_VARIANT)); } for(Item item : myItems) { ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), DEFAULT_VARIANT)); }
  5. Your modding for 1.10.2? switch to 1.12.2 Change "version" in your build.gradle file to "1.12.2-14.23.4.2705"
  6. Idk if its cause your using an outdated version, but you should update - we can only provide support for what we know about. With capabilities I believe you need - A class that handles the data and everything (it doesn't have anything related to the forge capability classes in it) that will probably implement INBTSerializable<NBTBase> (see https://github.com/Cadiboo/WIPTechAlpha/blob/9c2e50bc87a8c26cc5c19bc73f0f3c4987ff48f9/src/main/java/cadiboo/wiptech/capability/attachments/AttachmentList.java) - A class that has your @CapabilityInject and serialisation in it (see https://github.com/Cadiboo/WIPTechAlpha/blob/9c2e50bc87a8c26cc5c19bc73f0f3c4987ff48f9/src/main/java/cadiboo/wiptech/capability/attachments/CapabilityAttachmentList.java#L15-L35) - To register your capability in preInit (see https://github.com/Cadiboo/WIPTechAlpha/blob/9c2e50bc87a8c26cc5c19bc73f0f3c4987ff48f9/src/main/java/cadiboo/wiptech/WIPTech.java#L99)
  7. That is not enough, read the documentation on capabilities here.
  8. Excerpt from the actual net.minecraft.item.ItemStack.class package net.minecraft.item; //... public final class ItemStack implements net.minecraftforge.common.capabilities.ICapabilitySerializable<NBTTagCompound> { public static final ItemStack EMPTY = new ItemStack((Item)null); //... //... public ItemStack(Item itemIn, int amount) { this(itemIn, amount, 0); } //... public boolean isEmpty() { if (this == EMPTY) { return true; } else if (this.getItemRaw() != null && this.getItemRaw() != Items.AIR) { if (this.stackSize <= 0) { return true; } else { return this.itemDamage < -32768 || this.itemDamage > 65535; } } else { return true; } } //... }
  9. what do you mean undefined? do you mean null? Undefined doesn't exist in Java as far as I know it only exists in JavaScript. What do you mean by not working
  10. define doesn't work
  11. have you looked at container#detectAndSendChanges()?
  12. did you try stack.isEmpty()? how well do you know java?
  13. Please clean up your GitHub - Why do you have a folder called 1.12.2? thats what branches are for. - Why do you have a .gradle folder? - Why do you have a .idea folder? - WHY do you have a classes folder? - WHY do you have a build folder? - and WHY do you have a run folder? Why would anyone need your saves to compile your code? Your code... I'm screaming in pain - why do you have a new class for every single colour of glass, pass an enum into the constructor PLEASE - don't use IHasModel: - don't use a BlockBase class: - I highly doubt you own diamondminer88.com take a look at https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html TL;DR - YOUR ACTUAL PROBLEM did you put any special variants in your block state? https://github.com/DiamondMiner88/Character-Mod/blob/master/1.12.2/CharacterMod/src/main/resources/assets/character_mod/blockstates/a_glass_light_blue.json No, so why would you expect them to exist? take a look at https://github.com/Cadiboo/WIPTechAlpha/blob/9c2e50bc87a8c26cc5c19bc73f0f3c4987ff48f9/src/main/resources/assets/wiptech/blockstates/aluminium_ingot.json
  14. Or wait for 1.13 data packs
  15. try using a constant for the tag name, first checking if the tag exists before setting your variable and please post your code as a github repository
  16. Don't follow youtube tutorials basically. https://en.wikipedia.org/wiki/Cargo_cult_programming Basically just copy and pasting code without really thinking about why your doing it, if theres a better way or if its even needed at all
  17. Try using onArmorTick (or similar) to check if you have the full set and apply the effect
  18. No forge registry requires you to have an item be an ItemBlock
  19. You could copy most of the code from ItemBlock and put it into your ItemArmor class
  20. Personally I think the main problem is lack of Mojang's proper support for mods. If it was easy to port mods between versions, and Mojang made any of their code with modding in mind, I think that people would be much more receptive to updating to - and using the newest version. This is why lots of people are still using 1.7, the changes between 1.7.10 and 1.8 were massive for any even slightly advanced mods. The amount of work that had to be done to port the 1.7 mods to 1.8 was so much that many modders gave up and stopped modding altogether. (Most of) This could all be solved if Mojang gave us a Modding API, as Forge is just a bunch of (very good) bandaids covering a wound that has existed for almost a decade now. 1.9's changes to combat saw many people stay in 1.8, even though there are (now) mods out there that allow players to use the old combat system.
  21. If it works I'm guessing it's ok, no idea if its the recommended method of getting it to work though. Yes please, that would be appreciated
  22. Sorry, here it is https://github.com/MinecraftForge/ForgeGradle/tree/FG_3.0 and heres a post by Lex
  23. Oh and another thing I don't want to just change the graphics I also want to make the all the blocks (collision at least) bounding boxes change with the terrain, but this should be much easier than the graphics. (Once I've learned the ASM I'll need to edit wherever block#addCollsionBoundingBoxesToList is called)
  24. post your new crash log (the entire debug log this time please) as described in my signature (the text below each of my posts)
×
×
  • Create New...

Important Information

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