Jump to content

Xed

Members
  • Posts

    10
  • Joined

  • Last visited

Posts posted by Xed

  1. I am trying to make a tile entity but it gives error.

    My code:

     

    
        public static final DeferredRegister<TileEntityType<?>> TILE_ENTITY_TYPES = new DeferredRegister<>(ForgeRegistries.TILE_ENTITIES,vinl.MOD_ID);
    
    
        public static final RegistryObject<TileEntityType<PowererTileEntity>> POWERER = TILE_ENTITY_TYPES.register("powerer",()->TileEntityType.Builder.create(PowererTileEntity::new, BlockInit.POWERER.get()).build(null));
    
  2. Sorry for the bad explanation
    I am going to explain it  better:I want to make a block like the furnace,that rotates when the player places it.I did the block implementing and it looks cool in the game but its always looking at the same direction(I think north) when I place it.

    This is the class:

    package com.xed.basic.blocks;
    
    
    
    import net.minecraft.block.*;
    import net.minecraft.block.material.Material;
    
    import net.minecraft.item.BlockItemUseContext;
    
    import net.minecraft.state.DirectionProperty;
    import net.minecraft.state.StateContainer;
    import net.minecraft.util.Direction;
    import net.minecraftforge.common.ToolType;
    
    public class Forge extends Block {
    
        public static final DirectionProperty FACING =  HorizontalBlock.HORIZONTAL_FACING;
        public Forge() {
    
    
            super(AbstractBlock.Properties.create(Material.ROCK)
                    .hardnessAndResistance(3.0f,6.0f)
                    .sound(SoundType.STONE)
                    .harvestLevel(3)
                    .harvestTool(ToolType.PICKAXE)
    
                    .func_235861_h_()
            );
            this.setDefaultState(this.stateContainer.getBaseState().with(FACING,Direction.NORTH));
    
    
        }
        @Override
    
        protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder){
            builder.add(FACING);
    
        }
        public BlockState getStateForPlacement(BlockItemUseContext context) {
            return this.getDefaultState().with(FACING, context.getPlacementHorizontalFacing().getOpposite());
        }
    
    }

    And this is the RegistryHandler:

    package com.xed.basic.util;
    
    import com.xed.basic.Basic;
    import com.xed.basic.blocks.BlockItemBase;
    import com.xed.basic.blocks.Forge;
    import com.xed.basic.blocks.MagnificentDiamondOre;
    import com.xed.basic.items.CoinsBase;
    import com.xed.basic.items.DiamondHeart;
    import com.xed.basic.items.ItemBase;
    import net.minecraft.block.Block;
    import net.minecraft.item.Item;
    import net.minecraftforge.fml.RegistryObject;
    import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
    import net.minecraftforge.registries.DeferredRegister;
    import net.minecraftforge.registries.ForgeRegistries;
    
    public class RegistryHandler {
        public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, Basic.MOD_ID);
        public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, Basic.MOD_ID);
    
        public static void init(){
            ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus());
            BLOCKS.register(FMLJavaModLoadingContext.get().getModEventBus());
    
        }
    
        //Items
        public static final RegistryObject<Item> GOLDEN_COIN = ITEMS.register("golden_coin", CoinsBase::new);
        public static final RegistryObject<Item> SILVER_COIN = ITEMS.register("silver_coin", CoinsBase::new);
        public static final RegistryObject<Item> MAGNIFICENT_DIAMOND = ITEMS.register("magnificent_diamond", ItemBase::new);
        //Advanced Items
        public static final RegistryObject<DiamondHeart> DIAMOND_HEART = ITEMS.register("diamond_heart", DiamondHeart::new);
    
    
        //Blocks
        public static final RegistryObject<Block> MAGNIFICENT_DIAMOND_ORE = BLOCKS.register("magnificent_diamond_ore", MagnificentDiamondOre::new);
        public static final RegistryObject<Forge> FORGE = BLOCKS.register("forge",Forge::new);
    
    
        //Block Items
        public static final RegistryObject<Item> MAGNIFICENT_DIAMOND_ORE_ITEM = ITEMS.register("magnificent_diamond_ore", () -> new BlockItemBase(MAGNIFICENT_DIAMOND_ORE.get()));
        public static final RegistryObject<Item> FORGE_ITEM = ITEMS.register("forge", () -> new BlockItemBase(FORGE.get()));
    
    
    }
    

    And the .json model:

    {
      "parent": "block/cube_all",
      "textures": {
        "particle": "basic:/blocks/forge_front",
        "north": "basic:/blocks/forge_front",
        "south": "basic:/blocks/forge_side",
        "east": "basic:/blocks/forge_side",
        "west": "basic:/blocks/forge_side",
        "up": "basic:/blocks/forge_top",
        "down": "basic:/blocks/forge_top"
      }
    }

     

  3. I did it but It doesn't rotate in game.

    package com.xed.basic.blocks;
    
    
    
    import net.minecraft.block.*;
    import net.minecraft.block.material.Material;
    
    import net.minecraft.item.BlockItemUseContext;
    
    import net.minecraft.state.DirectionProperty;
    import net.minecraft.state.StateContainer;
    import net.minecraft.util.Direction;
    import net.minecraftforge.common.ToolType;
    
    public class Forge extends Block {
    
        public static final DirectionProperty FACING =  HorizontalBlock.HORIZONTAL_FACING;
        public Forge() {
    
    
            super(AbstractBlock.Properties.create(Material.ROCK)
                    .hardnessAndResistance(3.0f,6.0f)
                    .sound(SoundType.STONE)
                    .harvestLevel(3)
                    .harvestTool(ToolType.PICKAXE)
    
                    .func_235861_h_()
            );
            this.setDefaultState(this.stateContainer.getBaseState().with(FACING,Direction.NORTH));
    
    
        }
        @Override
        public BlockState getStateForPlacement(BlockItemUseContext context) {
            return this.getDefaultState().with(FACING, context.getPlacementHorizontalFacing().getOpposite());
        }
        protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder){
            builder.add(FACING);
    
        }
    
    }

     

  4. I am having troubles with a block facing player.

    package com.xed.basic.blocks;
    
    
    import net.minecraft.block.*;
    import net.minecraft.block.material.Material;
    
    import net.minecraft.item.BlockItemUseContext;
    import net.minecraft.state.DirectionProperty;
    import net.minecraft.util.Direction;
    import net.minecraftforge.common.ToolType;
    
    public class Forge extends Block {
    
        public static final DirectionProperty FACING =  HorizontalBlock.HORIZONTAL_FACING;
        public Forge() {
    
    
            super(AbstractBlock.Properties.create(Material.ROCK)
                    .hardnessAndResistance(3.0f,6.0f)
                    .sound(SoundType.STONE)
                    .harvestLevel(3)
                    .harvestTool(ToolType.PICKAXE)
    
                    .func_235861_h_()
            );
            this.setDefaultState(this.stateContainer.getBaseState().with(FACING,Direction.NORTH));
    
    
        }
        @Override
        public BlockState getStateForPlacement(BlockItemUseContext context){
        return  this.getDefaultState().with(FACING, context.getPlacementHorizontalFacing().getOpposite());
    
        }
    
    
    }

     

  5. 2 hours ago, Xed said:
    
    modLoader="javafml" #mandatory
    
    # A version range to match for said mod loader - for regular FML @Mod it will be the forge version
    loaderVersion="[32,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
    
    # A URL to refer people to when problems occur with this mod
    issueTrackerURL="http://my.issue.tracker/" #optional
    
    # A list of mods - how many allowed here is determined by the individual mod loader
    [[mods]] 
    
    # The modid of the mod
    modId="tyrl" 
    
    # The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
    version="0.1" #mandatory
    
     # A display name for the mod
    displayName="TyrlMod" #mandatory
    
    # A URL to query for updates for this mod. See the JSON update specification <here>
    updateJSONURL="http://myurl.me/" #optional
    
    # A URL for the "homepage" for this mod, displayed in the mod UI
    displayURL="http://example.com/" #optional
    
    # A file name (in the root of the mod JAR) containing a logo for display
    logoFile="examplemod.png" #optional
    
    # A text field displayed in the mod UI
    credits="Xed" #optional
    
    # A text field displayed in the mod UI
    authors="Xed" #optional
    
    # The description text for the mod (multi line!) (#mandatory)
    description='''
    Hi
    '''
    
    
    
    # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
    [[dependencies.tyrl]] #optional
        # the modid of the dependency
        modId="forge" #mandatory
        # Does this dependency have to exist - if not, ordering below must be specified
        mandatory=true #mandatory
        # The version range of the dependency
        versionRange="[32,)" #mandatory
        # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
        ordering="NONE"
        # Side this dependency is applied on - BOTH, CLIENT or SERVER
        side="BOTH"
        
        
    # Here's another dependency
    [[dependencies.tyrl]]
        modId="minecraft"
        mandatory=true
        versionRange="[1.16.1]"
        ordering="NONE"
        side="BOTH"
    

    I think its the mods.toml but im not sure.

     

    
    [11jul2020 14:24:15.885] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmluserdevclient, --fml.mcpVersion, 20200625.160719, --fml.mcVersion, 1.16.1, --fml.forgeGroup, net.minecraftforge, --fml.forgeVersion, 32.0.62, --version, MOD_DEV, --assetIndex, 1.16, --assetsDir, C:\Users\User\.gradle\caches\forge_gradle\assets, --username, Dev, --accessToken, ????????, --userProperties, {}]
    [11jul2020 14:24:15.893] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 5.1.0+69+master.79f13f7 starting: java version 1.8.0_241 by Oracle Corporation
    [11jul2020 14:24:16.420] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust
    [11jul2020 14:24:18.977] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmluserdevclient' with arguments [--version, MOD_DEV, --gameDir, ., --assetsDir, C:\Users\User\.gradle\caches\forge_gradle\assets, --assetIndex, 1.16, --username, Dev, --accessToken, ????????, --userProperties, {}]
    [11jul2020 14:24:41.018] [Render thread/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', name='PROD'
    [11jul2020 14:24:41.200] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Setting user: Dev
    [11jul2020 14:24:42.024] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Backend library: LWJGL version 3.2.2 build 10
    [11jul2020 14:24:44.123] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: File C:\Users\User\Documents\Mod 1.16.1\bin\main constructed 0 mods: [], but had 1 mods specified: [tyrl]
    [11jul2020 14:24:44.123] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/CORE]: Failed to initialize mod containers
    net.minecraftforge.fml.ModLoadingException: The Mod File C:\Users\User\Documents\Mod 1.16.1\bin\main has mods that were not found
    	at net.minecraftforge.fml.ModLoader.buildMods(ModLoader.java:239) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$19(ModLoader.java:189) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[?:1.8.0_241]
    	at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[?:1.8.0_241]
    	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) ~[?:1.8.0_241]
    	at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:1.8.0_241]
    	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:1.8.0_241]
    	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[?:1.8.0_241]
    	at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:1.8.0_241]
    	at java.util.stream.ReferencePipeline.collect(Unknown Source) ~[?:1.8.0_241]
    	at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:191) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:93) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:109) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:93) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraft.client.Minecraft.<init>(Minecraft.java:430) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraft.client.main.Main.main(Main.java:149) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241]
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241]
    	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.1.0.jar:?]
    	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.1.0.jar:?]
    	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.1.0.jar:?]
    	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.1.0.jar:?]
    	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.1.0.jar:?]
    	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    [11jul2020 14:24:44.150] [Render thread/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted.
    java.lang.Exception: stacktrace
    	at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:278) ~[eventbus-2.2.0-service.jar:?]
    	at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:111) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:93) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraft.client.Minecraft.<init>(Minecraft.java:430) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraft.client.main.Main.main(Main.java:149) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241]
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241]
    	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.1.0.jar:?]
    	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.1.0.jar:?]
    	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.1.0.jar:?]
    	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.1.0.jar:?]
    	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.1.0.jar:?]
    	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    [11jul2020 14:24:49.618] [Render thread/INFO] [com.mojang.text2speech.NarratorWindows/]: Narrator library for x64 successfully loaded
    [11jul2020 14:24:49.877] [Render thread/INFO] [net.minecraft.resources.SimpleReloadableResourceManager/]: Reloading ResourceManager: Default, Mod Resources
    [11jul2020 14:24:49.942] [Worker-Main-4/ERROR] [net.minecraftforge.fml.ModLoader/LOADING]: Skipping lifecycle event SETUP, 1 errors found.
    [11jul2020 14:24:49.942] [Worker-Main-4/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event SETUP, 1 errors found
    [11jul2020 14:24:49.942] [Worker-Main-4/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted.
    java.lang.Exception: stacktrace
    	at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:278) ~[eventbus-2.2.0-service.jar:?]
    	at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:111) ~[?:?]
    	at net.minecraftforge.fml.client.ClientModLoader.startModLoading(ClientModLoader.java:119) ~[?:?]
    	at net.minecraftforge.fml.client.ClientModLoader.lambda$onreload$3(ClientModLoader.java:101) ~[?:?]
    	at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:109) ~[?:?]
    	at java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.CompletableFuture$AsyncRun.exec(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.ForkJoinTask.doExec(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) [?:1.8.0_241]
    [11jul2020 14:25:02.909] [Worker-Main-4/ERROR] [net.minecraftforge.fml.ModLoader/LOADING]: Skipping lifecycle event ENQUEUE_IMC, 1 errors found.
    [11jul2020 14:25:02.909] [Worker-Main-4/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event ENQUEUE_IMC, 1 errors found
    [11jul2020 14:25:02.909] [Worker-Main-4/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted.
    java.lang.Exception: stacktrace
    	at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:278) ~[eventbus-2.2.0-service.jar:?]
    	at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:111) ~[?:?]
    	at net.minecraftforge.fml.client.ClientModLoader.finishModLoading(ClientModLoader.java:133) ~[?:?]
    	at net.minecraftforge.fml.client.ClientModLoader.lambda$onreload$4(ClientModLoader.java:103) ~[?:?]
    	at java.util.concurrent.CompletableFuture.uniRun(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.CompletableFuture$UniRun.tryFire(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.ForkJoinTask.doExec(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) [?:1.8.0_241]
    [11jul2020 14:25:03.437] [Render thread/INFO] [net.minecraft.client.audio.SoundSystem/]: OpenAL initialized.
    [11jul2020 14:25:03.438] [Render thread/INFO] [net.minecraft.client.audio.SoundEngine/SOUNDS]: Sound engine started
    [11jul2020 14:25:03.904] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 1024x512x4 minecraft:textures/atlas/blocks.png-atlas
    [11jul2020 14:25:04.079] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x128x4 minecraft:textures/atlas/signs.png-atlas
    [11jul2020 14:25:04.080] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x512x4 minecraft:textures/atlas/banner_patterns.png-atlas
    [11jul2020 14:25:04.081] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x512x4 minecraft:textures/atlas/shield_patterns.png-atlas
    [11jul2020 14:25:04.095] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas
    [11jul2020 14:25:04.095] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas
    [11jul2020 14:25:04.096] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas
    [11jul2020 14:25:05.238] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas
    [11jul2020 14:25:05.240] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas
    [11jul2020 14:25:05.241] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 128x128x0 minecraft:textures/atlas/mob_effects.png-atlas
    

     

    Also when I run it with cmd it works but in eclipse it give error.

  6. package com.xed.tyrl;
    
    import net.minecraft.block.Block;
    import net.minecraft.block.Blocks;
    import net.minecraftforge.common.MinecraftForge;
    import net.minecraftforge.event.RegistryEvent;
    import net.minecraftforge.eventbus.api.SubscribeEvent;
    import net.minecraftforge.fml.InterModComms;
    import net.minecraftforge.fml.common.Mod;
    import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
    import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
    import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent;
    import net.minecraftforge.fml.event.lifecycle.InterModProcessEvent;
    import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
    import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
    import org.apache.logging.log4j.LogManager;
    import org.apache.logging.log4j.Logger;
    
    import java.util.stream.Collectors;
    
    // The value here should match an entry in the META-INF/mods.toml file
    @Mod("tyrl")
    public class TyrlMod
    {
        // Directly reference a log4j logger.
        private static final Logger LOGGER = LogManager.getLogger();
    
        public TyrlMod() {
            // Register the setup method for modloading
            FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
            // Register the enqueueIMC method for modloading
            FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC);
            // Register the processIMC method for modloading
            FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC);
            // Register the doClientStuff method for modloading
            FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);
    
            // Register ourselves for server and other game events we are interested in
            MinecraftForge.EVENT_BUS.register(this);
        }
    
        private void setup(final FMLCommonSetupEvent event)
        {
            // some preinit code
            LOGGER.info("HELLO FROM PREINIT");
            LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName());
        }
    
        private void doClientStuff(final FMLClientSetupEvent event) {
            // do something that can only be done on the client
            LOGGER.info("Got game settings {}", event.getMinecraftSupplier().get().gameSettings);
        }
    
        private void enqueueIMC(final InterModEnqueueEvent event)
        {
            // some example code to dispatch IMC to another mod
            InterModComms.sendTo("examplemod", "helloworld", () -> { LOGGER.info("Hello world from the MDK"); return "Hello world";});
        }
    
        private void processIMC(final InterModProcessEvent event)
        {
            // some example code to receive and process InterModComms from other mods
            LOGGER.info("Got IMC {}", event.getIMCStream().
                    map(m->m.getMessageSupplier().get()).
                    collect(Collectors.toList()));
        }
        // You can use SubscribeEvent and let the Event Bus discover methods to call
        @SubscribeEvent
        public void onServerStarting(FMLServerStartingEvent event) {
            // do something when the server starts
            LOGGER.info("HELLO from server starting");
        }
    
        // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD
        // Event bus for receiving Registry Events)
        @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
        public static class RegistryEvents {
            @SubscribeEvent
            public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) {
                // register a new block here
                LOGGER.info("HELLO from Register Block");
            }
        }
    }

     

  7. modLoader="javafml" #mandatory
    
    # A version range to match for said mod loader - for regular FML @Mod it will be the forge version
    loaderVersion="[32,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
    
    # A URL to refer people to when problems occur with this mod
    issueTrackerURL="http://my.issue.tracker/" #optional
    
    # A list of mods - how many allowed here is determined by the individual mod loader
    [[mods]] 
    
    # The modid of the mod
    modId="tyrl" 
    
    # The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
    version="0.1" #mandatory
    
     # A display name for the mod
    displayName="TyrlMod" #mandatory
    
    # A URL to query for updates for this mod. See the JSON update specification <here>
    updateJSONURL="http://myurl.me/" #optional
    
    # A URL for the "homepage" for this mod, displayed in the mod UI
    displayURL="http://example.com/" #optional
    
    # A file name (in the root of the mod JAR) containing a logo for display
    logoFile="examplemod.png" #optional
    
    # A text field displayed in the mod UI
    credits="Xed" #optional
    
    # A text field displayed in the mod UI
    authors="Xed" #optional
    
    # The description text for the mod (multi line!) (#mandatory)
    description='''
    Hi
    '''
    
    
    
    # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
    [[dependencies.tyrl]] #optional
        # the modid of the dependency
        modId="forge" #mandatory
        # Does this dependency have to exist - if not, ordering below must be specified
        mandatory=true #mandatory
        # The version range of the dependency
        versionRange="[32,)" #mandatory
        # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
        ordering="NONE"
        # Side this dependency is applied on - BOTH, CLIENT or SERVER
        side="BOTH"
        
        
    # Here's another dependency
    [[dependencies.tyrl]]
        modId="minecraft"
        mandatory=true
        versionRange="[1.16.1]"
        ordering="NONE"
        side="BOTH"
    

    I think its the mods.toml but im not sure.

     

    [11jul2020 14:24:15.885] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmluserdevclient, --fml.mcpVersion, 20200625.160719, --fml.mcVersion, 1.16.1, --fml.forgeGroup, net.minecraftforge, --fml.forgeVersion, 32.0.62, --version, MOD_DEV, --assetIndex, 1.16, --assetsDir, C:\Users\User\.gradle\caches\forge_gradle\assets, --username, Dev, --accessToken, ????????, --userProperties, {}]
    [11jul2020 14:24:15.893] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 5.1.0+69+master.79f13f7 starting: java version 1.8.0_241 by Oracle Corporation
    [11jul2020 14:24:16.420] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust
    [11jul2020 14:24:18.977] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmluserdevclient' with arguments [--version, MOD_DEV, --gameDir, ., --assetsDir, C:\Users\User\.gradle\caches\forge_gradle\assets, --assetIndex, 1.16, --username, Dev, --accessToken, ????????, --userProperties, {}]
    [11jul2020 14:24:41.018] [Render thread/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', name='PROD'
    [11jul2020 14:24:41.200] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Setting user: Dev
    [11jul2020 14:24:42.024] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Backend library: LWJGL version 3.2.2 build 10
    [11jul2020 14:24:44.123] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: File C:\Users\User\Documents\Mod 1.16.1\bin\main constructed 0 mods: [], but had 1 mods specified: [tyrl]
    [11jul2020 14:24:44.123] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/CORE]: Failed to initialize mod containers
    net.minecraftforge.fml.ModLoadingException: The Mod File C:\Users\User\Documents\Mod 1.16.1\bin\main has mods that were not found
    	at net.minecraftforge.fml.ModLoader.buildMods(ModLoader.java:239) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$19(ModLoader.java:189) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[?:1.8.0_241]
    	at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[?:1.8.0_241]
    	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source) ~[?:1.8.0_241]
    	at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:1.8.0_241]
    	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:1.8.0_241]
    	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[?:1.8.0_241]
    	at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:1.8.0_241]
    	at java.util.stream.ReferencePipeline.collect(Unknown Source) ~[?:1.8.0_241]
    	at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:191) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:93) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:109) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:93) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraft.client.Minecraft.<init>(Minecraft.java:430) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraft.client.main.Main.main(Main.java:149) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241]
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241]
    	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.1.0.jar:?]
    	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.1.0.jar:?]
    	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.1.0.jar:?]
    	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.1.0.jar:?]
    	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.1.0.jar:?]
    	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    [11jul2020 14:24:44.150] [Render thread/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted.
    java.lang.Exception: stacktrace
    	at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:278) ~[eventbus-2.2.0-service.jar:?]
    	at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:111) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:93) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraft.client.Minecraft.<init>(Minecraft.java:430) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at net.minecraft.client.main.Main.main(Main.java:149) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241]
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
    	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241]
    	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.1.0.jar:?]
    	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.1.0.jar:?]
    	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.1.0.jar:?]
    	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.1.0.jar:?]
    	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.1.0.jar:?]
    	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.1-32.0.62_mapped_snapshot_20200514-1.16-recomp.jar:?]
    [11jul2020 14:24:49.618] [Render thread/INFO] [com.mojang.text2speech.NarratorWindows/]: Narrator library for x64 successfully loaded
    [11jul2020 14:24:49.877] [Render thread/INFO] [net.minecraft.resources.SimpleReloadableResourceManager/]: Reloading ResourceManager: Default, Mod Resources
    [11jul2020 14:24:49.942] [Worker-Main-4/ERROR] [net.minecraftforge.fml.ModLoader/LOADING]: Skipping lifecycle event SETUP, 1 errors found.
    [11jul2020 14:24:49.942] [Worker-Main-4/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event SETUP, 1 errors found
    [11jul2020 14:24:49.942] [Worker-Main-4/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted.
    java.lang.Exception: stacktrace
    	at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:278) ~[eventbus-2.2.0-service.jar:?]
    	at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:111) ~[?:?]
    	at net.minecraftforge.fml.client.ClientModLoader.startModLoading(ClientModLoader.java:119) ~[?:?]
    	at net.minecraftforge.fml.client.ClientModLoader.lambda$onreload$3(ClientModLoader.java:101) ~[?:?]
    	at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:109) ~[?:?]
    	at java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.CompletableFuture$AsyncRun.exec(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.ForkJoinTask.doExec(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) [?:1.8.0_241]
    [11jul2020 14:25:02.909] [Worker-Main-4/ERROR] [net.minecraftforge.fml.ModLoader/LOADING]: Skipping lifecycle event ENQUEUE_IMC, 1 errors found.
    [11jul2020 14:25:02.909] [Worker-Main-4/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: Failed to complete lifecycle event ENQUEUE_IMC, 1 errors found
    [11jul2020 14:25:02.909] [Worker-Main-4/FATAL] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: EventBus 0 shutting down - future events will not be posted.
    java.lang.Exception: stacktrace
    	at net.minecraftforge.eventbus.EventBus.shutdown(EventBus.java:278) ~[eventbus-2.2.0-service.jar:?]
    	at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:111) ~[?:?]
    	at net.minecraftforge.fml.client.ClientModLoader.finishModLoading(ClientModLoader.java:133) ~[?:?]
    	at net.minecraftforge.fml.client.ClientModLoader.lambda$onreload$4(ClientModLoader.java:103) ~[?:?]
    	at java.util.concurrent.CompletableFuture.uniRun(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.CompletableFuture$UniRun.tryFire(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.ForkJoinTask.doExec(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) [?:1.8.0_241]
    	at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) [?:1.8.0_241]
    [11jul2020 14:25:03.437] [Render thread/INFO] [net.minecraft.client.audio.SoundSystem/]: OpenAL initialized.
    [11jul2020 14:25:03.438] [Render thread/INFO] [net.minecraft.client.audio.SoundEngine/SOUNDS]: Sound engine started
    [11jul2020 14:25:03.904] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 1024x512x4 minecraft:textures/atlas/blocks.png-atlas
    [11jul2020 14:25:04.079] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x128x4 minecraft:textures/atlas/signs.png-atlas
    [11jul2020 14:25:04.080] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x512x4 minecraft:textures/atlas/banner_patterns.png-atlas
    [11jul2020 14:25:04.081] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x512x4 minecraft:textures/atlas/shield_patterns.png-atlas
    [11jul2020 14:25:04.095] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas
    [11jul2020 14:25:04.095] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas
    [11jul2020 14:25:04.096] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas
    [11jul2020 14:25:05.238] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas
    [11jul2020 14:25:05.240] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas
    [11jul2020 14:25:05.241] [Render thread/INFO] [net.minecraft.client.renderer.texture.AtlasTexture/]: Created: 128x128x0 minecraft:textures/atlas/mob_effects.png-atlas
    

     

×
×
  • Create New...

Important Information

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