Jump to content

winnetrie

Members
  • Posts

    408
  • Joined

  • Last visited

Everything posted by winnetrie

  1. Now i can see the biome o plenty mod in the reference lib, and everything is there. I can see in all classes etc etc. But when i start the game now i get this error: There was a severe problem during mod loading that has caused the game to fail cpw.mods.fml.common.LoaderException: java.lang.NoSuchMethodError: net.minecraft.client.Minecraft.func_71410_x()Lnet/minecraft/client/Minecraft; in the error i see this too: Caused by: java.lang.NoSuchMethodError: net.minecraft.client.Minecraft.func_71410_x()Lnet/minecraft/client/Minecraft; at biomesoplenty.ClientProxy.<init>(ClientProxy.java:49) Can i fix this?
  2. I tried a few times to add source/api. You said for source just add it, but add it where? I tried to add it like you said and i can find it in the reference library but everything inside is empty? Why is that? Here a picture:
  3. What he said you should do is create an abstract class to extend from Block. Ok but if my abstract class extends Block and not BlockWall, how am supposed to make the "instanceof ...." check? Cuz it won't be an instance of BlockWall but just Block. I also do not know how i should provide that "fake" blockstate. Now i get the same error as before, probably because i didn't provide that fake blockstate wich i don't know how to do.
  4. Oh alright, that's why it didn't worked. Thank you! EDIT: So it seems to work a bit. Game starts up but the walls have no textures yet. I can see this in the console: Perhaps it's those json files that confuses me.
  5. I was wondering if we can create a mod that works exactly or even better then the plugin griefprevention? I know there are a few anti griefing mods, but they aren't as good as that plugin. So my goal is to at some point having my own public server with mods i made, but ofc a server needs some server utilities. So is it posseble? If yes how do i start with it? If it isn't posseble for what reason anyway, then i have to know.
  6. So if i understand it well. I have to create an abstract class that extends blockwall. Then i need to create a class that extends that abstract class. That class i use then to create my actual wall and registrate that 1. I probably do something wrong then, i tried this but it still gives me the same error. I just copy all of the methods needed from blockwall to my abstract class? What do i write into the class that extends the abstract class? Oh jeez, why do they have to change all that code, 1.7.10 is much easier in my opinion. I'll keep trying anyway. Eventually i'll succeed.
  7. Oh I see now. I changed it to BlockWall.class. The error is gone, but i'm pretty sure that's not the solution at all. Because BlockWall.class enumtype variant has "cobblestone" and "mossy_cobblestone" as values. Changing it to CustomWalls.class gives me back that error. So i wonder if i have to Override it? Can it be overridden? If yes, what needs to be overridden? Or is it just imposseble to extend on that class?
  8. I try to make blockwalls for 1.9, but i ran into an error: Cannot set property PropertyEnum{name=variant, clazz=class net.minecraft.block.BlockWall$EnumType, values=[cobblestone, mossy_cobblestone]} as it does not exist in BlockStateContainer{block=null, properties=[east, north, south, up, variant, west]} As far as i understand it (at least i think i do), it means that it wants the variants cobblestone and mossy_cobblestone but it does not exists wich i do understand it doesn't exists, because i do not have them. But then why he asks for those EnumTypes? I have this in my CustomWalls.class:
  9. So now (i'm trying to improve) i did this: public Bricks(String unlocalizedName, Material material, float hardness, float resistance) { super(material); //this.setUnlocalizedName(unlocalizedName); this.setCreativeTab(tem.testtab); this.setHardness(hardness); this.setResistance(resistance); this.setDefaultState(this.blockState.getBaseState().withProperty(TYPE, EnumType.WHITE)); this.setRegistryName("bricks"); this.setUnlocalizedName(this.getRegistryName().toString()); } So the registryname is now in the bricks class. I think it's better. for the gameregistry i have now this: GameRegistry.register(bricks); GameRegistry.register(bricksItemBlock.setRegistryName(bricks.getRegistryName())); It seems to work all fine. Just 1 thing i was wondering about. Does this not register "bricks" and "bricksItemBlock" with the same name? wich i defined as "bricks" If it does. Does it matter at all, can this conflict with anyhting? Just wondering. Because it works , doesn't mean it is done right. Right?
  10. Oh yes i see. It seems to work now: bricks = new Bricks("bricks",Material.rock,2,2); bricksItemBlock = new ItemBlockMeta(bricks); GameRegistry.register(bricks.setRegistryName("bricks")); GameRegistry.register(bricksItemBlock.setRegistryName("bricks")); final String colors[] = {"white","orange","magenta","light_blue","yellow","lime","pink","gray","silver","cyan","purple","blue","brown","green","red","black"}; ResourceLocation[] resLoc = new ResourceLocation[16]; for (int i=0; i < 16; i++) resLoc[i] = new ResourceLocation("tem:bricks_" + colors[i]); ModelBakery.registerItemVariants(Item.getItemFromBlock(bricks), resLoc); and for my block i have this now: I tried Lexmanos his simple and much cleaner version of "public enum EnumType" but that doesn't work at all When i try this it gives me an error at this: public static final PropertyEnum TYPE = PropertyEnum.create("type", Bricks.EnumType.class); a red line appear under "create" saying this : i could fix that with implementing IStringSerializable but the it asks me also for a method, this : @Override public String getName() { return null; } So because this crashes the game changed it back to this: and this works fine i think i can't get go around this.
  11. It does indeed looks cleaner. I didn't just copy pasted tutorials. For this class i followed a tutorial for 1.8 from MrCrayFish on youtube. He explains why you need those method, what they do and where you can get them. So i copy-pasted the methods from the minecraft block.class over to mine and then i changed them to what i need. That switch statement wasn't even shown in his tutorial. I know i need to learn more java, i'm trying to pick it up while modding. As in fact i have some programming knowledge of c++ I don't want to copy paste stuff without knowing and understanding what it does. I see to get the specialname you return the enumtype and chanhe them to lowercase. That's nice! EDIT: I need to (i think) get the "specialname" into the place of "--COLORS HERE--" setRegistryName("--COLORS HERE--"+"_bricks"); setUnlocalizedName(this.getRegistryName().toString()); I don't know how to do this.
  12. ok this is my bricks class: As you can see i need to change the "--COLORS HERE--" I have no idea how to do it? I tried many things but still
  13. Can you also explain, why i should not use unlocalizedname? What should i use instead? Do i need to make my own method for it? i figured that this: GameRegistry.register(bricksItemBlock.setRegistryName(bricks.getUnlocalizedName().substring(5))); sets the registryname to "bricks" while this: GameRegistry.register(bricks.setRegistryName(bricks.getUnlocalizedName().substring(5))); gives me "bricks_white","bricks_orange", etc etc. I do not understand why that is? why does it return for brick the right unlocalizedname and for the itemblock not? Also i tested it just to be sure if i change the itemblock registry to this: GameRegistry.register(bricksItemBlock.setRegistryName("bricks_orange")); then the texture works but ofc only for the orange block
  14. So , i tried following your steps and i did this: bricks = new Bricks("bricks",Material.rock,2,2); ItemBlock bricksItemBlock = new ItemBlockMeta(bricks); GameRegistry.register(bricks.setRegistryName(bricks.getUnlocalizedName().substring(5))); GameRegistry.register(bricksItemBlock.setRegistryName(bricks.getUnlocalizedName().substring(5))); This seems to work fine except the textures for the items are not showing up. The blocks (or better the itemblocks) are all there in the creative tab They have the right name also, but they have all the black/pink texture. If i use them ( so placing a block down) , the block placed has the right texture. So what am i doing wrong. Why are the item textures for my blocks not showing?
  15. So i tried something but i can't make it work. I have this: final String colors[] = {"white","orange","magenta","light_blue","yellow","lime","pink","gray","silver","cyan","purple","blue","brown","green","red","black"}; ResourceLocation[] resLoc = new ResourceLocation[16]; for (int i=0; i < 16; i++) resLoc[i] = new ResourceLocation("tem:bricks_" + colors[i]); ModelBakery.registerItemVariants(Item.getItemFromBlock(bricks), resLoc); bricks = new Bricks("bricks",Material.rock,2,2); ItemBlock bricksItemBlock = new ItemBlock(bricks); GameRegistry.register(bricks, resLoc); GameRegistry.register(bricksItemBlock, resLoc); i have a red line under "register" saying this: The method register(K, ResourceLocation) in the type GameRegistry is not applicable for the arguments (Block, ResourceLocation[])
  16. I managed to update to 1.8 but i also wanted to get asap to 1.9. There i'm struggling with the registering of blocks and items. in 1.8 i use this: GameRegistry.registerBlock(bricks = new Bricks("bricks",Material.rock,2,2), ItemBlockMeta.class, "bricks"); but in 1.9 registerBlock is deprecated it looks like this: GameRegistry.registerBlock(bricks = new Bricks("bricks",Material.rock,2,2), ItemBlockMeta.class, "bricks"); It still works but i want to know what the new "way" is to register it
  17. So let's call it a communication issue I didn't understood at first that this was your point. There was also made a mistake by me, created a block without meta while i was convinced it had meta. It works now, so thnx all for the help. This case is solved now.
  18. I removed the for loop and changed it to this: block==TemBlocks.claywalls || block==TemBlocks.claybrickwalls || block==TemBlocks.brickswalls So apparently i do not need to check metadata. I tried this before and it didn't worked, but that's because i created the walls wrong (they had no metadata at all, and now they do) Thanks for those who helped me out, i really appreciate it. @Draco18s : I think you "shit" and "fucks" to much. You can talk to me like a normal person. I would appreciate that. I'm just a normal guy 32 years old who likes to learn something new. If you want to talk to me like a 12 year old wannebecoolboy, srry i don't have time for this. If you wanne help me out like an adult or (if you aren't an adult) like a child with good manners, i will be very happy to hear from you. thank you for understanding.
  19. I don't think my for loop is pointless, because it cycles trough all the metadata. That's the point of it. If i don't make that check the walls do not connect to eachother. I tried that before! Ofc your stuff works also. Mine code checks every metadata and your checks is it's smaller than 16. I agree to the "same exact logic" but not the far more efficient. Perhaps yours is a bit more efficient. I learned to use for loops in c++ because they are very powerfull and fast. So why would that be different in java? Besides that i like to use for loops and my code works. Even more important is knowing what the code does and so i do! Anyway i thank you for posting your variant
  20. Ok i found the problem.... For some reason i made my metawalls having each a different id, so i remade my CustomWallsColored.class so it has metadata. Really i facepalmed when i figured that out lol. So now it works perfectly and it looks like this: @Override public boolean canConnectWallTo(IBlockAccess par1, int par2, int par3, int par4) { Block block = par1.getBlock(par2, par3, par4); int meta = par1.getBlockMetadata(par2, par3, par4); //int meta = par1.getBlockMetadata(par2, par3, par4); if(block==TemBlocks.andesitewall || block==TemBlocks.smoothandesitewall || block==TemBlocks.andesitebrickwall || block==TemBlocks.dioritewall || block==TemBlocks.smoothdioritewall || block==TemBlocks.dioritebrickwall || block==TemBlocks.granitewall || block==TemBlocks.smoothgranitewall || block==TemBlocks.granitebrickwall || block==TemBlocks.prismarinewall || block==TemBlocks.smoothprismarinewall || block==TemBlocks.darkprismarinewall || block==TemBlocks.chalkstonewall || block==TemBlocks.smoothchalkstonewall || block==TemBlocks.chalkstonebrickwall || block==TemBlocks.marblestonewall || block==TemBlocks.smoothmarblestonewall || block==TemBlocks.marblestonebrickwall){ return true; } for(int i=0; i<16; i++){ if ((block==TemBlocks.claywalls && meta ==i) || (block==TemBlocks.claybrickwalls && meta ==i) || (block==TemBlocks.brickswalls && meta ==i) ){ return true; } } return block != this && block != Blocks.fence_gate ? (block.getMaterial().isOpaque() && block.renderAsNormalBlock() ? block.getMaterial() != Material.gourd : false) : true; } I also made a for loop to shorten the code. I will take a look at that "instanceof", it would be much better if it can connect to any wall of any mod.
  21. Well first of all, what i said about that ItemStack stuff was just an example. I know you can't use that in there. I thought i made that clear. Sorry but my english isn't that good, wich results is bad explanations sometimes. ok so second i tried this already before and it doesn't work: @Override public boolean canConnectWallTo(IBlockAccess par1, int par2, int par3, int par4) { Block block = par1.getBlock(par2, par3, par4); int meta = par1.getBlockMetadata(par2, par3, par4); //int meta = par1.getBlockMetadata(par2, par3, par4); if(block==TemBlocks.andesitewall || block==TemBlocks.smoothandesitewall || block==TemBlocks.andesitebrickwall || block==TemBlocks.dioritewall || block==TemBlocks.smoothdioritewall || block==TemBlocks.dioritebrickwall || block==TemBlocks.granitewall || block==TemBlocks.smoothgranitewall || block==TemBlocks.granitebrickwall || block==TemBlocks.prismarinewall || block==TemBlocks.smoothprismarinewall || block==TemBlocks.darkprismarinewall || block==TemBlocks.chalkstonewall || block==TemBlocks.smoothchalkstonewall || block==TemBlocks.chalkstonebrickwall || block==TemBlocks.marblestonewall || block==TemBlocks.smoothmarblestonewall || block==TemBlocks.marblestonebrickwall ){ return true; } if ((block==TemBlocks.claywalls && meta ==0) || (block==TemBlocks.claywalls && meta ==1) || (block==TemBlocks.claywalls && meta ==2) || (block==TemBlocks.claywalls && meta ==3) || (block==TemBlocks.claywalls && meta ==4) || (block==TemBlocks.claywalls && meta ==5)){ return true; } return block != this && block != Blocks.fence_gate ? (block.getMaterial().isOpaque() && block.renderAsNormalBlock() ? block.getMaterial() != Material.gourd : false) : true; } I haven't provided a World parameter because i'm overriding the method. It doesn't ask me for a world. So i used the first parameter. For me it seems like it doesn't do anything. This code was what i came up by myself, but since it didn't worked i came asking help here
  22. I'm using 1.7.10 because i like to have my own modded Cauldron server. Just because cauldron support both mods and plugins. Because there aren't any good enough (my opinion) antigriefing mods for 1.8 and higher, i'm forced to use GriefPrevention (plugin). I have already looked into how to mod in 1.8. I have set up a workspace for that. Now i'm being offtopic, so back to the topic: I know this is a method :getBlockMetadata I know it returns the meta when called. I also know how to use it. It returns an integer and that's my problem. I just don't know how the pieces fit together block==TemBlocks.claywalls for example an itemstack is much easier then you would do this: block == new ItemStack(TemBlocks.claywalls,1,0) But since i can't use itemstacks(ofc not) i can't check specific for that block with metadata 0 (in this example it's 0)
  23. what do you mean with update? update what? I have also no idea how to use this: IBlockAccess#getBlockMetadata I know getBlockMetadata, but .... I'll try some stuff Edit: I understand you don't want us to present chewed code. I do not ask for that either. But some vague words do not help me at all, i'm sorry. I'm 32 years old and i like programming, but i'm not that good skilled. I came to this forum desperately searching for help for things i really can't figure out! I know how to look into the minecraft classes and make my own extending them etc etc. I almost did everything by myself, except by following tutorials I hope you understand this thank you
  24. Hello, I checked the BlockWall class and made my own. How would i check for other walls that have metadata? For example i have made walls based on the minecraft clayblocks. so 16 colors. I have this now: @Override public boolean canConnectWallTo(IBlockAccess par1, int par2, int par3, int par4) { Block block = par1.getBlock(par2, par3, par4); if(block==TemBlocks.andesitewall || block==TemBlocks.smoothandesitewall || block==TemBlocks.andesitebrickwall || block==TemBlocks.dioritewall || block==TemBlocks.smoothdioritewall || block==TemBlocks.dioritebrickwall || block==TemBlocks.granitewall || block==TemBlocks.smoothgranitewall || block==TemBlocks.granitebrickwall || block==TemBlocks.prismarinewall || block==TemBlocks.smoothprismarinewall || block==TemBlocks.darkprismarinewall || block==TemBlocks.chalkstonewall || block==TemBlocks.smoothchalkstonewall || block==TemBlocks.chalkstonebrickwall || block==TemBlocks.marblestonewall || block==TemBlocks.smoothmarblestonewall || block==TemBlocks.marblestonebrickwall ){ return true; } return block != this && block != Blocks.fence_gate ? (block.getMaterial().isOpaque() && block.renderAsNormalBlock() ? block.getMaterial() != Material.gourd : false) : true; } This works exactly how it should, but i wonder how i check for a block with metadata! I really have no clue how to do that. I have tried TemBlocks.claywall but that doesn't work
  25. Hi, I'm looking for information about how to generate layers of my own made stones. Like how it is done in terrafirmacraft ( if you know that mod) I know how to generate ore but that generates clusters. So can anyone help me explaining how to create layers instead of clusters?
×
×
  • Create New...

Important Information

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