Мод не грузит на сервере.

Версия Minecraft
1.12.2
API
Forge
128
4
6
Всем привет. Проблема, мод при загрузки на сервер крашит.
Java:
java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityPlayerSP
    at secrets_of_worlds.inits.BlocksInit.<clinit>(BlocksInit.java:221)
    at secrets_of_worlds.supporting.RegistryHandler.onBlockRegister(RegistryHandler.java:21)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_638_RegistryHandler_onBlockRegister_Register.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:146)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:190)
    at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:852)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:630)
    at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:98)
    at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:336)
    at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:168)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:596)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.entity.EntityPlayerSP
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    ... 13 more
Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@726aa968 from coremod FMLCorePlugin
    at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:262)
    at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)
    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)
    ... 15 more
Caused by: java.lang.RuntimeException: Attempted to load class bud for invalid side SERVER
    at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:62)
    at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:258)
    ... 17 more

//secrets_of_worlds.inits.BlocksInit.<clinit>(BlocksInit.java:221)
вот строка на которую ругается
public static final Block INCENSE_SAPLING = new BasicSapling(Material.PLANTS, "incense_sapling", 0.2f, 1f, "shears", 0, SoundType.PLANT);
 
Java:
import java.util.*;
import net.minecraft.block.*;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.*;
import net.minecraft.block.state.*;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.*;
import net.minecraft.item.*;
import net.minecraft.util.math.*;
import net.minecraft.world.*;
import net.minecraft.world.gen.feature.*;
import net.minecraftforge.event.terraingen.TerrainGen;

import secrets_of_worlds.Main;
import secrets_of_worlds.inits.*;
import secrets_of_worlds.supporting.IHasModel;
import secrets_of_worlds.world.trees.*;

public class BasicSapling extends BlockBush implements IGrowable,IHasModel {

    public static final PropertyInteger STAGE = PropertyInteger.create("stage", 0, 1);
    private static final AxisAlignedBB SAPLING_AABB = new AxisAlignedBB(0.09999999403953552D, 0.0D, 0.09999999403953552D, 0.8999999761581421D, 0.800000011920929D, 0.8999999761581421D);

    public BasicSapling(final Material material, final String name, float hardness,float resistanse, String hravLevel, int level, SoundType soundtype) {
        super(material);
        this.setRegistryName(name);
        this.setUnlocalizedName(name);
        this.setSoundType(soundtype);
        this.setHardness(hardness);
        this.setResistance(resistanse);
        this.setHarvestLevel(hravLevel, level);
        this.setCreativeTab(Main.TAB_BLOCKS);
        this.setDefaultState(this.blockState.getBaseState().withProperty(BasicSapling.STAGE, Integer.valueOf(0)));
        
        BlocksInit.BLOCKS.add(this);
        ItemsInit.ITEMS.add(new ItemBlock(this).setRegistryName(this.getRegistryName()));
    }
    
