Jump to content

Yurim64

Members
  • Posts

    103
  • Joined

  • Last visited

Everything posted by Yurim64

  1. Hi! I was wandering is there is a tutorial, or someone who can explain how i can create blocks that are big more than 1 (with collision, custom model ecc..). Thanks.
  2. Ok nothing, i adjust the light value in the TileEntityRenderer and now its fine For the open animation i just see the vanilla code and make it work. Thanks for the help
  3. Ok, now it renders, but with 2 problems: 1 -> It should be bronze color, but it's like on shadow 2 -> How can i animate it like a chest when open?
  4. The Mod Main: https://pastebin.com/ehmkfGN0 The Block Registry: https://pastebin.com/2QPPXvYR The Tile Entity Registry: https://pastebin.com/325NqTgw
  5. This is the TileEntity public class BaseChestTileEntity extends LockableLootTileEntity implements IChestLid, ITickableTileEntity { private NonNullList<ItemStack> inventory; protected float lidAngle; protected float prevLidAngle; protected int numPlayerUsing; private int tickSinceSync; private Supplier<Block> blockToUse; private final int id; protected BaseChestTileEntity(TileEntityType<?> type, Supplier<Block> blockToUse, int id) { super(type); this.id = id; this.inventory = NonNullList.withSize(this.getContainerSize(), ItemStack.EMPTY); this.blockToUse = blockToUse; } @Override protected NonNullList<ItemStack> getItems() { return this.inventory; } @Override protected void setItems(NonNullList<ItemStack> inventory) { this.inventory = inventory; } @Override protected ITextComponent getDefaultName() { return new TranslationTextComponent("container.chest"); } @Override protected Container createMenu(int id, PlayerInventory inventory) { return BaseChestContainer.defaultContainer(id, this, inventory); } @Override public int getContainerSize() { return 27; } @Override public float getOpenNess(float partialTicks) { return MathHelper.lerp(partialTicks, this.prevLidAngle, this.lidAngle); } @Override public void load(BlockState state, CompoundNBT nbt) { super.load(state, nbt); this.inventory = NonNullList.withSize(this.getContainerSize(), ItemStack.EMPTY); if (!this.tryLoadLootTable(nbt)) { ItemStackHelper.loadAllItems(nbt, this.inventory); } } @Override public CompoundNBT save(CompoundNBT nbt) { super.save(nbt); if (!this.trySaveLootTable(nbt)) { ItemStackHelper.saveAllItems(nbt, this.inventory); } return nbt; } @Override public boolean isEmpty() { return this.inventory.isEmpty(); } @Override public void tick() { int i = this.worldPosition.getX(); int j = this.worldPosition.getY(); int k = this.worldPosition.getZ(); ++this.tickSinceSync; this.numPlayerUsing = getNumberOfPlayersUsing(this.level, this, this.tickSinceSync, i, j, k, this.numPlayerUsing); this.prevLidAngle = this.lidAngle; float f = 0.1F; if (this.numPlayerUsing > 0 && this.lidAngle == 0.0F) { this.playSound(SoundEvents.CHEST_OPEN); } if (this.numPlayerUsing == 0 && this.lidAngle > 0.0F || this.numPlayerUsing > 0 && this.lidAngle < 1.0F) { float f1 = this.lidAngle; if (this.numPlayerUsing > 0) { this.lidAngle += 0.1F; } else { this.lidAngle -= 0.1F; } if (this.lidAngle > 1.0F) { this.lidAngle = 1.0F; } float f2 = 0.5F; if (this.lidAngle < 0.5F && f1 >= 0.5F) { this.playSound(SoundEvents.CHEST_CLOSE); } if (this.lidAngle < 0.0F) { this.lidAngle = 0.0F; } } } public static int getNumberOfPlayersUsing(World worldIn, LockableTileEntity lockableTileEntity, int ticksSinceSync, int x, int y, int z, int numPlayersUsing) { if (!worldIn.isClientSide && numPlayersUsing != 0 && (ticksSinceSync + x + y + z) % 200 == 0) { numPlayersUsing = getNumberOfPlayersUsing(worldIn, lockableTileEntity, x, y, z); } return numPlayersUsing; } public static int getNumberOfPlayersUsing(World world, LockableTileEntity lockableTileEntity, int x, int y, int z) { int i = 0; for (PlayerEntity playerentity : world.getEntitiesOfClass(PlayerEntity.class, new AxisAlignedBB((double) ((float) x - 5.0F), (double) ((float) y - 5.0F), (double) ((float) z - 5.0F), (double) ((float) (x + 1) + 5.0F), (double) ((float) (y + 1) + 5.0F), (double) ((float) (z + 1) + 5.0F)))) { if (playerentity.containerMenu instanceof BaseChestContainer) { ++i; } } return i; } private void playSound(SoundEvent soundEvent) { double d0 = (double) this.worldPosition.getX() + 0.5D; double d1 = (double) this.worldPosition.getY() + 0.5D; double d2 = (double) this.worldPosition.getZ() + 0.5D; assert this.level != null; this.level.playSound(null, d0, d1, d2, soundEvent, SoundCategory.BLOCKS, 0.5F, this.level.random.nextFloat() * 0.1F + 0.9F); } public Supplier<Block> getBlockToUse() { return blockToUse; } } This is the Block: public class BaseChestBlock extends Block implements IWaterLoggable { public static final DirectionProperty FACING; public static final BooleanProperty WATERLOGGED; public static final VoxelShape SHAPE; private final Supplier<TileEntityType<? extends TileEntity>> tileEntityTypeSupplier; static { FACING = HorizontalBlock.FACING; WATERLOGGED = BlockStateProperties.WATERLOGGED; SHAPE = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 14.0D, 15.0D); } public BaseChestBlock(Properties properties, Supplier<TileEntityType<? extends TileEntity>> tileEntityTypeSupplier) { super(properties); this.tileEntityTypeSupplier = tileEntityTypeSupplier; this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, Boolean.FALSE)); } @Override public BlockState updateShape(BlockState state, Direction dir, BlockState oldState, IWorld world, BlockPos pos, BlockPos oldPos) { if (state.hasProperty(WATERLOGGED)) { world.getLiquidTicks().scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world)); } return super.updateShape(state, dir, oldState, world, pos, oldPos); } @Override public BlockRenderType getRenderShape(BlockState p_149645_1_) { return BlockRenderType.ENTITYBLOCK_ANIMATED; } @Override public VoxelShape getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) { return SHAPE; } @Nullable @Override public BlockState getStateForPlacement(BlockItemUseContext context) { Direction nearestLookingDirection = context.getNearestLookingDirection(); Direction dir = nearestLookingDirection.getOpposite(); if (dir.equals(Direction.UP) || dir.equals(Direction.DOWN)) dir = Direction.NORTH; FluidState state = context.getLevel().getFluidState(context.getClickedPos()); System.out.println("Dir: " + dir); return this.defaultBlockState().setValue(FACING, dir).setValue(WATERLOGGED, state.getType() == Fluids.WATER); } @Override public FluidState getFluidState(BlockState state) { return state.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(state); } @Override public void onRemove(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) { if (!state.is(newState.getBlock())) { TileEntity tileEntity = world.getBlockEntity(pos); if (tileEntity instanceof IInventory) { InventoryHelper.dropContents(world, pos, (IInventory) tileEntity); world.updateNeighbourForOutputSignal(pos, this); } } super.onRemove(state, world, pos, newState, isMoving); } @Override public void setPlacedBy(World p_180633_1_, BlockPos p_180633_2_, BlockState p_180633_3_, @Nullable LivingEntity p_180633_4_, ItemStack p_180633_5_) { super.setPlacedBy(p_180633_1_, p_180633_2_, p_180633_3_, p_180633_4_, p_180633_5_); } @Override public ActionResultType use(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_) { if (p_225533_2_.isClientSide) { return ActionResultType.SUCCESS; } else { INamedContainerProvider inamedcontainerprovider = this.getMenuProvider(p_225533_1_, p_225533_2_, p_225533_3_); if (inamedcontainerprovider != null) { p_225533_4_.openMenu(inamedcontainerprovider); p_225533_4_.awardStat(this.getOpenChestStat()); PiglinTasks.angerNearbyPiglins(p_225533_4_, true); } return ActionResultType.CONSUME; } } private Stat<ResourceLocation> getOpenChestStat() { return Stats.CUSTOM.get(Stats.OPEN_CHEST); } @Nullable @Override public INamedContainerProvider getMenuProvider(BlockState state, World world, BlockPos pos) { TileEntity entity = world.getBlockEntity(pos); return entity instanceof INamedContainerProvider ? (INamedContainerProvider) entity : null; } @Override public boolean hasTileEntity(BlockState state) { return true; } @Override public boolean triggerEvent(BlockState state, World world, BlockPos pos, int id, int param) { super.triggerEvent(state, world, pos, id, param); TileEntity entity = world.getBlockEntity(pos); return entity != null && entity.triggerEvent(id, param); } private static boolean isBlocked(Object iWorld, Object pos) { IWorld world = (IWorld) iWorld; BlockPos blockPos = (BlockPos) pos; return isBelowSolidBlock(world, blockPos) || isCatSittingOn(world, blockPos); } private static boolean isBelowSolidBlock(IBlockReader iBlockReader, BlockPos worldIn) { BlockPos blockpos = worldIn.above(); return iBlockReader.getBlockState(blockpos).isSolidRender(iBlockReader, blockpos); } private static boolean isCatSittingOn(IWorld iWorld, BlockPos blockPos) { int z = blockPos.getZ(); int y = blockPos.getY(); int x = blockPos.getX(); List<CatEntity> list = iWorld.getEntitiesOfClass(CatEntity.class, new AxisAlignedBB((double) x, (double) (y + 1), (double) z, (double) (x + 1), (double) (y + 2), (double) (z + 1))); if (!list.isEmpty()) { for (CatEntity catentity : list) { if (catentity.isInSittingPose()) { return true; } } } return false; } @Override public boolean hasAnalogOutputSignal(BlockState p_149740_1_) { return true; } @Override public int getAnalogOutputSignal(BlockState state, World world, BlockPos pos) { return Container.getRedstoneSignalFromContainer((IInventory) world.getBlockEntity(pos)); } public BlockState rotate(BlockState state, Rotation rotation) { return state.setValue(FACING, rotation.rotate(state.getValue(FACING))); } public BlockState mirror(BlockState state, Mirror mirror) { return state.rotate(mirror.getRotation(state.getValue(FACING))); } protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) { builder.add(FACING, WATERLOGGED); } public boolean isPathfindable(BlockState state, IBlockReader reader, BlockPos pos, PathType pathType) { return false; } public static Direction getDirectionToAttached(BlockState state) { Direction direction = state.getValue(FACING); return direction.getCounterClockWise(); } @OnlyIn(Dist.CLIENT) public static TileEntityMerger.ICallback<BaseChestTileEntity, Float2FloatFunction> getLid(final IChestLid chestLid) { return new TileEntityMerger.ICallback<BaseChestTileEntity, Float2FloatFunction>() { @Override public Float2FloatFunction acceptDouble(BaseChestTileEntity tileEntity1, BaseChestTileEntity tileEntity2) { return (value) -> Math.max(tileEntity1.getOpenNess(value), tileEntity2.getOpenNess(value)); } @Override public Float2FloatFunction acceptSingle(BaseChestTileEntity tileEntity) { return tileEntity::getOpenNess; } @Override public Float2FloatFunction acceptNone() { return chestLid::getOpenNess; } }; } public TileEntityMerger.ICallbackWrapper<? extends BaseChestTileEntity> getWrapper(BlockState state, World world, BlockPos pos, boolean b) { BiPredicate biPredicate; if (b) { biPredicate = (v1, v2) -> false; } else { biPredicate = BaseChestBlock::isBlocked; } return TileEntityMerger.combineWithNeigbour(this.tileEntityTypeSupplier.get(), BaseChestBlock::getMergerType, BaseChestBlock::getDirectionToAttached, FACING, state, world, pos, biPredicate); } public static TileEntityMerger.Type getMergerType(BlockState blockState) { return TileEntityMerger.Type.SINGLE; } } This is the TileEntityRendered: public class BaseChestTileEntityRendered<T extends TileEntity & IChestLid> extends TileEntityRenderer<T> { private final ModelRenderer chestLid; private final ModelRenderer chestBottom = new ModelRenderer(64, 64, 0, 19); private final ModelRenderer chestLock; private final int id; public BaseChestTileEntityRendered(TileEntityRendererDispatcher dispatcher) { super(dispatcher); this.id = -1; this.chestBottom.addBox(1.0f, 0.0f, 1.0f, 14.0f, 10.0f, 14.0f, 0.0f); this.chestLid = new ModelRenderer(64, 64, 0, 0); this.chestLid.addBox(1.0F, 0.0F, 0.0F, 14.0F, 5.0F, 14.0F, 0.0F); this.chestLid.x = 9.0f; this.chestLid.y = 1.0f; this.chestLock = new ModelRenderer(64, 64, 0, 0); this.chestLock.addBox(7.0f, -1.0f, 15.0f, 2.0f, 4.0f, 1.0f, 0.0f); this.chestLock.x = 8.0f; } @Override public void render(T tileEntity, float partialTicks, MatrixStack matrixStack, IRenderTypeBuffer buffer, int combineLight, int combineOverlay) { BaseChestTileEntity entity = (BaseChestTileEntity) tileEntity; World world = entity.getLevel(); boolean flag = world != null; BlockState state = flag ? entity.getBlockState() : entity.getBlockToUse().get().defaultBlockState().setValue(BaseChestBlock.FACING, Direction.SOUTH); Block block = state.getBlock(); if (block instanceof BaseChestBlock) { BaseChestBlock chest = (BaseChestBlock) block; matrixStack.pushPose(); float f = state.getValue(BaseChestBlock.FACING).toYRot(); matrixStack.translate(0.5D, 0.5D, 0.5D); matrixStack.mulPose(Vector3f.YP.rotationDegrees(-f)); matrixStack.translate(-0.5D, -0.5D, -0.5D); TileEntityMerger.ICallbackWrapper<? extends BaseChestTileEntity> iCallbackWrapper; if (flag) { iCallbackWrapper = chest.getWrapper(state, world, entity.getBlockPos(), true); } else { iCallbackWrapper = TileEntityMerger.ICallback::acceptNone; } float f1 = (iCallbackWrapper.apply(BaseChestBlock.getLid(entity))).get(partialTicks); f1 = 1.0f - f1; f1 = 1.0f - f1 * f1 * f1; int i = (int) (iCallbackWrapper.apply(BaseChestBlock.getLid(entity))).get(combineLight); RenderMaterial material = new RenderMaterial(Atlases.CHEST_SHEET, BaseChestModel.getChestTexture(this.id)); IVertexBuilder vertexBuilder = material.buffer(buffer, RenderType::entityCutout); this.handleModelRender(matrixStack, vertexBuilder, this.chestLid, this.chestLock, this.chestBottom, f1, i, combineOverlay); matrixStack.popPose(); } } private void handleModelRender(MatrixStack matrixStackIn, IVertexBuilder iVertexBuilder, ModelRenderer firstModel, ModelRenderer secondModel, ModelRenderer thirdModel, float f1, int p_228871_7_, int p_228871_8_) { firstModel.xRot = -(f1 * 1.5707964F); secondModel.xRot = firstModel.xRot; firstModel.render(matrixStackIn, iVertexBuilder, p_228871_7_, p_228871_8_); secondModel.render(matrixStackIn, iVertexBuilder, p_228871_7_, p_228871_8_); thirdModel.render(matrixStackIn, iVertexBuilder, p_228871_7_, p_228871_8_); } }
  6. Hi have a custom TileEntity in my mod, but when i place it no model is rendered and i get this message in the console: What could I do?
  7. Hi! Im trying to create a block like an ender chest, so I copied the code from the vanilla, registered the various things and started the game. The problem is that the block appears transparent both in the world and in the inventory. The Block Class: https://pastebin.com/mWkZ0nLU The TileEntityClass: https://pastebin.com/Jy3953EY The TileEntityRenderer Class: https://pastebin.com/WTjrnatD Tile Tile Entity Register: https://pastebin.com/BKdcR8LK JSon: https://pastebin.com/hEGCrq3d Mod Setup: https://pastebin.com/x0xkdqXR
  8. How can i use the RecipeWrapper? I create a new RecipeWrapper with my ItemHandler, but then how can i get the fuel recipe from an item?
  9. So I need implements IItemHandler instead of IInventory? And then how can i get the smelting recipe of an item?
  10. public class SmeltingChestTileEntity extends TileEntity implements IInventory, INamedContainerProvider { private NonNullList<ItemStack> items = NonNullList.withSize(27, ItemStack.EMPTY); public SmeltingChestTileEntity() { super(Blocks.smeltingChestType); } @Override public CompoundNBT save(CompoundNBT nbt) { super.save(nbt); ItemStackHelper.saveAllItems(nbt, this.items); return nbt; } @Override public void load(BlockState state, CompoundNBT nbt) { super.load(state, nbt); this.items = NonNullList.withSize(this.getContainerSize(), ItemStack.EMPTY); ItemStackHelper.loadAllItems(nbt, this.items); } @Override public int getContainerSize() { return 27; } @Override public boolean isEmpty() { return items.isEmpty(); } @Override public ItemStack getItem(int index) { return items.get(index); } @Override public ItemStack removeItem(int index, int quantity) { ItemStack itemStack = items.get(index); if (itemStack.getCount() <= quantity) { items.set(index, ItemStack.EMPTY); return itemStack; } else { int count = itemStack.getCount() - quantity; itemStack.setCount(count); items.set(index, itemStack); return new ItemStack(itemStack.getItem(), count); } } @Override public ItemStack removeItemNoUpdate(int index) { return items.remove(index); } @Override public void setItem(int index, ItemStack stack) { assert this.level != null : "Can't happend"; IRecipe<?> iRecipe = this.level.getRecipeManager().getRecipeFor(IRecipeType.SMELTING, this, this.level).orElse(null); ItemStack toInsert; hasFuel(); if (iRecipe != null && hasFuel()) { ItemStack resultItem = iRecipe.getResultItem(); if (resultItem.equals(ItemStack.EMPTY)) { toInsert = stack; } else { toInsert = resultItem; } } else { toInsert = stack; } this.items.set(index, toInsert); } private boolean hasFuel() { BlockPos blockPos = this.getBlockPos().below(); assert this.level != null; BlockState blockState = this.level.getBlockState(blockPos); BlockState lavaState = net.minecraft.block.Blocks.LAVA.defaultBlockState(); BlockState fireState = net.minecraft.block.Blocks.FIRE.defaultBlockState(); System.out.println(blockState); boolean b = blockState.equals(lavaState) || blockState.equals(fireState); System.out.println("Has fuel? " + b); return b; } @Override public boolean stillValid(PlayerEntity entity) { return true; } @Override public void clearContent() { items.clear(); } @Override public ITextComponent getDisplayName() { return new TranslationTextComponent("smelting_chest"); } @Nullable @Override public Container createMenu(int id, PlayerInventory inventory, PlayerEntity entity) { return ChestContainer.threeRows(id, inventory, this); } } This is the TileEntity class. public class SmeltingChestBlock extends ContainerBlock { public static final DirectionProperty FACING = HorizontalBlock.FACING; public SmeltingChestBlock(Properties p_i48446_1_) { super(p_i48446_1_); this.setRegistryName(TenChest.MODID, "smelting_chest"); Blocks.BLOCKS.add(this); this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH)); } /*public static Direction getConnectedDirection(BlockState p_196311_0_) { Direction direction = p_196311_0_.getValue(FACING); return direction.getClockWise(); }*/ public BlockState getStateForPlacement(BlockItemUseContext p_196258_1_) { Direction direction = p_196258_1_.getHorizontalDirection().getOpposite(); return this.defaultBlockState().setValue(FACING, direction); } public BlockRenderType getRenderShape(BlockState p_149645_1_) { return BlockRenderType.MODEL; } public VoxelShape getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_) { return Block.box(1.0D, 0.0D, 1.0D, 15.0D, 14.0D, 15.0D); } /*@Nullable private Direction candidatePartnerFacing(BlockItemUseContext p_196312_1_, Direction p_196312_2_) { BlockState blockstate = p_196312_1_.getLevel().getBlockState(p_196312_1_.getClickedPos().relative(p_196312_2_)); return blockstate.is(this)? blockstate.getValue(FACING) : null; }*/ protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> p_206840_1_) { p_206840_1_.add(FACING); } @Override public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult rayTrace) { if (world.isClientSide) return ActionResultType.SUCCESS; INamedContainerProvider menuProvider = getMenuProvider(state, world, pos); if (menuProvider != null) { player.openMenu(menuProvider); player.awardStat(Stats.CUSTOM.get(Stats.OPEN_CHEST)); PiglinTasks.angerNearbyPiglins(player, true); } return ActionResultType.CONSUME; } @Nullable @Override public TileEntity newBlockEntity(IBlockReader p_196283_1_) { return new SmeltingChestTileEntity(); } @Override public boolean hasTileEntity(BlockState state) { return true; } @Nullable @Override public TileEntity createTileEntity(BlockState state, IBlockReader world) { return new SmeltingChestTileEntity(); } } This is the block class
  11. Hi! I'm trying to create a custom tileentity that automatically cooks the item inside, but I don't know how to see if the inserted item has a smelting recipe or not. How can i see the recipes? I tried to copy from the FurnaceTileEntity, but the IRecipe result aslways null. @Override public void setItem(int index, ItemStack stack) { assert this.level != null : "Can't happend"; IRecipe<?> iRecipe = this.level.getRecipeManager().getRecipeFor(IRecipeType.SMELTING, this, this.level).orElse(null); ItemStack toInsert; if (iRecipe != null) { ItemStack resultItem = iRecipe.getResultItem(); if (resultItem.equals(ItemStack.EMPTY)) { toInsert = stack; } else { toInsert = resultItem; } } else { toInsert = stack; } this.items.set(index, toInsert); }
  12. Hi, I was trying to create a project for a mod in minecraft 1.7.10, but running the command from windows shell ". \gradlew.bat setupDecompWorkspace" I get this error: I changed the file build.gradle using this link: https://gist.github.com/Arzio/848b8375c4c2ff828d5a7470ac1866b6.
  13. Hello! I would like to create a mod that allows Spawning Zombies by day and with random features (player vision, life, etc..). Can it be done simply with game events? And what events do you recommend to change to do this?
  14. Hi everyone! I'm trying to create a mod on Forge 1.12.2, i installed the mdk version 1.12.2-14.23.5.2855. I setup the mod on Intellij, but when i run the mod the mcmod.info appears to be missing. Here the errors i encounter. [20:39:32] [Client thread/INFO] [FML]: Searching D:\Programmazione\Modding\Minecraft\mods\Fiverr Work\Elemental Power Mod\run\.\mods for mods [20:39:32] [Client thread/DEBUG] [FML]: Examining directory classes for potential mods [20:39:32] [Client thread/DEBUG] [FML]: No mcmod.info file found in directory classes [20:39:32] [Client thread/DEBUG] [FML]: Identified a mod of type Lnet/minecraftforge/fml/common/Mod; (com.example.examplemod.ExampleMod) - loading [20:39:32] [Client thread/DEBUG] [FML]: Examining directory resources for potential mods [20:39:32] [Client thread/DEBUG] [FML]: Found an mcmod.info file in directory resources [20:39:32] [Client thread/DEBUG] [FML]: Examining file forge-1.12.2-14.23.5.2855_mapped_snapshot_20171003-1.12-recomp.jar for potential mods [20:39:32] [Client thread/DEBUG] [FML]: The mod container forge-1.12.2-14.23.5.2855_mapped_snapshot_20171003-1.12-recomp.jar appears to be missing an mcmod.info file [20:39:33] [Client thread/DEBUG] [FML]: Examining file client-extra.jar for potential mods [20:39:33] [Client thread/DEBUG] [FML]: The mod container client-extra.jar appears to be missing an mcmod.info file [20:39:33] [Client thread/DEBUG] [FML]: Examining file jsr305-3.0.1.jar for potential mods [20:39:33] [Client thread/DEBUG] [FML]: The mod container jsr305-3.0.1.jar appears to be missing an mcmod.info file [20:39:33] [Client thread/DEBUG] [FML]: Examining file mergetool-1.0.13-forge.jar for potential mods [20:39:33] [Client thread/DEBUG] [FML]: The mod container mergetool-1.0.13-forge.jar appears to be missing an mcmod.info file [20:39:33] [Client thread/DEBUG] [FML]: Examining file mcp_snapshot-20171003-1.12.zip for potential mods [20:39:33] [Client thread/DEBUG] [FML]: The mod container mcp_snapshot-20171003-1.12.zip appears to be missing an mcmod.info file [20:39:33] [Client thread/DEBUG] [FML]: Examining file asm-debug-all-5.2.jar for potential mods [20:39:33] [Client thread/DEBUG] [FML]: The mod container asm-debug-all-5.2.jar appears to be missing an mcmod.info file [20:39:33] [Client thread/DEBUG] [FML]: Examining file maven-artifact-3.5.3.jar for potential mods [20:39:33] [Client thread/DEBUG] [FML]: The mod container maven-artifact-3.5.3.jar appears to be missing an mcmod.info file [20:39:33] [Client thread/DEBUG] [FML]: Examining file legacydev-0.2.3.1-fatjar.jar for potential mods [20:39:33] [Client thread/DEBUG] [FML]: The mod container legacydev-0.2.3.1-fatjar.jar appears to be missing an mcmod.info file [20:39:33] [Client thread/DEBUG] [FML]: Examining file patchy-1.1.jar for potential mods [20:39:33] [Client thread/DEBUG] [FML]: The mod container patchy-1.1.jar appears to be missing an mcmod.info file [20:39:33] [Client thread/DEBUG] [FML]: Examining file text2speech-1.10.3.jar for potential mods [20:39:33] [Client thread/DEBUG] [FML]: The mod container text2speech-1.10.3.jar appears to be missing an mcmod.info file [20:39:33] [Client thread/DEBUG] [FML]: Examining file text2speech-1.10.3-natives-windows.jar for potential mods [20:39:33] [Client thread/DEBUG] [FML]: The mod container text2speech-1.10.3-natives-windows.jar appears to be missing an mcmod.info file [20:39:33] [Client thread/DEBUG] [FML]: Examining file asm-util-6.2.jar for potential mods [20:39:33] [Client thread/DEBUG] [FML]: The mod container asm-util-6.2.jar appears to be missing an mcmod.info file [20:39:33] [Client thread/ERROR] [FML]: Unable to read a class file correctly java.lang.IllegalArgumentException: null at org.objectweb.asm.ClassReader.<init>(ClassReader.java:185) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:168) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:439) ~[asm-debug-all-5.2.jar:5.2] at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:57) [ASMModParser.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.findClassesASM(JarDiscoverer.java:102) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:77) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.ContainerType.findMods(ContainerType.java:47) [ContainerType.class:?] at net.minecraftforge.fml.common.discovery.ModCandidate.explore(ModCandidate.java:74) [ModCandidate.class:?] at net.minecraftforge.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:93) [ModDiscoverer.class:?] at net.minecraftforge.fml.common.Loader.identifyMods(Loader.java:427) [Loader.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:467) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:378) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] 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_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] at net.minecraftforge.legacydev.Main.start(Main.java:86) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] [20:39:33] [Client thread/ERROR] [FML]: There was a problem reading the entry module-info.class in the jar C:\Users\Ike\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-util\6.2\a9690730f92cc79eeadc20e400ebb41eccce10b1\asm-util-6.2.jar - probably a corrupt zip net.minecraftforge.fml.common.LoaderException: java.lang.IllegalArgumentException at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:63) ~[ASMModParser.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.findClassesASM(JarDiscoverer.java:102) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:77) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.ContainerType.findMods(ContainerType.java:47) [ContainerType.class:?] at net.minecraftforge.fml.common.discovery.ModCandidate.explore(ModCandidate.java:74) [ModCandidate.class:?] at net.minecraftforge.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:93) [ModDiscoverer.class:?] at net.minecraftforge.fml.common.Loader.identifyMods(Loader.java:427) [Loader.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:467) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:378) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] 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_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] at net.minecraftforge.legacydev.Main.start(Main.java:86) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] Caused by: java.lang.IllegalArgumentException at org.objectweb.asm.ClassReader.<init>(ClassReader.java:185) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:168) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:439) ~[asm-debug-all-5.2.jar:5.2] at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:57) ~[ASMModParser.class:?] ... 23 more [20:39:33] [Client thread/WARN] [FML]: Zip file asm-util-6.2.jar failed to read properly, it will be ignored net.minecraftforge.fml.common.LoaderException: java.lang.IllegalArgumentException at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:63) ~[ASMModParser.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.findClassesASM(JarDiscoverer.java:102) ~[JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:77) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.ContainerType.findMods(ContainerType.java:47) [ContainerType.class:?] at net.minecraftforge.fml.common.discovery.ModCandidate.explore(ModCandidate.java:74) [ModCandidate.class:?] at net.minecraftforge.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:93) [ModDiscoverer.class:?] at net.minecraftforge.fml.common.Loader.identifyMods(Loader.java:427) [Loader.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:467) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:378) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] 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_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] at net.minecraftforge.legacydev.Main.start(Main.java:86) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] Caused by: java.lang.IllegalArgumentException at org.objectweb.asm.ClassReader.<init>(ClassReader.java:185) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:168) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:439) ~[asm-debug-all-5.2.jar:5.2] at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:57) ~[ASMModParser.class:?] ... 23 more [20:39:33] [Client thread/DEBUG] [FML]: Examining file asm-analysis-6.2.jar for potential mods [20:39:33] [Client thread/DEBUG] [FML]: The mod container asm-analysis-6.2.jar appears to be missing an mcmod.info file [20:39:33] [Client thread/ERROR] [FML]: Unable to read a class file correctly java.lang.IllegalArgumentException: null at org.objectweb.asm.ClassReader.<init>(ClassReader.java:185) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:168) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:439) ~[asm-debug-all-5.2.jar:5.2] at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:57) [ASMModParser.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.findClassesASM(JarDiscoverer.java:102) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:77) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.ContainerType.findMods(ContainerType.java:47) [ContainerType.class:?] at net.minecraftforge.fml.common.discovery.ModCandidate.explore(ModCandidate.java:74) [ModCandidate.class:?] at net.minecraftforge.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:93) [ModDiscoverer.class:?] at net.minecraftforge.fml.common.Loader.identifyMods(Loader.java:427) [Loader.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:467) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:378) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] 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_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] at net.minecraftforge.legacydev.Main.start(Main.java:86) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] [20:39:33] [Client thread/ERROR] [FML]: There was a problem reading the entry module-info.class in the jar C:\Users\Ike\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-analysis\6.2\c7d9a90d221cbb977848d2c777eb3aa7637e89df\asm-analysis-6.2.jar - probably a corrupt zip net.minecraftforge.fml.common.LoaderException: java.lang.IllegalArgumentException at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:63) ~[ASMModParser.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.findClassesASM(JarDiscoverer.java:102) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:77) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.ContainerType.findMods(ContainerType.java:47) [ContainerType.class:?] at net.minecraftforge.fml.common.discovery.ModCandidate.explore(ModCandidate.java:74) [ModCandidate.class:?] at net.minecraftforge.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:93) [ModDiscoverer.class:?] at net.minecraftforge.fml.common.Loader.identifyMods(Loader.java:427) [Loader.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:467) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:378) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] 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_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] at net.minecraftforge.legacydev.Main.start(Main.java:86) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] Caused by: java.lang.IllegalArgumentException at org.objectweb.asm.ClassReader.<init>(ClassReader.java:185) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:168) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:439) ~[asm-debug-all-5.2.jar:5.2] at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:57) ~[ASMModParser.class:?] ... 23 more [20:39:33] [Client thread/WARN] [FML]: Zip file asm-analysis-6.2.jar failed to read properly, it will be ignored net.minecraftforge.fml.common.LoaderException: java.lang.IllegalArgumentException at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:63) ~[ASMModParser.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.findClassesASM(JarDiscoverer.java:102) ~[JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:77) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.ContainerType.findMods(ContainerType.java:47) [ContainerType.class:?] at net.minecraftforge.fml.common.discovery.ModCandidate.explore(ModCandidate.java:74) [ModCandidate.class:?] at net.minecraftforge.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:93) [ModDiscoverer.class:?] at net.minecraftforge.fml.common.Loader.identifyMods(Loader.java:427) [Loader.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:467) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:378) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] 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_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] at net.minecraftforge.legacydev.Main.start(Main.java:86) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] Caused by: java.lang.IllegalArgumentException at org.objectweb.asm.ClassReader.<init>(ClassReader.java:185) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:168) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:439) ~[asm-debug-all-5.2.jar:5.2] at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:57) ~[ASMModParser.class:?] ... 23 more [20:39:33] [Client thread/DEBUG] [FML]: Examining file asm-tree-6.2.jar for potential mods [20:39:33] [Client thread/DEBUG] [FML]: The mod container asm-tree-6.2.jar appears to be missing an mcmod.info file [20:39:33] [Client thread/ERROR] [FML]: Unable to read a class file correctly java.lang.IllegalArgumentException: null at org.objectweb.asm.ClassReader.<init>(ClassReader.java:185) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:168) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:439) ~[asm-debug-all-5.2.jar:5.2] at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:57) [ASMModParser.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.findClassesASM(JarDiscoverer.java:102) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:77) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.ContainerType.findMods(ContainerType.java:47) [ContainerType.class:?] at net.minecraftforge.fml.common.discovery.ModCandidate.explore(ModCandidate.java:74) [ModCandidate.class:?] at net.minecraftforge.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:93) [ModDiscoverer.class:?] at net.minecraftforge.fml.common.Loader.identifyMods(Loader.java:427) [Loader.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:467) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:378) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] 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_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] at net.minecraftforge.legacydev.Main.start(Main.java:86) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] [20:39:33] [Client thread/ERROR] [FML]: There was a problem reading the entry module-info.class in the jar C:\Users\Ike\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-tree\6.2\61570e046111559f38d4e0e580c005f75988c0a6\asm-tree-6.2.jar - probably a corrupt zip net.minecraftforge.fml.common.LoaderException: java.lang.IllegalArgumentException at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:63) ~[ASMModParser.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.findClassesASM(JarDiscoverer.java:102) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:77) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.ContainerType.findMods(ContainerType.java:47) [ContainerType.class:?] at net.minecraftforge.fml.common.discovery.ModCandidate.explore(ModCandidate.java:74) [ModCandidate.class:?] at net.minecraftforge.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:93) [ModDiscoverer.class:?] at net.minecraftforge.fml.common.Loader.identifyMods(Loader.java:427) [Loader.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:467) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:378) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] 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_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] at net.minecraftforge.legacydev.Main.start(Main.java:86) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] Caused by: java.lang.IllegalArgumentException at org.objectweb.asm.ClassReader.<init>(ClassReader.java:185) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:168) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:439) ~[asm-debug-all-5.2.jar:5.2] at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:57) ~[ASMModParser.class:?] ... 23 more [20:39:33] [Client thread/WARN] [FML]: Zip file asm-tree-6.2.jar failed to read properly, it will be ignored net.minecraftforge.fml.common.LoaderException: java.lang.IllegalArgumentException at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:63) ~[ASMModParser.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.findClassesASM(JarDiscoverer.java:102) ~[JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:77) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.ContainerType.findMods(ContainerType.java:47) [ContainerType.class:?] at net.minecraftforge.fml.common.discovery.ModCandidate.explore(ModCandidate.java:74) [ModCandidate.class:?] at net.minecraftforge.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:93) [ModDiscoverer.class:?] at net.minecraftforge.fml.common.Loader.identifyMods(Loader.java:427) [Loader.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:467) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:378) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] 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_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] at net.minecraftforge.legacydev.Main.start(Main.java:86) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] Caused by: java.lang.IllegalArgumentException at org.objectweb.asm.ClassReader.<init>(ClassReader.java:185) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:168) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:439) ~[asm-debug-all-5.2.jar:5.2] at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:57) ~[ASMModParser.class:?] ... 23 more [20:39:33] [Client thread/DEBUG] [FML]: Examining file asm-6.2.jar for potential mods [20:39:33] [Client thread/DEBUG] [FML]: The mod container asm-6.2.jar appears to be missing an mcmod.info file [20:39:33] [Client thread/ERROR] [FML]: Unable to read a class file correctly java.lang.IllegalArgumentException: null at org.objectweb.asm.ClassReader.<init>(ClassReader.java:185) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:168) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:439) ~[asm-debug-all-5.2.jar:5.2] at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:57) [ASMModParser.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.findClassesASM(JarDiscoverer.java:102) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:77) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.ContainerType.findMods(ContainerType.java:47) [ContainerType.class:?] at net.minecraftforge.fml.common.discovery.ModCandidate.explore(ModCandidate.java:74) [ModCandidate.class:?] at net.minecraftforge.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:93) [ModDiscoverer.class:?] at net.minecraftforge.fml.common.Loader.identifyMods(Loader.java:427) [Loader.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:467) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:378) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] 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_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] at net.minecraftforge.legacydev.Main.start(Main.java:86) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] [20:39:33] [Client thread/ERROR] [FML]: There was a problem reading the entry module-info.class in the jar C:\Users\Ike\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm\6.2\1b6c4ff09ce03f3052429139c2a68e295cae6604\asm-6.2.jar - probably a corrupt zip net.minecraftforge.fml.common.LoaderException: java.lang.IllegalArgumentException at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:63) ~[ASMModParser.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.findClassesASM(JarDiscoverer.java:102) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:77) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.ContainerType.findMods(ContainerType.java:47) [ContainerType.class:?] at net.minecraftforge.fml.common.discovery.ModCandidate.explore(ModCandidate.java:74) [ModCandidate.class:?] at net.minecraftforge.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:93) [ModDiscoverer.class:?] at net.minecraftforge.fml.common.Loader.identifyMods(Loader.java:427) [Loader.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:467) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:378) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] 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_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] at net.minecraftforge.legacydev.Main.start(Main.java:86) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] Caused by: java.lang.IllegalArgumentException at org.objectweb.asm.ClassReader.<init>(ClassReader.java:185) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:168) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:439) ~[asm-debug-all-5.2.jar:5.2] at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:57) ~[ASMModParser.class:?] ... 23 more [20:39:33] [Client thread/WARN] [FML]: Zip file asm-6.2.jar failed to read properly, it will be ignored net.minecraftforge.fml.common.LoaderException: java.lang.IllegalArgumentException at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:63) ~[ASMModParser.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.findClassesASM(JarDiscoverer.java:102) ~[JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:77) [JarDiscoverer.class:?] at net.minecraftforge.fml.common.discovery.ContainerType.findMods(ContainerType.java:47) [ContainerType.class:?] at net.minecraftforge.fml.common.discovery.ModCandidate.explore(ModCandidate.java:74) [ModCandidate.class:?] at net.minecraftforge.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:93) [ModDiscoverer.class:?] at net.minecraftforge.fml.common.Loader.identifyMods(Loader.java:427) [Loader.class:?] at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:568) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:467) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:378) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] 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_231] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231] at net.minecraftforge.legacydev.Main.start(Main.java:86) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23] Caused by: java.lang.IllegalArgumentException at org.objectweb.asm.ClassReader.<init>(ClassReader.java:185) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:168) ~[asm-debug-all-5.2.jar:5.2] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:439) ~[asm-debug-all-5.2.jar:5.2] at net.minecraftforge.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:57) ~[ASMModParser.class:?] ... 23 more
  15. Hi guys, the problem is this: I would like my TileEntity to allow Hoppers to extract only the objects contained from slot 3. Is there any method to return a sub-container from my ItemStackHandler in the getCapability method, or something like that?
  16. yes, but if I do this then I have another problem I was trying to solve. I cannot pass the block direction to TileEntity in the CreateTileEntity method, because the onBlockPlacedBy method, in which I also set the direction, is called later. Any suggestions?
  17. Hi guys, i don't understand why but when i use world.getTileEntity(pos) on a position in which there is a TileEntity setted with world.setTileEntity(pos, entity), it returns me null even if, using debug, the TileEntity exists in the List of the Client and Server World. I leave the class of the block in which I use the two methods. package com.yurim.alotofthings.block; import com.yurim.alotofthings.tileentity.LumberjackTileEntity; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.material.Material; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.inventory.container.INamedContainerProvider; import net.minecraft.item.ItemStack; import net.minecraft.state.StateContainer; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.world.World; import net.minecraftforge.fml.network.NetworkHooks; import javax.annotation.Nullable; /** * @author Yurim * @version 1.0A **/ @SuppressWarnings("NullableProblems") public class Lumberjack extends Block { public Lumberjack() { super(net.minecraft.block.Block.Properties.create(Material.IRON).hardnessAndResistance(2.0f)); } @Override public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { if (!worldIn.isRemote) { TileEntity entity = worldIn.getTileEntity(pos); if (entity instanceof LumberjackTileEntity && entity.getPos().equals(pos)) { NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) entity, entity.getPos()); return true; } } return false; } @Override public void onBlockPlacedBy(World world, BlockPos pos, BlockState state, @Nullable LivingEntity entity, ItemStack stack) { if (entity != null) { Direction direction = getFacingFromEntity(pos, entity); world.setBlockState(pos, state.with(BlockStateProperties.FACING, direction), 2); world.setTileEntity(pos, new LumberjackTileEntity(direction, pos)); } } private static Direction getFacingFromEntity(BlockPos clickedBlock, LivingEntity entity) { return Direction.getFacingFromVector((float) (entity.posX - clickedBlock.getX()), (float) (entity.posY - clickedBlock.getY()), (float) (entity.posZ - clickedBlock.getZ())); } @Override protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) { super.fillStateContainer(builder); builder.add(BlockStateProperties.FACING); } @Override public void onBlockHarvested(World worldIn, BlockPos pos, BlockState state, PlayerEntity player) { TileEntity e = worldIn.getTileEntity(pos); if (e instanceof LumberjackTileEntity) { ((LumberjackTileEntity) e).dropToWorld(worldIn, pos); } super.onBlockHarvested(worldIn, pos, state, player); } }
  18. Yes sorry, it's a GUI. So, how can I do this?
  19. Hypothetically, when you update the digging direction from the guide, the block should start digging in the set direction. The problem is that when I call the changeFacing () method from the button action the direction only changes within the method. When the update is called, the facing variable returns to its original value.
  20. Ok, I update the code but it doesn't work anyway Thi is the new class public class CoalDrillTileEntity extends TileEntity implements ITickable { private int cooldown; private String customName; private ItemStackHandler handler; private boolean isFinished; private EnumFacing facing; private int index = 0; public CoalDrillTileEntity() { this.cooldown = 0; this.customName = "Coal Drill T.1"; this.isFinished = false; this.facing = EnumFacing.DOWN; this.handler = new ItemStackHandler(1); } @Override public void readFromNBT(NBTTagCompound nbt) { this.cooldown = nbt.getInteger("Cooldown"); this.customName = nbt.getString("CustomName"); this.isFinished = nbt.getBoolean("Is Finished"); this.handler.deserializeNBT(nbt.getCompoundTag("ItemStackHandler")); super.readFromNBT(nbt); } @Override public NBTTagCompound writeToNBT(NBTTagCompound nbt) { nbt.setInteger("Cooldown", cooldown); nbt.setBoolean("Is Finished", isFinished); nbt.setString("CustomName", customName); nbt.setTag("ItemStackHandler", handler.serializeNBT()); return super.writeToNBT(nbt); } public String getCustomName() { return customName; } public void setCustomName(String customName) { this.customName = customName; } @Override public void update() { if (!this.world.isRemote && !isFinished) { this.cooldown++; this.cooldown %= 100; if (this.cooldown == 0 && this.getCoal() > 0) { BlockPos pos = this.pos.offset(this.facing); int distance = 0; for (int i = 0; i < 8; distance++) { Block b = this.world.getBlockState(pos).getBlock(); if (distance == 200 || b == Blocks.BEDROCK) { isFinished = true; return; } if (b == Blocks.AIR) { pos = pos.offset(this.facing); continue; } this.world.destroyBlock(pos, false); if (this.world.getBlockState(this.pos.up()).getBlock() == Blocks.CHEST) { ItemStack item = new ItemStack(b.getItemDropped(b.getDefaultState(), new Random(), 0), 1); TileEntityChest chest = (TileEntityChest) this.world.getTileEntity(this.pos.up()); IItemHandler handler = chest.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null); int k = 0; while (k < handler.getSlots() && handler.insertItem(k, item, false) != ItemStack.EMPTY) k++; if (k == handler.getSlots()) b.dropBlockAsItem(this.world, this.pos, b.getDefaultState(), 0); } else { b.dropBlockAsItem(this.world, this.pos, b.getDefaultState(), 0); } pos = pos.offset(this.facing); i++; } } } } public void changeFacing() { index++; if (index == EnumFacing.values().length) index = 0; this.facing = EnumFacing.values()[index]; } public EnumFacing getFacing() { return facing; } private boolean isInventoryFull() { int filledSlots = 0; for (int slot = 0; slot < handler.getSlots(); slot++) { if (handler.getStackInSlot(slot).getCount() == handler.getSlotLimit(slot)) filledSlots++; } return filledSlots == handler.getSlots(); } private int getCoal() { ItemStack stack = this.handler.getStackInSlot(0); if (stack == ItemStack.EMPTY) return 0; else if (stack.getItem() == Items.COAL) { this.handler.extractItem(0, 1, false); return 1; } else return 0; } @Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) return (T) this.handler; return super.getCapability(capability, facing); } @Override public boolean hasCapability(Capability<?> capability, EnumFacing facing) { if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) return true; return super.hasCapability(capability, facing); } @Override public SPacketUpdateTileEntity getUpdatePacket() { NBTTagCompound nbt = new NBTTagCompound(); this.writeToNBT(nbt); int metadata = getBlockMetadata(); return new SPacketUpdateTileEntity(this.pos, metadata, nbt); } @Override public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt) { this.readFromNBT(pkt.getNbtCompound()); } @Override public NBTTagCompound getUpdateTag() { NBTTagCompound nbt = new NBTTagCompound(); this.writeToNBT(nbt); return nbt; } @Override public void handleUpdateTag(NBTTagCompound tag) { this.readFromNBT(tag); } @Override public NBTTagCompound getTileData() { NBTTagCompound nbt = new NBTTagCompound(); this.writeToNBT(nbt); return nbt; } }
  21. Hi guys, I don't know why but my code doesn't work. Thw autodrill should dig a 3x3 area. But when i activate the block to the south or north the block dig a 1x3 area. And when to the up or down dig a cross. But work correctly if i look at west or east. Someone can help me? This is the AutoDrill class public class AutoDrill2 extends Block { private final String name = "autodrill2"; public AutoDrill2() { super(Material.IRON); this.setRegistryName(this.name); this.setUnlocalizedName(this.name); this.setResistance(2.0F); this.setHardness(5.0F); this.setHarvestLevel("pickaxe", 0); } @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { BlockPos newPos = getPos(pos, facing); worldIn.destroyBlock(pos, false); BlockPos[] p = new BlockPos[9]; p = initPositions(p, newPos, facing); for (int i = 0; i < 64; i++) { for (int j = 0; j < p.length; j++) { if (worldIn.getBlockState(p[j]).getBlock() == Blocks.BEDROCK) continue; worldIn.destroyBlock(p[j], true); p[j] = getPos(p[j], facing); } } return super.onBlockActivated(worldIn, pos, state, playerIn, hand, facing, hitX, hitY, hitZ); } private BlockPos[] initPositions(BlockPos[] pos, BlockPos center, EnumFacing facing) { pos[0] = center; pos[1] = center.up(); pos[2] = center.down(); switch (facing) { case DOWN: { pos[1] = new BlockPos(center.getX() + 1, center.getY(), center.getZ()); pos[2] = new BlockPos(center.getX() - 1, center.getY(), center.getZ()); pos[3] = new BlockPos(center.getX(), center.getY(), center.getZ() + 1); pos[4] = new BlockPos(center.getX(), center.getY(), center.getZ() - 1); pos[5] = new BlockPos(center.getX() + 1, center.getY(), center.getZ() + 1); pos[6] = new BlockPos(center.getX() + 1, center.getY(), center.getZ() - 1); pos[7] = new BlockPos(center.getX() - 1, center.getY(), center.getZ() + 1); pos[8] = new BlockPos(center.getX() - 1, center.getY(), center.getZ() - 1); } case UP: { pos[1] = new BlockPos(center.getX() + 1, center.getY(), center.getZ()); pos[2] = new BlockPos(center.getX() - 1, center.getY(), center.getZ()); pos[3] = new BlockPos(center.getX() + 1, center.getY(), center.getZ() + 1); pos[4] = new BlockPos(center.getX() + 1, center.getY(), center.getZ() - 1); pos[5] = new BlockPos(center.getX() - 1, center.getY(), center.getZ() + 1); pos[6] = new BlockPos(center.getX() - 1, center.getY(), center.getZ() - 1); pos[7] = new BlockPos(center.getX(), center.getY(), center.getZ() + 1); pos[8] = new BlockPos(center.getX(), center.getY(), center.getZ() - 1); } case NORTH: { pos[3] = new BlockPos(center.getX() + 1, center.getY(), center.getZ()); pos[4] = new BlockPos(center.getX() - 1, center.getY(), center.getZ()); pos[5] = new BlockPos(center.getX() + 1, center.getY() + 1, center.getZ()); pos[6] = new BlockPos(center.getX() + 1, center.getY() - 1, center.getZ()); pos[7] = new BlockPos(center.getX() - 1, center.getY() + 1, center.getZ()); pos[8] = new BlockPos(center.getX() - 1, center.getY() - 1, center.getZ()); } case SOUTH: { pos[3] = new BlockPos(center.getX() + 1, center.getY(), center.getZ()); pos[4] = new BlockPos(center.getX() - 1, center.getY(), center.getZ()); pos[5] = new BlockPos(center.getX() + 1, center.getY() + 1, center.getZ()); pos[6] = new BlockPos(center.getX() + 1, center.getY() - 1, center.getZ()); pos[7] = new BlockPos(center.getX() - 1, center.getY() + 1, center.getZ()); pos[8] = new BlockPos(center.getX() - 1, center.getY() - 1, center.getZ()); } case EAST: { pos[3] = new BlockPos(center.getX(), center.getY(), center.getZ() + 1); pos[4] = new BlockPos(center.getX(), center.getY(), center.getZ() - 1); pos[5] = new BlockPos(center.getX(), center.getY() + 1, center.getZ() + 1); pos[6] = new BlockPos(center.getX(), center.getY() - 1, center.getZ() + 1); pos[7] = new BlockPos(center.getX(), center.getY() + 1, center.getZ() - 1); pos[8] = new BlockPos(center.getX(), center.getY() - 1, center.getZ() - 1); } case WEST: { pos[3] = new BlockPos(center.getX(), center.getY(), center.getZ() + 1); pos[4] = new BlockPos(center.getX(), center.getY(), center.getZ() - 1); pos[5] = new BlockPos(center.getX(), center.getY() + 1, center.getZ() + 1); pos[6] = new BlockPos(center.getX(), center.getY() - 1, center.getZ() + 1); pos[7] = new BlockPos(center.getX(), center.getY() + 1, center.getZ() - 1); pos[8] = new BlockPos(center.getX(), center.getY() - 1, center.getZ() - 1); } } return pos; } private BlockPos getPos(BlockPos pos, EnumFacing facing) { switch (facing) { case DOWN: { return pos.up(); } case UP: { return pos.down(); } case NORTH: { return pos.south(); } case SOUTH: { return pos.north(); } case EAST: { return pos.west(); } case WEST: { return pos.east(); } } throw new IllegalArgumentException("Invalid Facing " + facing.name()); } }
×
×
  • Create New...

Important Information

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