Jump to content

winnetrie

Members
  • Posts

    408
  • Joined

  • Last visited

Everything posted by winnetrie

  1. I have created my own wall class and everything is working fine. But there is something not right with the json file i think. While my walls behave like it should be and they are rendered correctly in the world and in my inventory, there is something weird when i break them. If you break a block, you see "breaking" particles wich is normal. If i break my wall i see those particles without the right texture. I see those particles in black/pink Here is the json: I figured out that removing this from the json: "defaults": { "model": "builtin/generated" }, fixes it more or less but then i see this in the console: [23:56:47] [Client thread/ERROR] [FML]: MultiModel minecraft:builtin/missing is empty (no base model or parts were provided/resolved) [23:56:47] [Client thread/ERROR] [FML]: MultiModel minecraft:builtin/missing is empty (no base model or parts were provided/resolved) [23:56:48] [Client thread/ERROR] [FML]: MultiModel minecraft:builtin/missing is empty (no base model or parts were provided/resolved) The particles are mostly normal then, except for 1. So i still see the black/pink particles but it's like just 1 out of 10. How can i fix this? Everything is working good, just this particle thing is really ennoying!
  2. i see you have this error: Caused by: java.io.FileNotFoundException: em:models/block/slab_half_maple.json This means you do not have that file or it isn't in the right place!
  3. Show us your blockstate file. You only provided a model file for your block. If you use the non-forge json method you need: -a blockstate .json file -a block model .json file -a item model .json file If you use the forge version (wich i recommend) you only need the blockstate file and you do everything inside that. But first show us your blockstate file
  4. It's both java so you can't get confused about this "block instanceof Block", because it stays the same. I Know this is wrong "block == instanceof Block" but it seems i looked over it. I even don't know why i did that, it doesn't make sense. I guess i was tired at that moment! It's not only basic java but also basic other languages like c++. But at some point you are right, i will some day try to program something in java. Sounds very intresting!
  5. lol omg, i know this and i don't know why i did that. I already compared it with my 1.7.10 mod code and couldn't understand why it is working there and not here. #facepalm
  6. this looks wrong for me: orbeMedio = (OrbeMedio)(new OrbeBasico().setUnlocalizedName("Orbe Medio")); orbeMedio.setRegistryName("OrbeMedio"); GameRegistry.register(orbeMedio); Why are you casting (OrbeMedio) to OrbeBasico? It should look like this: orbeMedio = new OrbeMedio().setUnlocalizedName("orbemedio"); orbeMedio.setRegistryName("orbemedio"); GameRegistry.register(orbeMedio); You also did not provide the code from OrbeBasico Also don't forget to initialize your orbeMedio var : public static Item orbeMedio;
  7. I'm trying to use instanceof but it gives me an error. I could use it in the exact same way in 1.7.10 but in 1.10.2 it give me this error: Syntax error on token "instanceof", delete this token for instanceof BlockStairs cannot be resolved to a variable for BlockStairs this is the code for my glass stairs: @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) { IBlockState iblockstate = blockAccess.getBlockState(pos.offset(side)); Block block = iblockstate.getBlock(); return block==this || block == instanceof BlockStairs; }
  8. Oh i see. So simple lol! Thank you
  9. Is it posseble to rename a vanilla item/block? I mean changing the unlocalizedname and keeping the registryname. If this is posseble, how to i give it a proper name in the en_US.lang file?
  10. I found a solution for this crash. I have been searching the web and found the solution in this post: http://www.minecraftforge.net/forum/index.php?topic=39109.0 Here is what i added for 1.10.2 in my glassslabblock class: @Override public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face) { if(this.blockState.getBaseState().getMaterial().equals(Material.GLASS)) return Blocks.GLASS.doesSideBlockRendering(state, world, pos, face); else return super.doesSideBlockRendering(state, world, pos, face); } I didn't knew it had to be implented because in the class BlockBreakable it isn't there.
  11. I have Updated my Worldgen class. For the overworld the blocks are generating, but for the nether they don't. Anyone has an idea why my blocks don't generate in the nether? nvm i looked into the WorldGenMinable and i saw i need to use a predicate. Solved it :-)
  12. I think the main cause is this error: Reported exception thrown! net.minecraft.util.ReportedException: Tesselating block model Can anyone help me? here my class: I also keep having this problem:
  13. Yeah i already tried this before but it gave me a crash, so i thought i did it wrong. So here is the crash: Why do i get this btw: Caused by: java.lang.IllegalArgumentException: Cannot get property PropertyEnum{name=half, clazz=class net.minecraft.block.BlockSlab$EnumBlockHalf, values=[top, bottom]} as it does not exist in BlockStateContainer{block=tem:glassdoubleslab1, properties=[type]} I know this does not exist, there is no need of it either, but why is it looking for it?
  14. I already implemented that but this do something else. I Need something that prevents seeing thru the blocks. The block beneath the glassslab has no texture.
  15. Ok thank you that fixed it. How do i prevent that you look thrue the world? Do i need to override this method: public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) I think i do, because it only checks for this == Blocks.GLASS || this == Blocks.STAINED_GLASS this is how it looks like: @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) { IBlockState iblockstate = blockAccess.getBlockState(pos.offset(side)); Block block = iblockstate.getBlock(); if (this == Blocks.GLASS || this == Blocks.STAINED_GLASS) { if (blockState != iblockstate) { return true; } if (block == this) { return false; } } return !this.ignoreSimilarity && block == this ? false : super.shouldSideBeRendered(blockState, blockAccess, pos, side); } and this line looks like this: return !this.ignoreSimilarity && block == this ? false : super.shouldSideBeRendered(blockState, blockAccess, pos, side);
  16. So i made glass slabs wich are working fine except for the drops. I know (think) i can set the quantitydropped to 0, so there will be no drops at all. So i use the cansilkharvest() to be able to get the slab with silktouch. At this point everything works fine. But if i mine the double slab nothing drops. Ofcourse i have to define it somewhere somehow, but i don't know it. In 1.7.10 i used this method: @Override protected ItemStack createStackedBlock(int par1) { int drops=0; if (this.isdouble==true){ drops=2; } if (this.isdouble==false){ drops=1 ; } return new ItemStack(slab, drops, par1 & 7); } Alot has changed since 1.7.10 and don't know an alternative for 1.10.2 This is my BlockGlassBlockSlab.class: Here is my current slab class:
  17. Thank you. I made a new workspace and after that i dragged my src folder to replace the new made src folder.
  18. I have updated it to a newer version but now my workspace is empty! I still have all the data in the folder but in Eclipse it is empty. How do i get it back?
  19. I have succeeded in applying the hardnes and resistance but not the soundtype: doing this getSoundType(IBlockState state, World world, BlockPos pos, Entity entity) gives me an error: The method getSoundType(IBlockState, World, BlockPos, Entity) of type BlockFeliron must override or implement a supertype method in the Block class from minecraft i find it like this getSoundType(), so i did this instead
  20. I have a block called BlockFeliron. It contains 2 types : ORE and BLOCK i want a different hardness, resistance, soundtype for those both. How to i do this? i tried this: It always takes the first settings, perhaps because it is the defaultstate
  21. Oh yes, right.... I did: public static BlockChalkstoneBlockSlab.EnumType byMetadata(int meta) { if (meta < 0 || meta >= META_LOOKUP.length) { meta = 0; } return META_LOOKUP[meta]; } static { for (BlockChalkstoneBlockSlab.EnumType types : values()) { META_LOOKUP[types.getID()] = types; } } It's working now properly. Thank you! EDIT: i also added this now: @Override public Item getItemDropped(IBlockState state, Random rand, int fortune) { return Item.getItemFromBlock(ModBlocks.brickedclayslab1); } @Override public int quantityDropped(Random random) { return this.isDouble() ? 2 : 1; } @Override public int damageDropped (IBlockState state){ return ((BlockBrickedClayBlockSlab1.EnumType) state.getValue(TYPE)).getID(); } I didn't added it before because it wasn't important at that point.
  22. I have looked into the minecraft class and i changed mine to this: This now throws an error when the slab is placed: [10:46:10] [Client thread/FATAL]: Unreported exception thrown! java.lang.IllegalArgumentException: Cannot set property PropertyEnum{name=type, clazz=class winnetrie.tem.blocks.BlockChalkstoneBlockSlab$EnumType, values=[raw, smooth, bricked]} to null on block tem:chalkstonehalfslab, it is not an allowed value at net.minecraft.block.state.BlockStateContainer$StateImplementation.withProperty(BlockStateContainer.java:222) ~[blockStateContainer$StateImplementation.class:?] at winnetrie.tem.blocks.BlockChalkstoneBlockSlab.getStateFromMeta(BlockChalkstoneBlockSlab.java:73) ~[blockChalkstoneBlockSlab.class:?] at net.minecraft.block.Block.onBlockPlaced(Block.java:807) ~[block.class:?] at net.minecraft.block.BlockSlab.onBlockPlaced(BlockSlab.java:75) ~[blockSlab.class:?] at net.minecraft.item.ItemBlock.onItemUse(ItemBlock.java:58) ~[itemBlock.class:?] at net.minecraft.item.ItemSlab.onItemUse(ItemSlab.java:83) ~[itemSlab.class:?] at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:159) ~[itemStack.class:?] at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClickBlock(PlayerControllerMP.java:486) ~[PlayerControllerMP.class:?] at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1603) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2281) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2058) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1846) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1118) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:406) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_73] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_73] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_73] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_73] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_73] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_73] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?]
  23. So i was trying to make slabs with different textures using the metadata. I succeeded to do so, but now they don't stack anymore.
  24. Aha! Didn't knew it can be done like this. That's opens alot of possebilities! Thank you! Alright i'll try to use this.
  25. Oh ok, i know that in the past mods had them in the game and i'm pretty sure minecraft did too. I don't know why anyone would add this to the game and like you said it's not meant to be there. So that means i'm pretty done with slabs i think? here are my latest files: halfslab file: double slab file: Thank you for linking that jsonlint page, very usefull! 1 more question. I now used this: "inventory": { "model": "minecraft:half_slab" } to get the item form for it. I had this error in the log about"inventory", so i added it to fix this. I think there has to be a better way, not sure how to link to the half=bottom variants. I know this has to do with this: ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(),"inventory")); Because i have set it to "inventory", but can i reference it to half bottom also? If so , how? Then i have another question also. A block can hold 16 metadata. A slab uses already 2 to determine if it's bottom or top. So that means i can use the same slab to hold 8 different types. Is it better to make use of this or can i just make a new block for each different slab? Does this affect anything? Like more memory usage or something?
×
×
  • Create New...

Important Information

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