-
Posts
76 -
Joined
-
Last visited
Everything posted by FlameAtronach93
-
Help me to help you. What's that check good for: pipeTile.getFluidLevel() > 0 (see https://gist.github.com/anonymous/7139d767f5265af00c6f#file-tileentitybasepipe-L52) Doesn't that imply that your adjacent pipe must already contain a fluid in order to accept more fluid? Sounds counterproductive if you ask me. Also, shouldn't you rather check pipeTile.canInjectFluid(f) instead of [this.]canInjectFluid(f) in the same line? Just in case you want to change behavior later... If that's not it, how about providing some debugging information? What does it do once you reach that condition? (Step-by-step debugging?)
-
Weird isCurrentLanguageBidirectional() error
FlameAtronach93 replied to AskHow1248's topic in Modder Support
Although it may be a bit late for this, I just had the same error loading a few months old frozen mod of mine trying to update it. Since it's modular, it's contained within its own project. In general, said error occurs for any pack.mcmeta file in the classpath, in this case also in my mod's own eclipse project, not only {mcp_home}/src/Minecraft. Thanks to OP for pointing me into a particular direction. -
Best tutorial: learn from Minecraft code. Look at the torch, both regular and redstone. Look at the repeater and fence. Pros: Always up to date Uses all capabilities of Minecraft Cons: Can be hard to understand There are two ways to create customized blocks. Use Minecraft methods or set the vertices yourself. Either way, vertices are set because that is what Minecraft does anyways. The class you need to look into is net.minecraft.client.renderer.RenderBlocks (if it didn't change with MC 1.6.1, haven't checked yet.) If that doesn't help, feel free to come back and ask, but do refer to this. Maybe I can find any available resources... Cheers.
-
Tutorial / resource I found was this one: http://www.minecraftforge.net/wiki/Developing_Addons_for_Existing_Mods Thing with this one is, it does not handle how to recompile your addon. I don't need to get the API or sources of the parent mod, because the parent mod is my own mod already in my workspace. The problem I'm having is to recompile my child mod as mcp will throw errors and nag that classes (from my dependency mod) couldn't be found. I settled for now with recompiling both, my depedency and child mod, then deleting my child mod from the output, and only then reobfuscate solely my child mod. It's working fine, but I think there should be an easier solution. And that's my question. Hope I worded my problem more clearly this time.
-
I'm back! I couldn't quite find any help on this one... I found a resource in the tutorial sections of this website, and browsed the reference used in that tutorial, but I don't need to set up my IDE for development rather than letting mcp know that there is a dependency and where to find it - without recompiling it along with my child mod. I could probably simply remove the respective output class files, but there ought to be a better, cleaner way... Sincerely, Flame
-
[UNSOLVED] Make your biome not generate
FlameAtronach93 replied to RegaGames's topic in Modder Support
Only after watching the video of the mod you're trying to make an addon for / immitate, I finally understood that you want to create another world type that does not use different world generators but only the one you provide. Well... there are different ways to learn that. [*]Decompile the parent mod's files and learn. [*]Find out how Minecraft generates the Nether and learn. -
Why would you disable mods anyways? Totally unregarding the fact that it's impossible to unregister registered things just like that (yet), in most cases it doesn't even matter if the server you join does not have the mods installed. You simply won't be able to use them. Make one of your core server mods remove and save all the inventory items of mods upon changing dimensions. Use the IPlayerTracker to be notified when a player does so. Vice versa, when switching back to the modded side of the server, add the previously saved items back to the player's inventory and you should be fine.
-
Launcher for FML in a custom minecraft directory
FlameAtronach93 replied to Redcat's topic in Modder Support
I have no idea why you need a custom launcher, but okay. There is a class in the default package of Minecraft called Starter, though I'm not sure whether it's Forge only. Doesn't matter since your launcher is based on FML. Either way, you'll probably need to know the deobfuscated name of that class. What you do is replace params.add("net.minecraft.LauncherFrame"); (I don't know where you got that class from in the first place, my package net.minecraft has no classes) with params.add("Start"); Or specifically the obfuscated name of Start. This way you'll be redirecting the entry point to Start, which then sets the Minecraft.minecraftDir to the current directory respectively. In case you're explicitly calling that (to me) unknown class because it's your own class and handles some launch-related processes, just do what you can find in that class: try { Field f = Minecraft.class.getDeclaredField("minecraftDir"); Field.setAccessible(new Field[] { f }, true); f.set(null, new File(".")); } catch (Exception e) { e.printStackTrace(); return; } This code uses the Java Reflection API to retrieve the private field Minecraft.minecraftDir and assign the current directory (new File(".")) to it. When Minecraft.getMinecraftDir(); is called at any time later in the code, it first checks whether Minecraft.minecraftDir == null, and if so retrieves the OS dependent directory through a call to Minecraft.getAppDir("minecraft"); or otherwise returns the predefined File pointer. Through the above snippet, you'll define the File pointer manually, so FML has no reason to determine the environment itself. Sincerely. -
The Tutorial you're following is outdated. Replace setBlockName with setUnlocalizedName. Regarding the Block constructor, parameter 1 resembles the block's index within the block list while the second provides the Block Material to use. It used to be the texture index of the block, but since that is now managed with Icons, it has been removed. Couldn't find a better tutorial for you and the forge wiki really takes awefully long to load. Sorry.
-
Multiple Mods in one mcmod.info File.[SOLVED]
FlameAtronach93 replied to Sol64's topic in Modder Support
Rephrased: Create another mod and in your other 3 mods' mcmod.info files, put this: { // ... other info stuff "dependencies" : [ "Forge", "<your_api_mod>" ], // ... more info stuff } -
Multiple textures for blocks (top, side, bottom etc.)
FlameAtronach93 replied to teunie75's topic in Modder Support
The pumpkin could have helped you. Anyways, there is a method you can override. It's called Block.getIcon(int side, int meta); and takes the side for which to retrieve the texture and the metadata of the block in case you need it as parameters. Example: public Icon getIcon( int side, int meta ) { ForgeDirection dir = ForgeDirection.getOrientation(side); if( dir == ForgeDirection.UP ) { return meta == 0 ? iconTopUnpowered : iconTopPowered; } else if( dir == ForgeDirection.DOWN ) { return iconBottom; } else { return iconSide; } } -
First thing I usually do when finding an error during development is to recreate the world. I don't care about bugs in development phase, since those have a chance to be caused by incompatible updates anyways...
-
I sometimes face similar problems. I'd make multiple changes to my code and all of a sudden the ChunkCache class would error without any exception trace back to my methods. The only approach I have to solving mysterious errors that appear completely unrelated is: [*]Think: What the hell have I done? [*]What did I change? [*]Comment all changes [*]Check if the error persists [*]Comment more/less depending on result [*]Repeat from 2. It can take quite a while, but I don't think there's a better solution. It once took me 3 hours to find that one little damn line of code that ultimately caused the error - and it was a careless mistake. I smashed my head against the table...
-
[SOLVED]How to send render specific information to client?
FlameAtronach93 replied to Busti's topic in Modder Support
As long as the variable is static or you have a reference to your block in your base mod class, it doesn't matter. You'll still have to stick to packets. After all, that's how the Internet works: send packets from clients to servers and vice versa. -
*facepalm* Put some effort in researching for yourself. There even is a tutorial section in these forums, right above Modder Support where you've posted in called - wait for it - Tutorials. I refuse to give any further answers unless you have a good reason why those tutorials aren't worth it. http://www.minecraftforge.net/wiki/Gui_Overlay http://www.minecraftforge.net/wiki/Containers_and_GUIs http://www.google.com/
-
Moritz is mostly right. You'll need to somehow modify the TE with one or more items. Or CreativeTabs. In every case, be it different algorithms on block updates, textures, or rendering, you'll first need to get the TE and do all the tests you need in order to distinguish the subtype. Example: In this example, you'd only have 2 different types for simplicity. Depending on the state of your TE, you'd do different things respectively. Fair enough, huh? It all comes down to... well, that. Hope that's enough to get you started. If not... explain your problem better.
-
As big or as small as you want. As by default all items and blocks use 16x16 textures your icon files would be... *Drum roll* 16x16! Almost. Minecraft actually indeed is capable of handling non-power-of-two textures, but by default it doesn't. I THINK by default it also only takes 16x16... a respective mod would thus easily allow you to circumvent these limits.
-
How to get a icon from a texturefile
FlameAtronach93 replied to TopSecretPorkChop's topic in Modder Support
I'm playing around with textures right now myself. It's not as easy as you expect it to be. I tried what you tried too, creating my own texture map, registering textures, loading them... I think Minecraft is a little too static for that. After long exploration of the source code, I found that the "type of Icons", actually the declared icon type of the Item / Block, declares from which texture map it is read. So even if you create your own texture map with texture type 0 (which is for blocks), it will still take the Minecraft terrain.png stitched texture as source. Consequentially, you don't even need to further pursue your current idea. I could look up the respective code areas again should you not believe me. I don't quite know how your code looks like or even why you explicitly need to use a custom texture map. Your case is even simpler than mine where I needed to color an item based on item damage (turned out to be much easier, too). My approach would be, unless you want the "label" not to cover the entire side, to use Block.getIcon(int side, int metadata); and consider both parameters to determine which Icon to use. I.e. the "top" would return something like: public Icon getIcon( int side, int metadata ) { if( side == 1 ) { // ForgeDirection.UP Block.wood.getIcon(0, 0); } else { Block.stoneBrick.getIcon(0, 0); } } Of course you'd need to adjust consideration of metadata to determine which side is the correct "top" of your button. Or maybe you are talking about a GUI button? -
Impressive time frame. I've been working on my mod for much longer, think it's 2 months now. WIP thread's open for 1 month I think. But the main work was to get the most realistic electrical physics in there... that's my excuse. Anyways, good luck with the mod!
-
Good point. What I mean is not fully replace every sky block in the area with a dummy block but only construct walls around the area so everything within would be darkened while still allowing mobs to spawn. I'm going to face a similar problem soon, too, so I'd really like to know the solution...
-
BlockRender issues - Block renders black....sometimes
FlameAtronach93 replied to Draco18s's topic in Modder Support
*Pokes with* I'm confused. I mean I'm poking with the stuff there. I got that, but why? ... Oh, wait. I thought you meant you'd be poking me with that stuff there. -
You mean uncommon sense. Or perhaps even super-sense. Right. The thing that's kinda going lost. There is a difference between debugging your own code and trying to find out what the heck you're missing when working with another person's code. Especially if that other person's code is damn huge...
-
BlockRender issues - Block renders black....sometimes
FlameAtronach93 replied to Draco18s's topic in Modder Support
*Pokes with* I'm confused. -
Could be that your custom light value is recalculated shortly after you set it. I doubt that. Sky / Air block doesn't exist. It's a null reference at index 0 of Block.blocksList. You could try though to roof the target area with invisible blocks that affect light level of all blocks within the enclosed area. I'd set the opacity for those particular blocks with Block.setLightOpacity. Though I don't know if it works for non-opaque blocks. It must be non-opaque in order to better control rendering, i.e. making it fully transparent so you can see and walk through. But it might be that the light opacity is only used for opaque cubes...
-
HELP - java.lang.NoClassDefFoundError: for my tileentity!
FlameAtronach93 replied to CaptainMiner's topic in Modder Support
Your welcome. Glad I could help. That's nice. I hate to ask, but would you mind hitting that "Thank You" link, too? I plan to stay a little longer on these forums, and some positive Karma would be just as nice.