Everything posted by Erfurt
-
[1.8.9] How do I make my mod server compatible?
This is so strange, it works now... I closed eclipse and re-opened it again, and now it works
-
[1.8.9] How do I make my mod server compatible?
I have already tried that
-
[1.8.9] How do I make my mod server compatible?
Things seem to be working, however I have encountered a major problem. With the mod installed I can't join any servers, doesn't matter if the server has my mod or not, i just get the message "Failed to login: Invalid session (Try restarting your game)", but that doesn't help. On client side, everything is still working as it should. I know that you guys can't really help with the server joining issue. But I thank you for your time and expertise. Now I just need to figure out the heck is wrong
-
[1.8.9] How do I make my mod server compatible?
Ok, so I have removed alle the @SideOnly(Side.CLIENT) code from my mod, and everything seems to still be working, not sure why I had them in my code. I also had to remove ModelLoader.setCustomStateMapper(HaWMBlocks.wall_stonebrick, (new StateMap.Builder()).ignore(BlockWall.VARIANT).build()); from my code, but that leaves me with a huge problem, as this code removes the variants from blockwall, which I need to do otherwise the block will not have textures. Is there a way to use that code, without having a server crashing?
-
[1.8.9] How do I make my mod server compatible?
Crash report Not sure what classes you need. But are you saying that I can't use stuff like @SideOnly(Side.CLIENT) in my mod?
-
[1.8.9] How do I make my mod server compatible?
Hey guys, So I have made a small cosmetic mod that adds in some different blocks. Everything is working fine on the client side. But when I try to add my mod to my server, the server crashes at start-up. This made me think if there's something I need to add in one of my proxies, or somewhere else, to make my mod work on servers. I don't know much about proxies so I have no idea. I'm also a novice in modding, so I don't know much in general about modding. I have looked at some modders source code, but some seem to do nothing special in the proxies, while others seems to have lots of code in them. My problem is that I can't really tell if the code is for server stuff. My proxy classes is inside the spoiler
-
[1.8.9] [Solved] Fast/fancy graphics for custom block
I found a solution for it now, it was kinda stupid how easy it was, and I feel very idiotic. But oh well, I've learned something today, which is what's it all about What I had to do was simply add this code to my hedge class, and none of the others. @SideOnly(Side.CLIENT) public EnumWorldBlockLayer getBlockLayer() { return Blocks.leaves.getBlockLayer(); } The leaves class has some field that does what you're doing, I just don't remember what it's name is and if its static. The point of doing this, though, has to do with: a) avoiding duplication b) avoiding errors c) avoiding inadvertently referencing Minecraft.getMinecraft() on a dedicated server. It was probably what you meant that I should do, not 100% sure Anyway thanks for your help
-
[1.8.9] [Solved] Fast/fancy graphics for custom block
I see, what you mean, but shouldn't I have this for my custom block and not referencing leaves? I mean my hedges class is an extending of Blocks, therefore I should need to 'add' my own copies. Or am I wrong? Either way, referencing Blocks.leaves.isTransparent, isn't a thing. At least that's what Eclipse is telling me.
-
[1.8.9] [Solved] Fast/fancy graphics for custom block
Maybe it's just me who's a scrub, but I thought that was what I was doing?
-
[1.8.9] [Solved] Fast/fancy graphics for custom block
Hey guys, I'm having some trouble with my hedge mod, I want to be able to use both fast and fancy graphics, but I can't seem to figure out how it's done. I have looked at the leave classes to see how they are doing it. But when I try to mimic that code, I only get the textures for fast graphics, doesn't matter if graphics are set to fast or fancy. I'm using minecrafts own leave textures for my hedges. This is the code I tried to add in. @SideOnly(Side.CLIENT) protected int iconIndex; @SideOnly(Side.CLIENT) protected boolean isTransparent; public boolean isOpaqueCube() { return !Minecraft.getMinecraft().gameSettings.fancyGraphics; } @SideOnly(Side.CLIENT) public void setGraphicsLevel(boolean fancy) { this.isTransparent = fancy; Minecraft.getMinecraft().gameSettings.fancyGraphics = fancy; this.iconIndex = fancy ? 0 : 1; } @SideOnly(Side.CLIENT) public EnumWorldBlockLayer getBlockLayer() { return this.isTransparent ? EnumWorldBlockLayer.CUTOUT_MIPPED : EnumWorldBlockLayer.SOLID; } public boolean isVisuallyOpaque() { return false; } I should mention that without this code I'm getting the fancy graphics texture for both fast and fancy graphics. Also my hedges are not full blocks, so isOpaqueCube() is messing with the rendering under my hedges. But returning false removes this problem, but I don't know if that has any impact on my problem. Any help here would be lovely.
-
JSON model editor
Yeah that was what I wanted. I have found the function in program, so thanks.
-
JSON model editor
I have tried that one, but it only seem to be a 3D model, and doesn't show the code in the program, at least not as far as I can tell. The thing is that I have some code, that I need to change a bit. So I really need the code functionality.
-
JSON model editor
Hey guys, I'm not really sure if any of you use an editor for json files, or if you are just gods at making them But at least I suck at making json models. So I was wondering if you guys knew of any good model editors, that are free to use, where I can see a 3D preview, and have the code that I can see and edit myself if needed. I have looked at some but most of them don't allow me to see/edit the code on the fly, which I really want to do. As I mentioned I don't know if you guys use these or if you know any. Gee I don't even know if this is the right place to ask this question
-
[1.8.9] [Solved] Need help making an automated method
Thanks for your help guys, however I think I'm way out of my capabilities here, so for now I'm just going to do it the old-fashioned way. I thought that it would have been something rather simple and easy to do, but I was wrong
-
[1.8.9] [Solved] Need help making an automated method
I have a small question, when you say myWallInstance, what do you mean? Is it an instance of MyWall?
-
[1.8.9] Custom Walls issues
I guess I have to, I'm just not very happy to 'remove' vanilla stuff just to add in the same thing. I'm thinking more as a compatibility factor with other mods that might use cobble or mossy cobble in crafting. Personally I haven't found a mod that does this yet, but you never know. I don't think it will be necessary, as I'm only going to add about 10 new walls
-
[1.8.9] [Solved] Need help making an automated method
That seems pretty straight forward, I'll have to try it tomorrow, as it's getting pretty late here. But thanks I'm definitely going to try it
-
[1.8.9] [Solved] Need help making an automated method
Hey guys, so I have a small piece of code that I have to use a lot in my mod. I have tried some stuff, like using an if statement to see if the block was an instance of my custom class. I couldn't get that to work. I have tried to have the code inside my custom class, that I couldn't get to work either. ModelLoader.setCustomStateMapper(myBlock, (new StateMap.Builder()).ignore(BlockWall.VARIANT).build()); As You might be able to see, I'm using this code to ignore the Variant property from BlockWall. I need to do this otherwise my own custom walls won't render, because of missing variants. Anyhow, I'm adding a bunch of custom wall blocks with my mod, and for the time being I have to use that piece of code everytime, I'm adding a new wall block. So I would like to know if there's a way to make the code into a sort of automated method that will just 'apply' the code for all my blocks that are an instance of my custom wall class? I'm still fairly new to modding and java coding in generel, so I'm not sure exactly how to do this. I'm not really asking to just get the code, but rather asking for guidance on how to do something like this, if it's possible. The code would be nice to get however, so I can see how it's done, but if someone can point me in a helping direction, that would be awesome as well.
-
[1.8.9] Custom Walls issues
Never mind. I have already seen a lot of problems with doing so. Stuff like fences now also want to connect, a bit of a brain fart to think that there wouldn't be problems when doing so. Guess it's been a long day, and maybe I should just go to bed
-
[1.8.9] Custom Walls issues
Just coming with a small update on the 'problem' with vanilla wall blocks not connecting to my custom walls. I have made a fix, that was almost to simple to be true. I added this piece of code to my custom wall class. And it's working. However I'm not sure if this have any impact on the wall aspect of my blocks, but so far I have seen no issues. @Override public boolean isFullCube() { return true; } Maybe someone will correct me if this is bad or the wrong way to do this. I do know that the vanilla BlockWall class has isFullCube() return false. But all I know is that everything seems to be working fine. I still have to do some more testing to see if returning isFullCube() true, gives any problems, but so far there's been none.
-
[1.8.9] Problem with custom block color in inventory
You haven't checked any of the leave .json files have you? Because the .json files for both block and item, use the exact same texture. I did even look at in the texture folder to see if there was a colored version, which there's not, before posting on here. I also mentioned that if I made an item for the inventory, instead of using the block itself, I was able to make it work by adding this code to the item class. @SideOnly(Side.CLIENT) public int getColorFromItemStack(ItemStack stack, int renderPass) { return this.block.getRenderColor(this.block.getStateFromMeta(stack.getMetadata())); } Look I'm not trying to be a duche, but maybe look at the post before replying. And no, I'm not going to make a colored version of the leave textures, just for the inventory. All my mods are using vanilla textures, so they are as resoucepack friendly as possible, and I intend to keep it that way.
-
[1.8.9] Problem with custom block color in inventory
Last bump, guess I have a wierd problem, that no one can help me with
-
[1.8.9] Custom Walls issues
I think the problem came with forge 1.8 or 1.8.9 as I remember it working fine in 1.7.10. Most of the time when I use the @Override annotation, my eclipse tells me to remove it again, I don't really know why. But does it have any impact to use it anyway, and ignore eclipse in this case? Because if it has no impact and will work fine with the annotations being there, I will definitely add them Also I might have found a way to get vanilla walls to connect to my custom walls by using IExtendedEntityProperties, I just need to learn a bit more about how to use it, but I'll have to wait till tomorrow to do so.
-
[1.8.9] Custom Walls issues
You are absolutly right all I really need is this. @SideOnly(Side.CLIENT) public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list) { list.add(new ItemStack(itemIn, 1, 0)); } To be fair I wasn't sure if that would work, when BlockWall has two in its getSubBlocks, so I just figured that I had to add one, and still remove the other one, but that isn't the case. Thanks mate
-
[1.8.9] Custom Walls issues
I'm on a roll today After some more tinkering I was able to remove the unneeded extra blocks, from the CreativeTab, I used this code to fix the problem @SideOnly(Side.CLIENT) public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list) { for (int i = 0 ; i < 1 ; i ++) { if (i == 0) { list.add(new ItemStack(itemIn, 1, i)); } else { list.remove(new ItemStack(itemIn, 1, i)); } } } It's probably not the best way to do it, but it works. And that leaves me with the last problem with the connecting to vanilla walls failure, I'll leave this one open if someone knows of a way to get it working, otherwise this post is solved. Thanks for the help guys, I really appreciate it
IPS spam blocked by CleanTalk.