• Recently Browsing

    No registered users viewing this page.

  • Posts

    • Why on earth?   Only open container GUIs on the server.   Your inventory has 1 slot, but you told a Slot in your container to use the 2nd slot of that inventory.
    • Here is also the code to the tile entity: package com.log_cabin_blocks.objects.blocks.utility_blocks.cooking_utilities.cabin_furnace; import javax.annotation.Nonnull; 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.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.StringTextComponent; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.util.INBTSerializable; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.ItemStackHandler; public class CabinFurnaceTileEntity extends TileEntity implements INamedContainerProvider { private LazyOptional<IItemHandler> handler = LazyOptional.of(this::createHandler); @SuppressWarnings("unchecked") @Override public void read(CompoundNBT tag) { CompoundNBT invTag = tag.getCompound("inv"); handler.ifPresent(h -> ((INBTSerializable<CompoundNBT>)h).deserializeNBT(invTag)); super.read(tag); } @SuppressWarnings("unchecked") @Override public CompoundNBT write(CompoundNBT tag) { handler.ifPresent(h -> { CompoundNBT compound = ((INBTSerializable<CompoundNBT>)h).serializeNBT(); tag.put("inv", compound); }); return super.write(tag); } public CabinFurnaceTileEntity() { super(BlockList.cabin_furnace_tile_entity); } private IItemHandler createHandler () { return new ItemStackHandler(1) { @Override protected void onContentsChanged(int slot) { markDirty(); } @Override public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) { return stack; } }; } @Override public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) { if(cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { return handler.cast(); } return super.getCapability(cap, side); } @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"); } } which I based off the code here:   https://github.com/McJty/YouTubeModding14/blob/master/src/main/java/com/mcjty/mytutorial/blocks/FirstBlockTile.java
    • I originally had: @Override public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { player.openContainer(state.getContainer(worldIn, pos)); return true; } but then changed it to: @Override public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { TileEntity te = worldIn.getTileEntity(pos); if(te instanceof CabinFurnaceTileEntity) { player.openContainer((INamedContainerProvider) te); } return true; } But now get a new error: [m[1;31m[13:49:12] [Server thread/FATAL] [minecraft/ThreadTaskExecutor]: Error executing task on Server java.lang.RuntimeException: Slot 1 not in valid range - [0,1) at net.minecraftforge.items.ItemStackHandler.validateSlotIndex(ItemStackHandler.java:217) ~[?:?] {re:classloading} at net.minecraftforge.items.ItemStackHandler.getStackInSlot(ItemStackHandler.java:73) ~[?:?] {re:classloading} at net.minecraftforge.items.SlotItemHandler.getStack(SlotItemHandler.java:54) ~[?:?] {re:classloading} at net.minecraft.inventory.container.Container.getInventory(Container.java:117) ~[?:?] {re:classloading} at net.minecraft.inventory.container.Container.addListener(Container.java:97) ~[?:?] {re:classloading} at net.minecraft.entity.player.ServerPlayerEntity.openContainer(ServerPlayerEntity.java:866) ~[?:?] {re:classloading,pl:accesstransformer:B} at com.log_cabin_blocks.objects.blocks.utility_blocks.cooking_utilities.cabin_furnace.CabinFurnace.onBlockActivated(CabinFurnace.java:64) ~[?:?] {re:classloading} at net.minecraft.block.BlockState.onBlockActivated(BlockState.java:296) ~[?:?] {re:classloading} at net.minecraft.server.management.PlayerInteractionManager.func_219441_a(PlayerInteractionManager.java:332) ~[?:?] {re:classloading} at net.minecraft.network.play.ServerPlayNetHandler.processTryUseItemOnBlock(ServerPlayNetHandler.java:870) ~[?:?] {re:classloading} at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.processPacket(CPlayerTryUseItemOnBlockPacket.java:42) ~[?:?] {re:classloading} at net.minecraft.network.play.client.CPlayerTryUseItemOnBlockPacket.processPacket(CPlayerTryUseItemOnBlockPacket.java:12) ~[?:?] {re:classloading} at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:19) ~[?:?] {re:classloading} at net.minecraft.util.concurrent.TickDelayedTask.run(TickDelayedTask.java:20) ~[?:?] {re:classloading} at net.minecraft.util.concurrent.ThreadTaskExecutor.run(ThreadTaskExecutor.java:140) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.util.concurrent.RecursiveEventLoop.run(RecursiveEventLoop.java:22) [?:?] {re:classloading} at net.minecraft.util.concurrent.ThreadTaskExecutor.driveOne(ThreadTaskExecutor.java:110) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:726) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.driveOne(MinecraftServer.java:720) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.util.concurrent.ThreadTaskExecutor.drainTasks(ThreadTaskExecutor.java:97) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.runScheduledTasks(MinecraftServer.java:705) [?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:650) [?:?] {re:classloading,pl:accesstransformer:B} at java.lang.Thread.run(Unknown Source) [?:1.8.0_201] {} [m[1;31m[13:49:12] [Client thread/FATAL] [minecraft/ThreadTaskExecutor]: Error executing task on Client java.lang.NullPointerException: null at com.log_cabin_blocks.LogCabinBlocks$RegistryEvents.lambda$1(LogCabinBlocks.java:108) ~[main/:?] {re:classloading} at net.minecraftforge.fml.network.IContainerFactory.create(IContainerFactory.java:34) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading} at net.minecraft.inventory.container.ContainerType.create(ContainerType.java:46) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.client.gui.ScreenManager$IScreenFactory.createScreen(ScreenManager.java:113) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.gui.ScreenManager.lambda$openScreen$0(ScreenManager.java:42) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at java.util.Optional.ifPresent(Unknown Source) ~[?:1.8.0_201] {} at net.minecraft.client.gui.ScreenManager.openScreen(ScreenManager.java:42) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.network.play.ClientPlayNetHandler.func_217272_a(ClientPlayNetHandler.java:1094) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.network.play.server.SOpenWindowPacket.processPacket(SOpenWindowPacket.java:47) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading} at net.minecraft.network.play.server.SOpenWindowPacket.processPacket(SOpenWindowPacket.java:14) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading} at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:19) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading} at net.minecraft.util.concurrent.ThreadTaskExecutor.run(ThreadTaskExecutor.java:140) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.util.concurrent.RecursiveEventLoop.run(RecursiveEventLoop.java:22) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading} at net.minecraft.util.concurrent.ThreadTaskExecutor.driveOne(ThreadTaskExecutor.java:110) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.util.concurrent.ThreadTaskExecutor.drainTasks(ThreadTaskExecutor.java:97) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:896) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.run(Minecraft.java:384) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:128) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_201] {} at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_201] {} at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_201] {} at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_201] {} at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-4.1.0.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-4.1.0.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-4.1.0.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-4.1.0.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-4.1.0.jar:?] {} at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:101) [forge-1.14.4-28.1.70_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {} [m[32m[13:49:13] [Server thread/INFO] [minecraft/IntegratedServer]: Saving and pausing game... [m[32m[13:49:13] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'Test Area 014'/minecraft:overworld [m[36m[13:49:14] [Server thread/DEBUG] [ne.mi.fm.FMLWorldPersistenceHook/WP]: Gathering id map for writing to world save Test Area 014 [m[32m[13:49:14] [Server thread/INFO] [minecraft/ServerPlayNetHandler]: Dev lost connection: Disconnected [m[32m[13:49:14] [Server thread/INFO] [minecraft/MinecraftServer]: Dev left the game [m[32m[13:49:14] [Server thread/INFO] [minecraft/ServerPlayNetHandler]: Stopping singleplayer server as player logged out [m[32m[13:49:14] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping server [m[32m[13:49:14] [Server thread/INFO] [minecraft/MinecraftServer]: Saving players [m[32m[13:49:14] [Server thread/INFO] [minecraft/MinecraftServer]: Saving worlds [m[32m[13:49:14] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'Test Area 014'/minecraft:overworld [m[32m[13:49:15] [Server thread/INFO] [minecraft/ChunkManager]: ThreadedAnvilChunkStorage (Test Area 014): All chunks are saved [m[36m[13:49:15] [Server thread/DEBUG] [ne.mi.fm.FMLWorldPersistenceHook/WP]: Gathering id map for writing to world save Test Area 014 [m[32m[13:49:15] [Server thread/INFO] [minecraft/ChunkManager]: ThreadedAnvilChunkStorage (Test Area 014): All chunks are saved [m[32m[13:49:37] [Client thread/INFO] [minecraft/Minecraft]: Stopping! [m  
    • I Wanted To Play Some Modded Minecraft 1.12.2 And Then I Launched Minecraft But With No Boot screen It Already Crashes I do  not have Optifine And I tried Reinstalling Minecraft And I Tried Removing The Technic Launcher 
    • I've erased the ip in my server.properties but now I cannot connect to the server. I'm kinda lost tbh. When I try to connect the following error pops up:    io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information:   Just realized I can connect with localhost as the Server Address
  • Topics

  • Who's Online (See full list)