Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Kenneth201998

Members
  • Joined

  • Last visited

Everything posted by Kenneth201998

  1. package com.log_cabin_blocks.objects.blocks; import com.log_cabin_blocks.objects.blocks.utility_blocks.cooking_utilities.cabin_furnace.CabinFurnaceContainer; import com.log_cabin_blocks.objects.blocks.utility_blocks.cooking_utilities.cabin_furnace.CabinFurnaceTileEntity; import net.minecraft.block.Block; import net.minecraft.inventory.container.ContainerType; import net.minecraft.tileentity.TileEntityType; public class BlockList { public static Block oak_log_wall_type_0; public static Block oak_log_wall_type_1; public static Block oak_log_corner; public static Block oak_cabin_door; public static Block oak_window_frame; public static Block water_pump; public static Block cabin_furnace; public static TileEntityType<CabinFurnaceTileEntity> cabin_furnace_tile_entity; public static ContainerType<CabinFurnaceContainer> cabin_furnace_container; } I placed it in the blockslist class... Saw someone else do that in their mod.
  2. Problem is I did register them: @SubscribeEvent public static void registerTileEntities (final RegistryEvent.Register<TileEntityType<?>> event) { event.getRegistry().register(TileEntityType.Builder.create(CabinFurnaceTileEntity::new, BlockList.cabin_furnace).build(null).setRegistryName("cabin_furnace")); }
  3. I am so close to creating a custom furnace block but I ran into this error: [32m[12:36:44] [Server thread/INFO] [minecraft/IntegratedServer]: Saving and pausing game... [m[32m[12:36:44] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'Test Area 010'/minecraft:overworld [m[1;31m[12:36:44] [Server thread/ERROR] [minecraft/Chunk]: A TileEntity type com.log_cabin_blocks.objects.blocks.utility_blocks.cooking_utilities.cabin_furnace.CabinFurnaceTileEntity has thrown an exception trying to write state. It will not persist, Report this to the mod author java.lang.RuntimeException: class com.log_cabin_blocks.objects.blocks.utility_blocks.cooking_utilities.cabin_furnace.CabinFurnaceTileEntity is missing a mapping! This is a bug! at net.minecraft.tileentity.TileEntity.writeInternal(TileEntity.java:72) ~[?:?] {re:classloading} at net.minecraft.tileentity.TileEntity.write(TileEntity.java:66) ~[?:?] {re:classloading} at net.minecraft.world.chunk.Chunk.func_223134_j(Chunk.java:444) ~[?:?] {re:classloading} at net.minecraft.world.chunk.storage.ChunkSerializer.write(ChunkSerializer.java:303) ~[?:?] {re:classloading} at net.minecraft.world.server.ChunkManager.func_219229_a(ChunkManager.java:677) ~[?:?] {re:classloading} at net.minecraft.world.server.ChunkManager.lambda$save$9(ChunkManager.java:352) ~[?:?] {re:classloading} at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source) [?:1.8.0_201] {} at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) [?:1.8.0_201] {} at java.util.Iterator.forEachRemaining(Unknown Source) [?:1.8.0_201] {} at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source) [?:1.8.0_201] {} at java.util.stream.AbstractPipeline.copyInto(Unknown Source) [?:1.8.0_201] {} at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) [?:1.8.0_201] {} at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source) [?:1.8.0_201] {} at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source) [?:1.8.0_201] {} at java.util.stream.AbstractPipeline.evaluate(Unknown Source) [?:1.8.0_201] {} at java.util.stream.ReferencePipeline.forEach(Unknown Source) [?:1.8.0_201] {} at net.minecraft.world.server.ChunkManager.save(ChunkManager.java:349) [?:?] {re:classloading} at net.minecraft.world.server.ServerChunkProvider.save(ServerChunkProvider.java:309) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.world.server.ServerWorld.save(ServerWorld.java:770) [?:?] {re:classloading} at net.minecraft.server.MinecraftServer.save(MinecraftServer.java:528) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:113) [?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:646) [?:?] {re:classloading,pl:accesstransformer:B} at java.lang.Thread.run(Unknown Source) [?:1.8.0_201] {} [m[36m[12:36:45] [Server thread/DEBUG] [ne.mi.fm.FMLWorldPersistenceHook/WP]: Gathering id map for writing to world save Test Area 010 [m[32m[12:36:51] [Server thread/INFO] [minecraft/ServerPlayNetHandler]: Dev lost connection: Disconnected [m[32m[12:36:51] [Server thread/INFO] [minecraft/MinecraftServer]: Dev left the game [m[32m[12:36:51] [Server thread/INFO] [minecraft/ServerPlayNetHandler]: Stopping singleplayer server as player logged out [m[32m[12:36:51] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping server [m[32m[12:36:51] [Server thread/INFO] [minecraft/MinecraftServer]: Saving players [m[32m[12:36:51] [Server thread/INFO] [minecraft/MinecraftServer]: Saving worlds [m[32m[12:36:51] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'Test Area 010'/minecraft:overworld [m[1;31m[12:36:51] [Server thread/ERROR] [minecraft/Chunk]: A TileEntity type com.log_cabin_blocks.objects.blocks.utility_blocks.cooking_utilities.cabin_furnace.CabinFurnaceTileEntity has thrown an exception trying to write state. It will not persist, Report this to the mod author java.lang.RuntimeException: class com.log_cabin_blocks.objects.blocks.utility_blocks.cooking_utilities.cabin_furnace.CabinFurnaceTileEntity is missing a mapping! This is a bug! at net.minecraft.tileentity.TileEntity.writeInternal(TileEntity.java:72) ~[?:?] {re:classloading} at net.minecraft.tileentity.TileEntity.write(TileEntity.java:66) ~[?:?] {re:classloading} at net.minecraft.world.chunk.Chunk.func_223134_j(Chunk.java:444) ~[?:?] {re:classloading} at net.minecraft.world.chunk.storage.ChunkSerializer.write(ChunkSerializer.java:303) ~[?:?] {re:classloading} at net.minecraft.world.server.ChunkManager.func_219229_a(ChunkManager.java:677) ~[?:?] {re:classloading} at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) [?:1.8.0_201] {} at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) [?:1.8.0_201] {} at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) [?:1.8.0_201] {} at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) [?:1.8.0_201] {} at java.util.stream.AbstractPipeline.copyInto(Unknown Source) [?:1.8.0_201] {} at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) [?:1.8.0_201] {} at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source) [?:1.8.0_201] {} at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source) [?:1.8.0_201] {} at java.util.stream.AbstractPipeline.evaluate(Unknown Source) [?:1.8.0_201] {} at java.util.stream.ReferencePipeline.forEach(Unknown Source) [?:1.8.0_201] {} at net.minecraft.world.server.ChunkManager.save(ChunkManager.java:336) [?:?] {re:classloading} at net.minecraft.world.server.ServerChunkProvider.save(ServerChunkProvider.java:309) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.world.server.ServerWorld.save(ServerWorld.java:770) [?:?] {re:classloading} at net.minecraft.server.MinecraftServer.save(MinecraftServer.java:528) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:571) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.integrated.IntegratedServer.stopServer(IntegratedServer.java:235) [?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:685) [?:?] {re:classloading,pl:accesstransformer:B} at java.lang.Thread.run(Unknown Source) [?:1.8.0_201] {} [m[32m[12:36:51] [Server thread/INFO] [minecraft/ChunkManager]: ThreadedAnvilChunkStorage (Test Area 010): All chunks are saved [m[36m[12:36:51] [Server thread/DEBUG] [ne.mi.fm.FMLWorldPersistenceHook/WP]: Gathering id map for writing to world save Test Area 010 [m[32m[12:36:51] [Server thread/INFO] [minecraft/ChunkManager]: ThreadedAnvilChunkStorage (Test Area 010): All chunks are saved [m[32m[12:36:52] [Client thread/INFO] [minecraft/Minecraft]: Stopping! [m It does not link me to any specific line of code I created so I can't find what went wrong. Can someone please help me find out what I might be missing? package com.log_cabin_blocks.objects.blocks.utility_blocks.cooking_utilities.cabin_furnace; import javax.annotation.Nullable; import com.log_cabin_blocks.objects.blocks.BlockList; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerInventory; import net.minecraft.inventory.container.Container; import net.minecraft.inventory.container.INamedContainerProvider; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.StringTextComponent; public class CabinFurnaceTileEntity extends TileEntity implements INamedContainerProvider { public CabinFurnaceTileEntity() { super(BlockList.cabin_furnace_tile_entity); } @Nullable @Override public Container createMenu(int p_createMenu_1_, PlayerInventory p_createMenu_2_, PlayerEntity p_createMenu_3_) { return new CabinFurnaceContainer(p_createMenu_1_, world, pos, p_createMenu_2_, p_createMenu_3_); } @Override public ITextComponent getDisplayName() { return new StringTextComponent("cabinfurnace"); } }
  4. Ok so now the ore nodes respawn and I even figured out how to get them to spawn on the surface using these codes: Respawnable ore node: package com.kenneths_mod.objects.blocks.respawning_ores; import java.util.Random; import com.kenneths_mod.KenmodMain; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.state.BooleanProperty; import net.minecraft.state.IntegerProperty; import net.minecraft.state.StateContainer.Builder; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IWorld; import net.minecraft.world.World; public class RespawningOreNode extends Block { private static final IntegerProperty STAGE = BlockStateProperties.AGE_0_1; private static final BooleanProperty FILLED = BooleanProperty.create("filled"); public RespawningOreNode(Properties properties) { super(properties); this.setDefaultState(this.stateContainer.getBaseState().with(STAGE, Integer.valueOf(0)).with(FILLED, Boolean.valueOf(true))); } @Override public void onPlayerDestroy(IWorld worldIn, BlockPos pos, BlockState state) { KenmodMain.debugString(state.getBlock().getRegistryName().toString()); if(state.get(FILLED) == true) { worldIn.setBlockState(pos, this.stateContainer.getBaseState().with(STAGE, Integer.valueOf(0)).with(FILLED, Boolean.valueOf(false)), 1); } } @Override public boolean ticksRandomly(BlockState state) { return true; } @Override public void randomTick(BlockState state, World worldIn, BlockPos pos, Random random) { if (state.get(FILLED) == false) { if(state.get(STAGE) == 0) { worldIn.setBlockState(pos, state.cycle(STAGE), 4); } else { //Respawn Ore: worldIn.setBlockState(pos, state.with(STAGE, Integer.valueOf(0)).with(FILLED, Boolean.valueOf(true))); } } } @Override public boolean isSolid(BlockState state) { return false; } @Override protected void fillStateContainer(Builder<Block, BlockState> builder) { builder.add(STAGE, FILLED); } } Natural Generation: (I added it to VEGETAL_DECORATION because I want it to spawn on the surface of mountains similar to how dead bushes spawn on the surface of deserts: private void addFeatures () { Biomes.MOUNTAINS.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Biome.createDecoratedFeature(KenmodFeatures.respawning_iron_feature, IFeatureConfig.NO_FEATURE_CONFIG, Placement.COUNT_EXTRA_HEIGHTMAP, new AtSurfaceWithExtraConfig(0, 0.2F, 1))); } And here is the feature class: package com.kenneths_mod.world_gen.respawning_ores; import java.util.Random; import java.util.function.Function; import com.kenneths_mod.objects.BlockList; import com.mojang.datafixers.Dynamic; import net.minecraft.block.Blocks; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IWorld; import net.minecraft.world.gen.ChunkGenerator; import net.minecraft.world.gen.GenerationSettings; import net.minecraft.world.gen.feature.Feature; import net.minecraft.world.gen.feature.NoFeatureConfig; public class RespawningIronFeature extends Feature<NoFeatureConfig> { public RespawningIronFeature(Function<Dynamic<?>, ? extends NoFeatureConfig> configFactoryIn) { super(configFactoryIn); } @Override public boolean place(IWorld worldIn, ChunkGenerator<? extends GenerationSettings> generator, Random rand, BlockPos pos, NoFeatureConfig config) { if(worldIn.isAirBlock(pos) && worldIn.getBlockState(pos.down()).getBlock() == Blocks.STONE) { worldIn.setBlockState(pos, BlockList.iron_ore_node.getDefaultState(), 2); } return true; } } I am still trying to get them to spawn on cave floors and that should look something like this: Biomes.MOUNTAINS.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Biome.createDecoratedFeature(KenmodFeatures.respawning_iron_feature, IFeatureConfig.NO_FEATURE_CONFIG, Placement.COUNT_EXTRA_HEIGHTMAP, //I dont know what to put here for cave features)); Still need help with the last bit of code above. Thanks.
  5. I updated the code: package com.kenneths_mod.objects.blocks.respawning_ores; import java.util.Random; import com.kenneths_mod.KenmodMain; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.IGrowable; import net.minecraft.state.BooleanProperty; import net.minecraft.state.IntegerProperty; import net.minecraft.state.StateContainer.Builder; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorld; import net.minecraft.world.World; public class RespawningOreNode extends Block implements IGrowable { private static final IntegerProperty STAGE = BlockStateProperties.AGE_0_1; private static final BooleanProperty FILLED = BooleanProperty.create("filled"); public RespawningOreNode(Properties properties) { super(properties); this.setDefaultState(this.stateContainer.getBaseState().with(STAGE, Integer.valueOf(0)).with(FILLED, Boolean.valueOf(true))); } @Override public boolean canGrow(IBlockReader worldIn, BlockPos pos, BlockState state, boolean isClient) { return true; } @Override public boolean canUseBonemeal(World worldIn, Random rand, BlockPos pos, BlockState state) { return true; } @Override public void onPlayerDestroy(IWorld worldIn, BlockPos pos, BlockState state) { KenmodMain.debugString(state.getBlock().getRegistryName().toString()); if(state.get(FILLED) == true) { KenmodMain.debugString("test0: " + worldIn.getBlockState(pos).getBlock().getRegistryName()); worldIn.setBlockState(pos, this.stateContainer.getBaseState().with(STAGE, Integer.valueOf(0)).with(FILLED, Boolean.valueOf(false)), 1); KenmodMain.debugString("test1: " + worldIn.getBlockState(pos).getBlock().getRegistryName()); } } @Override public void grow(World worldIn, Random rand, BlockPos pos, BlockState state) { if (state.get(FILLED) == false) { if(state.get(STAGE) == 0) { worldIn.setBlockState(pos, state.cycle(STAGE), 4); } else { worldIn.setBlockState(pos, state.with(STAGE, Integer.valueOf(0)).with(FILLED, Boolean.valueOf(true))); } } } @Override public boolean isSolid(BlockState state) { return false; } @Override protected void fillStateContainer(Builder<Block, BlockState> builder) { builder.add(STAGE, FILLED); } } The ore can be destroyed and set filled to false, but the ore will not respawn. Also I did the "boxing" thing because it appears that way in vanilla code.
  6. I am making a block that looks like the ore rocks from runescape. Some of these blocks are found on runescape's surface and I was wondering if there is a way to make this block spawn on the surface or on the floors of caves. I also want the rock to be very rare, as when the block is mined it transforms into an "empty ore rock" just like in old school runescape. These rocks will eventually revert back to containing ore in them after a random amount of time has passed. So yeah how would I make these spawn? EDIT: new problem: when the block is mined it completely disapears instead of converting into its empty state: here is the code: package com.kenneths_mod.objects.blocks.respawning_ores; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.IGrowable; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.state.BooleanProperty; import net.minecraft.state.IntegerProperty; import net.minecraft.state.StateContainer.Builder; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockReader; import net.minecraft.world.World; public class RespawningOreNode extends Block implements IGrowable { private static final IntegerProperty STAGE = BlockStateProperties.AGE_0_1; private static final BooleanProperty FILLED = BooleanProperty.create("filled"); public RespawningOreNode(Properties properties) { super(properties); this.setDefaultState(this.stateContainer.getBaseState().with(STAGE, Integer.valueOf(0)).with(FILLED, Boolean.valueOf(true))); } @Override public boolean canGrow(IBlockReader worldIn, BlockPos pos, BlockState state, boolean isClient) { return true; } @Override public boolean canUseBonemeal(World worldIn, Random rand, BlockPos pos, BlockState state) { return true; } @Override public void onBlockHarvested(World worldIn, BlockPos pos, BlockState state, PlayerEntity player) { if(state.get(FILLED) == true) { worldIn.setBlockState(pos, this.stateContainer.getBaseState().with(STAGE, Integer.valueOf(0)).with(FILLED, Boolean.valueOf(false))); } } @Override public void grow(World worldIn, Random rand, BlockPos pos, BlockState state) { if (state.get(FILLED) == false) { if(state.get(STAGE) == 0) { worldIn.setBlockState(pos, state.cycle(STAGE), 4); } else { worldIn.setBlockState(pos, state.with(STAGE, Integer.valueOf(0)).with(FILLED, Boolean.valueOf(true))); } } } @Override protected void fillStateContainer(Builder<Block, BlockState> builder) { builder.add(STAGE, FILLED); } }
  7. I am creating a door that is placed not on the edge of a block (like in vanilla) but rather through the center of the block. This is causing me a couple problems: I need to make a collision system that can detect when the player right clicks on either the lower or upper half of the door (The door is just one block with its collision set to be higher that a normal block) And at the same time allows the player to pass through its collider when the door is in an open state. Here is what I coded so far: package com.kenneths_mod.objects.blocks.doors; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; public class KenmodDoor extends Block { protected static final VoxelShape shape = Block.makeCuboidShape(1, 0, 7, 15, 31, 9); public KenmodDoor(Properties properties) { super(properties); } @Override public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { return shape; } @Override public VoxelShape getCollisionShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { return shape; } } I can't use regular vanilla code because of the way the door is designed so if anyone can help me please do. Thanks.
  8. I made a block that has isSolid marked as false because it is not a full size block and the sides of blocks around it should be rendered. Yet light passes through this block. Any way to prevent light from going through?
  9. Thanks. I might request this be made a feature in minecraft.
  10. I want to make a block that has a light mounted on one side of it. The problem is I do not know how to only light the area in front of the side the torch is facing. Can someone give me an idea or is this even possible to pull off?
  11. NVRMIND, fixed it. It was a misplaced / missing " mark. Thanks anyway. I updated the code above.
  12. I get this error: [m[33m[15:56:03] [Server-Worker-3/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'kenmod:blockstates/oak_log_wall_type_0.json' missing model for variant: 'kenmod:oak_log_wall_type_0#facing=east' [m[33m[15:56:03] [Server-Worker-3/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'kenmod:blockstates/oak_log_wall_type_0.json' missing model for variant: 'kenmod:oak_log_wall_type_0#facing=north' [m[33m[15:56:03] [Server-Worker-3/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'kenmod:blockstates/oak_log_wall_type_0.json' missing model for variant: 'kenmod:oak_log_wall_type_0#facing=south' [m[33m[15:56:03] [Server-Worker-3/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'kenmod:blockstates/oak_log_wall_type_0.json' missing model for variant: 'kenmod:oak_log_wall_type_0#facing=west' [m[33m[15:56:03] [Server-Worker-3/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'kenmod:blockstates/oak_log_wall_type_0.json' in resourcepack: 'Mod Resources': com.google.gson.stream.MalformedJsonException: Expected name at line 7 column 7 path $.variants. And here is what the blockstate file looks like: { "variants": { "facing=north": { "model": "kenmod:block/oak_log_wall_type_0" }, "facing=south": { "model": "kenmod:block/oak_log_wall_type_0", "y": 180 }, "facing=west": { "model": "kenmod:block/oak_log_wall_type_0", "y": 270 }, "facing=east": { "model": "kenmod:block/oak_log_wall_type_0", "y": 90 } } } Here is the log wall block class: package com.kenneths_mod.objects.blocks.walls; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.HorizontalBlock; import net.minecraft.item.BlockItemUseContext; import net.minecraft.state.DirectionProperty; import net.minecraft.state.StateContainer.Builder; import net.minecraft.util.Direction; import net.minecraft.util.Rotation; public class LogWallType0 extends Block { public static final DirectionProperty FACING = HorizontalBlock.HORIZONTAL_FACING; public LogWallType0(Properties properties) { super(properties); this.setDefaultState(this.stateContainer.getBaseState().with(FACING, Direction.NORTH)); } @Override public BlockState getStateForPlacement(BlockItemUseContext context) { return this.getDefaultState().with(FACING, context.getPlacementHorizontalFacing().getOpposite()); } @Override public BlockState rotate(BlockState state, Rotation rot) { return state.with(FACING, rot.rotate(state.get(FACING))); } @Override protected void fillStateContainer(Builder<Block, BlockState> builder) { builder.add(FACING); } } And here is what it looks like when registered: BlockList.oak_log_wall_type_0 = new LogWallType0(Block.Properties.create(Material.WOOD).hardnessAndResistance(3.0F).sound(SoundType.WOOD).harvestTool(ToolType.AXE)).setRegistryName(location("oak_log_wall_type_0")) Here is the model file: { "credit": "Made with Blockbench", "textures": { "0": "block/oak_log", "1": "block/oak_log_top", "2": "block/oak_planks", "particle": "block/oak_log" }, "elements": [ { "from": [0, 12, 5], "to": [16, 13, 11], "faces": { "north": {"uv": [0, 0, 16, 1], "texture": "#2"}, "east": {"uv": [0, 0, 6, 1], "texture": "#2"}, "south": {"uv": [0, 0, 16, 1], "texture": "#2"}, "west": {"uv": [0, 0, 6, 1], "texture": "#2"}, "up": {"uv": [0, 0, 16, 6], "texture": "#2"}, "down": {"uv": [0, 0, 16, 6], "texture": "#2"} } }, { "from": [0, 4, 5], "to": [16, 5, 11], "faces": { "north": {"uv": [0, 0, 16, 1], "texture": "#2"}, "east": {"uv": [0, 0, 6, 1], "texture": "#2"}, "south": {"uv": [0, 0, 16, 1], "texture": "#2"}, "west": {"uv": [0, 0, 6, 1], "texture": "#2"}, "up": {"uv": [0, 0, 16, 6], "texture": "#2"}, "down": {"uv": [0, 0, 16, 6], "texture": "#2"} } }, { "from": [0, 5, 4], "to": [16, 12, 12], "faces": { "north": {"uv": [0, 0, 7, 16], "rotation": 90, "texture": "#0"}, "east": {"uv": [4, 5, 12, 12], "texture": "#1"}, "south": {"uv": [0, 0, 7, 16], "rotation": 90, "texture": "#0"}, "west": {"uv": [4, 5, 12, 12], "texture": "#1"}, "up": {"uv": [0, 0, 8, 16], "rotation": 90, "texture": "#0"}, "down": {"uv": [0, 0, 8, 16], "rotation": 90, "texture": "#0"} } }, { "from": [0, 13, 4], "to": [16, 17, 12], "faces": { "north": {"uv": [0, 0, 4, 16], "rotation": 90, "texture": "#0"}, "east": {"uv": [4, 8, 12, 12], "texture": "#1"}, "south": {"uv": [0, 0, 4, 16], "rotation": 90, "texture": "#0"}, "west": {"uv": [4, 8, 12, 12], "texture": "#1"}, "up": {"uv": [0, 0, 8, 16], "rotation": 90, "texture": "#0"}, "down": {"uv": [0, 0, 8, 16], "rotation": 90, "texture": "#0"} } }, { "from": [0, 0, 4], "to": [16, 4, 12], "faces": { "north": {"uv": [0, 0, 4, 16], "rotation": 90, "texture": "#0"}, "east": {"uv": [4, 4, 12, 8], "texture": "#1"}, "south": {"uv": [0, 0, 4, 16], "rotation": 90, "texture": "#0"}, "west": {"uv": [4, 4, 12, 8], "texture": "#1"}, "up": {"uv": [0, 0, 8, 16], "rotation": 90, "texture": "#0"}, "down": {"uv": [0, 0, 8, 16], "rotation": 90, "texture": "#0"} } } ] } Can anyone explain to me where I went wrong?
  13. I know about for loops, the thing is I do not know how to do the math/code behind "if the first slot runs out find another slot with the same item and use that".
  14. but what if the items they have are spread over multiple slots? what if they have 5 oak boards in one slot, and the other 5 in another slot?
  15. I made a upgradable block similar to the "wooden frame" from 7 days to die. I want it when the player tries to upgrade a wooden frame, it searches the players inventory for if they have: at least 10 oak boards (an item I will add to my mod) and at least 5 iron nails (another item I plan to add) If they have the items, they can then proceed to upgrade the block in which said items will be removed. I am currently searching for a way to implement this. Thanks for any help.
  16. I know about that, i am talking about getting the block to change on the third hit.
  17. This is something I have been wanting to try. If you have not played 7 days to die, well in it is a block called a "wooden frame". Wooden frames are placed in the world and when struck with a stone axe three times is upgraded to an actual wood block that can be used as flooring / walls. Is there any way to replicate this in minecraft?
  18. How do I override the vanilla recipes to craft something else other than what they were meant to craft. EX: logs turn to sticks instead of planks?
  19. Do you still have to register tile entities and containers? Also what if I wanted to add an extra input and output slot?
  20. I am trying to make a new furnace that can not only smelt default recipes, but is the only furnace that can smelt other recipes from my mod such as refining steel. Anyone know any tutorials/documentation?
  21. What do you mean by "display option"?
  22. I want to build a custom model for a anvil / forge in block bench. Last time I used block bench, it was for 1.12.2. Would it still work for 1.14.4?
  23. How do I implement this into my mod?

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.