-
Posts
3624 -
Joined
-
Last visited
-
Days Won
58
Everything posted by Cadiboo
-
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.
-
[1.12.2][Solved]Forge Custom entity nbt resets after player is killed
Cadiboo replied to WOTBLITZ's topic in Modder Support
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 -
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
-
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)); }
-
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"
-
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)
-
That is not enough, read the documentation on capabilities here.
-
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; } } //... }
-
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
-
define doesn't work
-
have you looked at container#detectAndSendChanges()?
-
did you try stack.isEmpty()? how well do you know java?
-
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
-
How do I create custom loot tables for vanilla mobs? 1.12.2
Cadiboo replied to M1st3rMinecraft's topic in Modder Support
Or wait for 1.13 data packs -
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
-
[Solved] Attribute Not Removed When Armor is Removed
Cadiboo replied to Lumby's topic in Modder Support
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 -
[Solved] Attribute Not Removed When Armor is Removed
Cadiboo replied to Lumby's topic in Modder Support
Try using onArmorTick (or similar) to check if you have the full set and apply the effect -
[SOLVED] ItemBlock with custom java armor model
Cadiboo replied to hiotewdew's topic in Modder Support
No forge registry requires you to have an item be an ItemBlock -
[SOLVED] ItemBlock with custom java armor model
Cadiboo replied to hiotewdew's topic in Modder Support
You could copy most of the code from ItemBlock and put it into your ItemArmor class -
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.
-
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)