1.7.3 for 1.7.10 World loads extremely slowly and 0 chunks load.

Started by Diamond.Ken on Wed, 08/15/2018 - 07:16

Topic category: Bugs and solutions

Last seen on 15:14, 16. Aug 2018
Joined Aug 2018
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
1.7.3 for 1.7.10 World loads extremely slowly and 0 chunks load.
Wed, 08/15/2018 - 07:16

As soon as I made a block and checked generate in world. The test world loads extremely slow, I get stuck on the downloading terrain screen though I can hear the minecraft music that you would hear ingame, and when I do get in all i see is the black falling screen then when i click f3 it says no chunks are loading. I really need this ore to generate in world so can someone plz help code is below: 

import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraft.world.World;
import net.minecraft.world.IBlockAccess;
import net.minecraft.util.MathHelper;
import net.minecraft.util.IIcon;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Item;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.client.Minecraft;
import net.minecraft.block.material.Material;
import net.minecraft.block.Block;

import java.util.Random;

import cpw.mods.fml.relauncher.SideOnly;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;

public class mcreator_magiore {

    public mcreator_magiore() {
    }

    public static BlockMagiore block;

    public static Object instance;

    public int addFuel(ItemStack fuel) {
        return 0;
    }

    public void serverLoad(FMLServerStartingEvent event) {
    }

    public void preInit(FMLPreInitializationEvent event) {

        GameRegistry.registerBlock(block, "Magiore");
    }

    public void registerRenderers() {
    }

    public void load() {
    }

    static {

        block = (BlockMagiore) (new BlockMagiore().setHardness(4.5F).setResistance(10.0F).setLightLevel(13.0F).setBlockName("Magiore")
                .setBlockTextureName("MagicOre2").setLightOpacity(0).setStepSound(Block.soundTypeStone).setCreativeTab(CreativeTabs.tabBlock));
        block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
        Block.blockRegistry.addObject(177, "Magiore", block);
        block.setHarvestLevel("pickaxe", 3);
    }

    public void generateSurface(World world, java.util.Random rand, int chunkX, int chunkZ) {
        for (int i = 0; i < 10; i++) {
            int randPosX = chunkX + rand.nextInt(16);
            int randPosY = rand.nextInt(107) + 21;
            int randPosZ = chunkZ + rand.nextInt(16);
            (new WorldGenMinable(mcreator_magiore.block, 16)).generate(world, rand, randPosX, randPosY, randPosZ);
        }
    }

    public void generateNether(World world, Random random, int chunkX, int chunkZ) {
    }

    static class BlockMagiore extends Block {

        int a1 = 0, a2 = 0, a3 = 0, a4 = 0, a5 = 0, a6 = 0;

        Random field_149942_b = new Random();

        IIcon gor = null, dol = null, st1 = null, st2 = null, st3 = null, st4 = null;

        boolean red = false;

        protected BlockMagiore() {
            super(Material.ground);

        }

        public void onBlockAdded(World world, int i, int j, int k) {
            EntityPlayer entity = Minecraft.getMinecraft().thePlayer;
            if (entity != null && world != null) {
                int le = MathHelper.floor_double((double) (entity.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
                world.setBlockMetadataWithNotify(i, j, k, le, 2);
            }

            world.scheduleBlockUpdate(i, j, k, this, this.tickRate(world));

        }

        public int isProvidingStrongPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) {
            return red ? 1 : 0;
        }

        @SideOnly(Side.CLIENT)
        @Override
        public IIcon getIcon(int i, int par2) {

            if (i == 0)
                return gor;

            else if (i == 1)
                return dol;

            else if (i == 2)
                return st1;

            else if (i == 3)
                return st2;

            else if (i == 4)
                return st4;

            else if (i == 5)
                return st3;

            else
                return gor;

        }

        @SideOnly(Side.CLIENT)
        @Override
        public void registerBlockIcons(IIconRegister reg) {
            this.gor = reg.registerIcon("MagicOre2");
            this.dol = reg.registerIcon("MagicOre2");
            this.st1 = reg.registerIcon("MagicOre3");
            this.st2 = reg.registerIcon("Magic Ore");
            this.st3 = reg.registerIcon("MagicOre2");
            this.st4 = reg.registerIcon("MagicOre2");
        }

        public boolean canProvidePower() {
            return true;
        }

        public int getRenderType() {
            return 0;
        }

        @Override
        public int tickRate(World world) {
            return 10;
        }

        public int quantityDropped(Random par1Random) {
            return 1;
        }

        public Item getItemDropped(int par1, Random par2Random, int par3) {
            return mcreator_unrefinedMagicOrb.block;
        }
    }
}