Jump to content

Jackiecrazy

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by Jackiecrazy

  1. I am creating an in-game GUI that contains several lists. Elements from these lists occasionally flow out of the list box as I simply implemented `AbstractList` from forge itself, which does not support rendering half an entry button by default. All other implementations of lists in forge use a dirt background to cover up the overflow, but I would prefer to not add a dirt background to an in-game function. I know how to only render half the selection button, but cannot figure out how to render the top or bottom portions of a string as necessary. Is this possible?
  2. I am creating a feature where upon switching to any item marked by code to be part of a "kit", the offhand will be replaced by whichever item was equipped when the kit item was last unequipped. Upon doing so in practice, however, the kit item is never saved. Switching to the kit item will clear the offhand, and when unequipped whatever you were holding before will come back as expected. Upon investigation with the debugger, any tag set in the event for the original stack will vanish by the end, but the call chain appears to pass by reference and never copies the itemstack. I could perhaps do it with a capability, but that would necessitate applying the capability to all potential kit items (i.e. everything), causing issues with mods that require items without capabilities in their recipes. I am unsure how to go around this. Current code, CombatData.getCap(elb).get(set)TempItemStack work as expected: @SubscribeEvent public static void kitUp(LivingEquipmentChangeEvent e) { if (e.getSlot() == EquipmentSlotType.MAINHAND) { ItemStack from = e.getFrom(), to = e.getTo(); final LivingEntity le = e.getEntityLiving(); if (GeneralUtils.isKitMain(from)) { //interesting, it's being written, then removed immediately. e.getFrom().getOrCreateTag().put("kitItem", le.getHeldItemOffhand().write(new CompoundNBT())); le.setHeldItem(Hand.OFF_HAND, CombatData.getCap(le).getTempItemStack()); } if (GeneralUtils.isKitMain(to)) { CombatData.getCap(le).setTempItemStack(le.getHeldItemOffhand()); ItemStack replace= ItemStack.read(to.getOrCreateTag().getCompound("kitItem")); le.setHeldItem(Hand.OFF_HAND, replace); } } }
  3. Deleted. Now the project won't load at all. Intellij is permanently stuck on import. EDIT: after deleting the project (again) and re-importing with VPN enabled, it tells me that Invalid patcher dependency: net.minecraftforge:forge:1.14.4-28.0.40:userdev and that I need an android SDK. Why would that be the case? In any case, after burning through 500MB of my 5GB data, I managed to get a functional workspace (no more smurf naming conventions...), though it keeps telling me "Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly". When I click "try again", it asks for an android SDK...
  4. Bump. I really need help with this, as I have to update to 1.14. Updated main post with relevant logs.
  5. I do use OpenJDK 1.8.0.222 (latest), but it doesn't seem to solve the problem. I still encounter the ZipException trying to import the gradle project.
  6. no, the prescribed steps did not work. I quite desperately require assistance on this matter. Below are the JDK I have used: 1.8.0.222 AdoptOpenJDK 1.8.0.212 bundled JDK 1.8.0.121 1.8.0.45 Unfortunately I cannot download 1.8.0.221 to replicate that step. Something about Oracle accounts. I guess I'll revert to 1.12.2 for the time being.
  7. Alright, I finally managed to convince gradle to spit out useful logs. It is as follows: I'm not sure how to solve this.
  8. I tried it twice, once by importing the project folder and once by opening the build.gradle as the docs instructed me to. IntelliJ did not handle it in either case, forge is still unable to be resolved and loading the example project shows that forge is not imported as a library.
  9. I did. The fresh 1.14 MDK also has no setupDecompWorkspace, and it's still unable to resolve the forge dependency.
  10. As the title may suggest, I'm updating from 1.12 and have been told to use genIntellijRuns. I did so, and it ended without problems, but after that the external libraries folder only includes JDK 1.8. The gradle page on IntelliJ IDEA shows me that gradle is "unable to resolve net.minecraftforge:forge:1.14.4-28.0.24_mapped_snapshot_20190719-1.14.3". This happens even when I wipe my workspace and start over. Looking at the forge tutorial on readthedocs I cannot find a setupDecompWorkspace, or even a forgegradle task group, in 1.14 gradle. What must be done? EDIT: I found this as a log after attempting to re-import the project with OpenJDK 1.8.0_222: Reloading the project after deleting .gradle as suggested by some topics here leads to this:
  11. I have a custom modeled sword, but in hand it holds not like a sword but like an apple (i.e. it's not rotated). Since I'm not good with the handleperspective part of a custom model yet, is there a way to use item/handheld rather than item/generated when using event.getRegistry().put() to "register" the new model? If not, what are the transforms that item/handheld uses to make the held item face forward, since I've dug for it in the workspace but can't seem to find it? Link to relevant github page here, and thanks in advance.
  12. Yes they do. I figured it out. BakedItemModel only returns quads when the side is null, for whatever reason, so I passed null and now it works. Can anyone tell me why it's designed like that? Also, I'm having a bit of difficulty scaling and translating bakedQuads with this, is there another way, perhaps?
  13. Bump. I've been trying to figure this out for the last week or two and it's the last hurdle I need to get over, help would be highly appreciated. After some debugging I note that getQuads(state,side,rand) always assumes that side is null, even when I forcibly pass EnumFacing.DOWN to the function. Why would that happen?
  14. As the title may suggest, using said method yields a BakedItemModel that has a texture index but no quads, so I cannot combine item models since, well, they don't have quads for me to combine. The most quizzical things that arise from this are: It worked before. I did this once, then had to change the config structure a bit to use item NBT instead and now it's broken -.- The individual items render fine, it's the combination that doesn't work. In fact, I tried to just retrieve the IBakedModel of a rabbit foot and that also has no quads according to both getItemModelOverrides and getItemModelMesher().getItemModel, which I find somewhat odd since the foot most definitely has a list of quads. I poked around in the RenderItem classes but they seem to do the exact same thing when retrieving models with no problems, my code is below: What exactly is wrong?
  15. Yes, I am fully aware of the fact that they do not exist; I am opening it up for resource pack makers to add them if they wish. My question still stands, is it possible to suppress these warnings so users don't freak out over nothing, or do I have to make at least (since users can define their own materials in the config as well) 2112 virtually identical json files/blockstate handling cases?
  16. I have a system where there are "parts" made of different types of materials. Currently rendering is handled such that each part has a model, which then gets coloured with the IItemColor registration. I'm now trying to make it so that types support different models for different materials so resource pack creators can add flairs to certain material-part combinations (e.g. a bone scythe head would have a skull drawn on, a netherrack blade has flame effects, etc.), so now I took to registering every possible material+part variant with ModelBakery.registerItemVariants. The problem is, now that all the material-part combinations are registered, Minecraft tries to load all of them and, since there isn't a json for every variation, throws up lots of missingvariantexceptions even if the parts render perfectly fine (there's a default case) in game. Is there a way to suppress all of these errors? I presume ModelRegistryEvent is only ever called once? If not, I could probably register different item variants per call, but it doesn't seem to be the case, and I would rather not create 2000 json files that all say the same thing. Registry code: Console: To hijack my own thread a bit, is it possible to rotate, translate or scale baked models? After creating parts the player can then use them to create weapons. However, some scaling and translating is required as a shaft is longer than a short handle. Is there some way to translate quads before adding them to the list of quads to be rendered? And is there a way to make the held item larger than in inventory? model combination code:
×
×
  • Create New...

Important Information

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