    public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
        return SAPLING_AABB;
    }
    public void updateTick(World world, BlockPos pos, IBlockState state, Random rand) {
        if (!world.isRemote) {
            super.updateTick(world, pos, state, rand);
            if (world.getLightFromNeighbors(pos.up()) >= 9 && rand.nextInt(7) == 0) {
                this.grow(world, rand, pos, state);
            }
        }
    }
    @Override
    public void grow(World world, Random rand, BlockPos pos, IBlockState state) {
        if (((Integer) state.getValue(BasicSapling.STAGE)).intValue() == 0) {
            world.setBlockState(pos, state.cycleProperty(BasicSapling.STAGE), 4);
        } else {
            this.generateTree(world, pos, state, rand);
        }
    }
    public void generateTree(World world, BlockPos pos, IBlockState state, Random rand) {
        if (TerrainGen.saplingGrowTree(world, rand, pos)) {
            Object worldgenerator = rand.nextInt(10) == 0 ? new WorldGenBigTree(true) : new WorldGenTrees(true);
            int i = 0;
            int j = 0;
            boolean bigTree = false;
            EntityPlayer player = Minecraft.getMinecraft().player;
            IBlockState sapling = Blocks.SAPLING.getDefaultState();
            //----------------------------------------------------------------------------------------------------------------
            if (state.getBlock() == BlocksInit.INCENSE_SAPLING) {
                state = BlocksInit.INCENSE_LOG.getDefaultState();
                sapling = BlocksInit.INCENSE_SAPLING.getDefaultState();
                worldgenerator = new WorldGenIncenseTree(true, false, 5 + rand.nextInt(3));
            }
            if (state.getBlock() == BlocksInit.SNOW_SAPLING) {
                state = BlocksInit.SNOW_LOG.getDefaultState();
                sapling = BlocksInit.SNOW_SAPLING.getDefaultState();
                worldgenerator = new WorldGenSnowTree(true, false, 7 + rand.nextInt(2));
            }
            if (state.getBlock() == BlocksInit.BLOOD_SAPLING) {
                state = BlocksInit.BLOOD_LOG.getDefaultState();
                sapling = BlocksInit.BLOOD_SAPLING.getDefaultState();
                worldgenerator = new WorldGenBloodTree(true, false, 7 + rand.nextInt(2));
            }
            if (state.getBlock() == BlocksInit.BUG_SAPLING) {
                state = BlocksInit.BUG_LOG.getDefaultState();
                sapling = BlocksInit.BUG_SAPLING.getDefaultState();
                worldgenerator = new WorldGenBugTree(true, false, 16);
            }
            
            //----------------------------------------------------------------------------------------------------------------
            
            if (((WorldGenerator) worldgenerator).generate(world, rand, pos.add(i, 0, j))) {
                if (bigTree) {
                    world.setBlockState(pos.add(i, 0, j), state, 2);
                    world.setBlockState(pos.add(i + 1, 0, j), state, 2);
                    world.setBlockState(pos.add(i, 0, j + 1), state, 2);
                    world.setBlockState(pos.add(i + 1, 0, j + 1), state, 2);
                } else {
                    world.setBlockState(pos, state, 2);
                }
            } else if (bigTree) {
                world.setBlockState(pos.add(i, 0, j), sapling, 4);
                world.setBlockState(pos.add(i + 1, 0, j), sapling, 4);
                world.setBlockState(pos.add(i, 0, j + 1), sapling, 4);
                world.setBlockState(pos.add(i + 1, 0, j + 1), sapling, 4);
            } else {
                world.setBlockState(pos, sapling, 4);
            }
        }
    }
    private boolean isTwoByTwoOfType(World world, BlockPos pos, int i, int j) {
        IBlockState sapling = world.getBlockState(pos);
        return this.saplingTypeAt(world, pos.add(i, 0, j)) == sapling.getBlock() && this.saplingTypeAt(world, pos.add(i + 1, 0, j)) == sapling.getBlock() && this.saplingTypeAt(world, pos.add(i, 0, j + 1)) == sapling.getBlock() && this.saplingTypeAt(world, pos.add(i + 1, 0, j + 1)) == sapling.getBlock();
    }
    public Block saplingTypeAt(World world, BlockPos pos) {
        IBlockState sapling = world.getBlockState(pos);
        return sapling.getBlock();
    }
    public boolean canGrow(World world, BlockPos pos, IBlockState state, boolean isClient) {
        return true;
    }
    public boolean canUseBonemeal(World world, Random rand, BlockPos pos, IBlockState state) {
        if(world.getBlockState(pos).getBlock() == BlocksInit.BUG_SAPLING) {
            return false;
        }
        return  (double) world.rand.nextFloat() < 0.45D;
    }
    protected boolean canSustainBush(IBlockState state) {
        return state.getBlock() == Blocks.MYCELIUM ? false : state.getMaterial() == Material.GROUND || state.getMaterial() == Material.GRASS;
    }
    public IBlockState getStateFromMeta(int meta) {
        return this.getDefaultState().withProperty(BasicSapling.STAGE, Integer.valueOf((meta & 8) >> 3));
    }
    public int getMetaFromState(IBlockState state) {
        byte i = 0;
        int i1 = i | ((Integer) state.getValue(BasicSapling.STAGE)).intValue() << 3;
        return i1;
    }
    protected BlockStateContainer createBlockState() {
        return new BlockStateContainer(this, new IProperty[] { BasicSapling.STAGE});
    }
    
    @Override
    public void registerModels() {
        Main.proxy.registerItemRenderer(Item.getItemFromBlock(this), 0, "inventory");
    }
}
 
Назад
Сверху