-
Posts
178 -
Joined
-
Last visited
-
Days Won
2
Everything posted by TheMasterGabriel
-
You can always look at the docs as well, if they're more your style.
-
So I tried it on my computer and I got the same error. If I recall from some VS experience, I'm pretty sure it asks you to normalize line endings at some point? So back to my original hypothesis, there are text artifacts that the MC JSON reader doesn't like. I minified (http://www.cleancss.com/json-minify/) your block state file and that seemed to work, so try that. I also suggest using some other text editor to see if that makes a difference.
-
A Git repo would be useful. What text editor are you using? However unlikely, I've had problems with certain editors leaving weird artifacts that it doesn't see but other programs might. (Although JSLint should have spotted them)
-
If cleaning the cache didn't do anything, there is no harm in trying I guess.
-
I've never seen that problem before. It might be worth cleaning the cache via 'gradlew clean', and then re-running 'gradlew setupDecompWorkspace' to see if that fixes the problem.
-
Can you run Minecraft normally? I ask because it looks like it's an unresolved MC problem as well (MC-75309).
-
Where is the MowzieModelRenderer found in llibrary?
TheMasterGabriel replied to TheRPGAdventurer's topic in Modder Support
Which you installed right? That class does not come packaged with Forge. If you want to reference external code, you need to add the libraries yourself. -
Where is the MowzieModelRenderer found in llibrary?
TheMasterGabriel replied to TheRPGAdventurer's topic in Modder Support
I've never heard of that before, but you probably imported the library incorrectly. What exactly did you do? If it's a downloadable library, the easiest thing to do would be to make a folder called 'libs' in the same folder as your build.gradle script, put the library into that folder, and rerun 'gradlew setupDecompWorkspace. If you use Eclipse, also run the eclipse task. Not sure about IntelliJ. -
Yes, I asked if inherited methods have the same obfuscated name. It would probably wreak havoc if the other was the case. I asked about IBlockAccess and World because World overrides getTileEntity from IBlockAccess.
-
Yes, I figured as much. I was fairly certain too, but I just wanted to check that 1% of doubt I had.
-
Hi, I just had a question about obfuscation. When the classes are obfuscated, do inherited methods obfuscate to the same name? For example, would IBlockAccess#getTileEntity have the same obfuscated name as World#getTileEntity?
-
[1.11] Smoothing Entity Movement
TheMasterGabriel replied to BeardlessBrady's topic in Modder Support
Where you register your entity, you should probably register it so that it sends velocity updates. -
Hi, I was wondering if it is possible to use another block's blockstate (and model) jsons for a custom block. For example, say I make a custom dirt block that shares exactly the same properties as vanilla dirt. If I want them to look exactly the same, can I register my custom dirt block with the same mapper of vanilla dirt? If so, how? I tried looking at custom state mappers, but I'm a bit unsure how to do it or that's the right path.
-
Your solution is actually probably better than using hardcoded keycodes. Keys on different keyboard layouts can share keycodes despite actually being different characters (MC-7255). If you use the user input to tell you which keycode is what character, you will probably avoid some cross-layout problems.
-
Searching OreDictionary for specific prefixes
TheMasterGabriel replied to blupilot's topic in Modder Support
You can check if an ore dictionary name has been registered via OreDictionary#doesOreNameExist -
I meant the actual method that does the logic when the event is fired. In your case, onTickEvent needs to have the annotation. WorldTickEvent is fired 20 times a second, but you can just use a modulus operator with the world time to limit how often your code is run. Animation#getWorldTime will return the current world time in seconds.
-
Every method that subscribes to an event needs to be annotated with @SubscribeEvent. Also, you no longer have to register your event handler on the two buses. They've been merged. Just register it to MinecraftForge.EVENT_BUS. You should also probably register it in preInit or Init, not postInit. Depending on some events, registering it at different initialization phases can mean the event is fired before your listener is registered to receive it. Also, do not register to TickEvent directly. Register to one of its subevents instead (ServerTickEvent, ClientTickEvent, WorldTickEvent, PlayerTickEvent, RenderTickEvent)
-
Mod Loading Order/Creating Blocks at Runtime
TheMasterGabriel replied to TheMasterGabriel's topic in Modder Support
Alright, I think I found the problem. It looks like ModelFluid and BakedFluid are only compatible with Forge's fluid system. They require IExtendedBlockStates, which Forge's fluid have but the vanilla ones do not. When Forge's fluid model doesn't have an IExtendedBlockState (ModelFluid#bake is hardcoded to pass null), it just returns the "inventory" model (which is probably used for Forge's universal bucket). The reason my block was invisible was because that quad list was supposed to be rendered in the inventory, not in the world. (The returned list only has 1 quad, as oppose to the 6 it should have). If I can't find an alternative, I might end up having to write my own baked model for vanilla liquids (or any modded fluid that isn't made with the Forge stuff). -
Mod Loading Order/Creating Blocks at Runtime
TheMasterGabriel replied to TheMasterGabriel's topic in Modder Support
Alright, I tried to no avail. It's strange, however. It looks like all the baking is done, as I tried it with a print statement and it ran. However, the block is still invisible. Here is a pastebin link to my code if you have any idea what I'm doing wrong/not understanding. Also, is it possible to make it so that the breaking texture for my block is copied as well? Currently, the breaking texture is just the missing texture. -
Mod Loading Order/Creating Blocks at Runtime
TheMasterGabriel replied to TheMasterGabriel's topic in Modder Support
So I only need to do all the IModel baking stuff for Water and Lava? If so: -
Mod Loading Order/Creating Blocks at Runtime
TheMasterGabriel replied to TheMasterGabriel's topic in Modder Support
I'm still trying to figure out how to make my block look like the block it is supposed to be copying. As of now, everything but fluids render correctly. I was just wondering if I could fetch a fluid model as easily as I can fetch the model for an ordinary block. So I'm doing this within my block model's getQuads method? If yes, where do I get the parameters for the method. If not, then where. Also, I wouldn't think I needed to create a new ModelFluid instance when I wanted to render my block. Do I have to manually cache them, or is there a list somewhere already? The same applies for BakedFluid (are they cached somewhere where I can access them?). -
Mod Loading Order/Creating Blocks at Runtime
TheMasterGabriel replied to TheMasterGabriel's topic in Modder Support
Well yes, but are they not cached somewhere? I figured that they are treated as any other model and baked on startup. -
Mod Loading Order/Creating Blocks at Runtime
TheMasterGabriel replied to TheMasterGabriel's topic in Modder Support
Is there an actual Liquid model that I can get a list of quads from? All I can seem to find is Vanilla's BlockFluidRenderer. I see that Forge adds ModelFluid, but I'm not sure how to fetch the baked model. I hadn't thought about that. Yes, I agree. I'll have to work that into it as well. -
[1.11] Get a list of all tile entities registered
TheMasterGabriel replied to a topic in Modder Support
I haven't done much with making my own APIs for my mods, but here are some random ideas: - You could make an empty interface that you would require mods using your API to use. In the attach capabilities event, you could check if a mod's TileEntity implements said interface and attach your capability accordingly. - Make a custom annotation that you would require other mods' tile entities to have if they want your capability. In your mod's preinit, you can scan for all classes with said annotation via the ASMDataTable (you can see how Forge does it with @ICapabilityInject in CapabilityManager#injectCapabilities). You could populate a list with all those classes and then use it to apply your capability in the capabilities event. - You could require all mods who want your capability to send you a IMC message with their TileEntity class name, which you would add to a list. Then in the event you can check if the TE is in the list and attach the capability if it is. The first one is definitely the easiest to do (although it might not be the best), the second and third are just ramblings but might be helpful if you want to do anything more complicated in the future. I'm not really an expert, so there might be a much better way to do this.