Posted March 6, 20196 yr Hello i have some blocks, their models are two blocks high. But if i aim at their uper half, their boundingboxes disappear. i also cannot place blocks on top of them. The new block appears behind them. How do i make them fully act as a stack of two blocks (but still placing and destroying them as one single block)?
March 6, 20196 yr The maximum size for a block’s bounding box is 1x1.5x1. You need multiple blocks to achieve this About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
March 6, 20196 yr 54 minutes ago, Drachenbauer said: but a door is two blocks kigh and can be placed as one single block. The door is two blocks, the top half still exists as a separate block with code that causes the two halves to function as desired. It is entirely possible to use world edit to place only the top, or only the bottom, half. The same goes for the bed, cactus, reeds, and other such blocks. The reason for this has to do with things like pathfinding. Remember how animals used to perpetually try and jump over fences? That was caused by fences breaking the 1x1x1 boundary rule and the AI not having been updated to account for it. Edited March 6, 20196 yr by Draco18s Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
March 6, 20196 yr Not necessarily. Block models can be up to 3x3x3. About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
March 7, 20196 yr Author do i need two block-classes, one for the bottom and one for the top? in the door-class i found something named "DoubleBlockHalf" There are many positions in that file, wich use this. But i´m not shure, wich of them i need to reproduce for the most basic usage of this... Edited March 7, 20196 yr by Drachenbauer
March 7, 20196 yr You just need 2 blocks in the world, how you implement it is completely up to you About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
March 7, 20196 yr Author in the minecraft java libary i cannot find files for upper parts of such stuff...
March 7, 20196 yr The details of the implement are simple. Override all methods that are called when a block is destroyed OR a block near a block is destroyed and handle removing both blocks (be careful not to go into an infinite loop). In your item block place method, place down your second block. About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
March 7, 20196 yr That’s up to how you decide to implement it About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
March 8, 20196 yr 3 hours ago, Cadiboo said: Override all methods that are called when a block is destroyed OR a block near a block is destroyed and handle removing both blocks (be careful not to go into an infinite loop). In your item block place method, place down your second block. That’s how I would do it Edited March 8, 20196 yr by Cadiboo About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
March 8, 20196 yr Author I want to have the bottom part renders the 3d model, just like it already does and the top one actually is invisible, just makes another boundingbox with slightly different size-vaules. It´s a balloon, tied to a string. So the bottom part should have a narrow boundingbox and the top a whider one. Edited March 8, 20196 yr by Drachenbauer
March 8, 20196 yr Author But i still have no idea, what i must pot in a class for the top part. I find no hinds to such a class in the java-file of the BlockDoublePlant class... Should i create a new class, such like BalloonBlockTop ?
March 8, 20196 yr If that’s how you want to implement it. You could also implement it in 1 Block or in a bottom block. I personally would use a top block. About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
April 16, 20196 yr Author how do i make a block-class only add voxelshapes, but not a model? The upper block only should compleete the voxelshapes for my model, but not place an own model it shoultd be just invisible.
April 16, 20196 yr There are no limitations on the collisions, but for AI pathing to work, you need to have 2 separate blocks. About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
April 17, 20196 yr Author But this does not tell me how to make an invisible seccond block, that appears on the onBlockPlacedBy method ontop of the block with the model. I exactly mean the way how to make a block, that adds voxelshapes, but no visible model. Edited April 17, 20196 yr by Drachenbauer
April 18, 20196 yr You can use World#setBlockState to place the 2nd block, and just have your 2nd block have an empty model with the particle texture being the same as your 1st blocks model. About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
July 28, 20196 yr Author How do i check, if there is enough space (one block of air above the choosen position) for the model, bevor placing? And how exactly do i use World#setBlockState (and how do i find the position above the first block)?
July 28, 20196 yr 1 hour ago, Drachenbauer said: How do i check, if there is enough space (one block of air above the choosen position) for the model, bevor placing? And how exactly do i use World#setBlockState (and how do i find the position above the first block)? You could use World#isAirBlock. To get the position above you simply can call .up() on the original blocks position to translate it up by 1. World#setBlockState will take in the state to place and the position to place it at. EX: world.setBlockState(pos, Blocks.STONE_BRICKS.getDefaultState()) If you were setting a state property like direction you could do it here, example with furnace: world.setBlockState(pos, Blocks.FURNACE.getDefaultState().with(FurnaceBlock.FACING, Direction.NORTH))
July 29, 20196 yr Author Now i have this: @Override public void onBlockPlacedBy(World worldIn, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) { worldIn.setBlockState(pos.up(), AngryBirdsBlocks.balloon_block_top.getDefaultState()); super.onBlockPlacedBy(worldIn, pos, state, placer, stack); } @Override public void onBlockHarvested(World worldIn, BlockPos pos, BlockState state, PlayerEntity player) { worldIn.setBlockState(pos.up(), Blocks.AIR.getDefaultState()); super.onBlockHarvested(worldIn, pos, state, player); } But i ned a third method, one, that is called bevore i cam place the bottom half and if i try to place it ina just one block tall gap (where the player is unable to enter), it should not be placed (like try to place a bed, where it has not enough room).
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.