-
Posts
3624 -
Joined
-
Last visited
-
Days Won
58
Everything posted by Cadiboo
-
[1.12.2] Syncing Energy Capability on ItemStacks
Cadiboo replied to Cadiboo's topic in Modder Support
Yeah in the player inventory What I’m trying to do: Sync the energy to the client to display it inside the durability bar. I also don’t want this sync to trigger a re-equip animation OR to stop the ItemStack from being used (the way a bow is used). What I assume I have to do: Override getShareTag and shouldCauseReequipAnimation (and something else I think as these two aren’t enough to allow the time to continue being used). -
Please observe java conventions. (Packages must be lowercase, classes must be CamelCase) I.E. Entities->entity and bananabunch -> BlockBananaBunch You should remove your SoundType parameter from your bananabunch block, you never use, pass it in as null & it will also crash a dedicated server as (I think) SoundTypes don’t exist there. Your not registering an ItemBlock for your bananabunch block your registry names should be in snake_case format (bananabunch->banana_bunch & rainbowwater->rainbow_water) Well done for using @ObjectHolder and registry events!!
-
Why doesn’t Forge use the JRE shipped with Minecraft?
Cadiboo replied to Cadiboo's topic in Modder Support
On Mac (at least in my experience) new Java versions don’t physically delete or uninstall previous versions, they just change JAVA_HOME and other variables to the new installation, and leave the old installations alone in the JavaVirtualMachines folder. Removing the new installation (& setting JAVA_HOME to the old installation) seems to revert the update. -
It appears that you’ve maxed out the amount of IDs you can have, you need to use fewer mods.
-
What I said about only taking 10 mins was refactoring your @Mod annotation I’ll break down the times (that I think it would take, from my Modding experience): Refactoring @Mod annotation to META.INF file: 5-10 minutes (5 mins for basic mods, 10 mins for mods with dependencies) Rewriting .lang to .json: 5 mins (10 mins if you do it all by hand, 2 mins if you use a tool to do it, 15 secs if your already prepared for it) Flattening & removing getStateFromMeta & getMetaFromState: about 10 mins per block (5min for simple blocks with variants stored in meta, 10 mins for blocks with multiple types & variants stored in meta, already done ✅ if you prepared for it) Changing OreDictionary to the Tag System: about 2 minutes per OreDictionary entry Updating texture references (“/blocks/“ to “/block/“): 5 mins (15 seconds for a well written mod, 5min for a badly written one, 15min for a horribly written one) Updating model variants (“normal” to “”): 10 mins (15sec for a well written mod, 10 for a badly written one, 15 for a horribly written one) Moving data from /assets/ to /data/: 1min Rewriting mod functionality: between 0 and infinite minutes, it depends 100% on what the mod did - some devs may not have to do anything, some may have so much work that they give up and never work on the mod again. Some mods may also not be necessary anymore. I’ve prepared for 1.13 in my mod, and it should take me less that half an hour to fully update it for 1.12.2 to 1.13, every other Modder should be (and most are) preparing the same way. ALL THESE NUMBERS ARE ESTIMATES BASED ON EXPERIENCE AND VERY FEW ACTUAL FACTS! As Lex said
-
Try removing CXLibraryCore (its for 1.12.1 not 1.12.2) ShetiPhian-ASM (its for 1.12.0 not 1.12.2) Elulib (it appears to be for 1.12 not 1.12.2) Edit: apparently your crash is because of NotEnoughIDs
-
Looks like a problem with SimpleGenerators, try removing it (if that fixes it report the issue to the author)
-
Try removing ForgeRelocation (it doesn’t seem say what version it was written for) CodeChicken (it’s for 1.12, not for 1.12.2) EluLib (its for 1.12, not 1.12.2) Chisel (Chisel seems to break and break everything easily) FoamFix (They know that they have low compatibility, and would be telling you about it if you were using the normal Minecraft launcher)
-
Seems to be a problem with SimpleGenerators, try removing it. If removing it fixes the problem, report it to the mod author
-
Thanks so much, this is very very helpful! Could you explain this a little more? I assume it basically checks if the mod is loaded (and returns null if it isn’t), but I don’t see how or understand the naming Regarding loading/initialising, I’ve seen in the Forge code somewhere that they use Sun’s classloading methods to (I think) “load” pretty much every class without initialising or actually loading it.
-
All good, sorry for being a bit condescending, I didn’t realise there was a language barrier
-
All good, I was pretty confused aha. Thanks for what you’ve done so far, but can you please
-
Wait, Not sure I understand, (basic java) will this code load the class (I always assumed it would)? if(false){ loadClass() } Cause if it will never load the class, then half the problems solved. However, could you provide an example of how this code would be written if the capability doesn’t exist? //inside tile entity update method for(facing : EnumFacing.VALUES) { pos.offset(facing).getTile....getCapability(CapabilityEnergy.ENERGY)....transferEnergyTo(); // this should always work (let’s assume that there is a tile at the pos and bag this tile has the capability) pos.offset(facing).getTile....getCapability(CapabilityTeslaEnergy.TESLA_ENERGY)....transferEnergyTo(); // how should this code be written? }
-
Thanks! Though that’s not quite what I meant, can you download GitHub Desktop (or something) and put your entire code up there? Your repository should be from your mods root directory (the place that the src, build, run and gradle folders are). This allows syntax highlighting, viewing where methods get called in other files and some other stuff. From what you’ve posted I can see that - You need to annotate your Pedestal Class with @Mod.EventBusSubscriber - put you List “all” RIGHT BELOW “event.setCancelled(true);” - remove the try/catch block completely - remove “blockstate.addCollisionBoxToList” from your event subscriber. You’ve mutilated the code enough that it doesn’t even start to do what it should with that call. I can’t read Spanish at all well, PLEASE PLEASE PLEASE post your entire repository. Honestly WTF, your code is half Spanish half English, and some of the variable names switch between languages as the code goes on. Does this even compile?????? It shouldn’t. It really really really shouldn’t.
-
I have absolutely no clue why it isn’t working (or what your code even is) because of the reasons I mentioned before. Please make a GitHub repository. Every Programmer/Coder/Modder I’ve ever seen/heard of/met before has one (Here’s mine). Its free and it allows us to help you. Without it we honestly pretty much can’t help. (We can help a very very very tiny bit without it)
-
So I can’t do something like getCapabilityIfExists(CapabilityWhatever.WHATEVER). (Obviously) Can I do something like Capability<> potentialCapability = CapabilityRegistry.getCapability(ResourceLocation CapabilityID); if(potentialCapability!=null){ Object actualCapability = world/entity/tileEntity/player.getCapability(potentialCapability); } ...while writing that out I realised how useless having an Object that you can’t cast would be (I guess you could use reflection to find methods & invoke them) All this looks like the answer is StringlyTyped code & a bunch of reflection. How would I use it then? (And more importantly how would I avoid loading it) How would I do something like WhateverCapability capabilityInstance = getWhateverCapabilityIfItExists() when I can’t a) import WhateverCapability (it will crash if it doesn’t exist) b) make a variable of type WhateverCapability (same reason as a) c) invoke getWhateverCapabilityIfItExists (Loading the class with crash if it doesn’t exist)
-
It’s free and allows you to do version control (if u accidentally delete something/ mess something up you can restore it) and it allows us to view and help you with your code. I wanted you to remove it so any errors that happen are silently caught and discarded (the code that it came from wanted all the errors to disappear).
-
I can’t properly read this because I’m not used to reading MultiMC logs (the usual crash report generated by Forge & Minecraft isn’t there), but I think you should start by disabling - Chisel (Chisel is known to be broken) - BetterFPS - Quark - EnderCore If the problem persists please post the debug log (as described in my signature) when you use the normal Minecraft launcher.
-
Please post your logs in a spoiler (click the eye icon when posting) or as a GitHub Gist or using PasteBin
-
This should be in a seperate EventSubscribing class or, if you want to ignore convention (as you already are in many other parts of your code), annotate your pedestal class (it should be called BlockPedestal) with “@Mod.EventBusSubscriber”. Delete this. Your going to want to see any exceptions that pop up Do you know Java? If not you’ve done remarkably well so far, but you still need to learn it before you continue with modding. The important part of this is “as a GitHub Repository”
-
[1.12.2] A bunch of questions about Forge’s Render Pipeline
Cadiboo posted a topic in Modder Support
This is a bit of a continuation of this thread, but isn’t not the exact same subject so I’ve started a new thread. My have a bunch of problems to do with rendering, lighting & code practice: 1) I’ve been told that I should be using Forges Render Pipeline instead of the BufferBuilder directly 2) I can’t figure out how (efficiently/properly) to do lighting in my rendering 3) I don’t know to do smooth (ambient occlusion) rendering So I’m asking the following questions (numbered relating to the problem the address) 1,2,3) How does Forges Render Pipeline work? 3) How can I create my own baked quads (on the fly)? (So that I can pass them to the Pipeline and have all the smooth rendering taken care of) 1) How can I create & render custom shapes using the Pipeline? Anybody feel free to answer any part of any question or just post any information you think is (even slightly) relevant. I can’t find any information anywhere about this. -
Can you please post your code as a GitHub repository so that we can help you? It’s very hard to help when we only have (parts of!) your code from a while hours ago which I assume you have modified plenty since you posted it. From what I see (the selected box seems blacker than usual) the selection box seems to be rendering twice which is a good start to build on - It seems to me that this means you subscribed to the drawBox event properly but may not be getting the box(es) you want to draw properly (or I messed something up in the code I gave you)
-
What’s not working?
-
Exactly what I was looking for, however how would I use it specifically with capabilities? (Its @Optional.Method seems to be the way to go, but I can’t think of how, Also it seems to have been made before capabilities were with the @Optional.Interface)