Jump to content

Dimension Making For The First Time


AssassinHero

Recommended Posts

Hey guys,

As the title says I am making a Dimension for the first time

 

I have an issue with teleporting

 

I have an error on this piece of code in my TeleporterParallelWorlds clas

new PortalPosition(this, i, j, k, this.worldServerInstance.getTotalWorldTime()));

 

This is my main:

package assassinhero.parallelworlds;

import assassinhero.parallelworlds.client.ParallelWorldsClientPacketHandler;
import assassinhero.parallelworlds.common.ParallelWorldsCommonProxy;
import assassinhero.parallelworlds.common.ParallelWorldsServerPacketHandler;
import assassinhero.parallelworlds.common.WorldGenerator;
import assassinhero.parallelworlds.common.blocks.BlockArcticiteBlock;
import assassinhero.parallelworlds.common.blocks.BlockAscariteBlock;
import assassinhero.parallelworlds.common.blocks.BlockHeavenlyOre;
import assassinhero.parallelworlds.common.blocks.BlockHellOre;
import assassinhero.parallelworlds.common.blocks.BlockHelliteBlock;
import assassinhero.parallelworlds.common.blocks.BlockNightOre;
import assassinhero.parallelworlds.common.blocks.BlockNightStoneBlock;
import assassinhero.parallelworlds.common.blocks.BlockPortalArcitcite;
import assassinhero.parallelworlds.common.blocks.BlockTimeOre;
import assassinhero.parallelworlds.common.blocks.BlockTimeStoneBlock;
import assassinhero.parallelworlds.common.items.ItemCookedLambChopFood;
import assassinhero.parallelworlds.common.items.ItemDemonicBoots;
import assassinhero.parallelworlds.common.items.ItemDemonicChestplate;
import assassinhero.parallelworlds.common.items.ItemDemonicHelmet;
import assassinhero.parallelworlds.common.items.ItemDemonicLeggings;
import assassinhero.parallelworlds.common.items.ItemDemonicPickaxe;
import assassinhero.parallelworlds.common.items.ItemDemonicShovel;
import assassinhero.parallelworlds.common.items.ItemDemonicSword;
import assassinhero.parallelworlds.common.items.ItemDevilStoneItem;
import assassinhero.parallelworlds.common.items.ItemEnderIngotItem;
import assassinhero.parallelworlds.common.items.ItemEnderShardItem;
import assassinhero.parallelworlds.common.items.ItemHeavenlyIngotItem;
import assassinhero.parallelworlds.common.items.ItemHeavenlyPickaxe;
import assassinhero.parallelworlds.common.items.ItemHellShardItem;
import assassinhero.parallelworlds.common.items.ItemIceShardItem;
import assassinhero.parallelworlds.common.items.ItemIceStoneItem;
import assassinhero.parallelworlds.common.items.ItemMutatedAppleFood;
import assassinhero.parallelworlds.common.items.ItemNightGemItem;
import assassinhero.parallelworlds.common.items.ItemRawLambChopFood;
import assassinhero.parallelworlds.common.items.ItemSapphireAxe;
import assassinhero.parallelworlds.common.items.ItemSapphireItem;
import assassinhero.parallelworlds.common.items.ItemSapphirePickaxe;
import assassinhero.parallelworlds.common.items.ItemSapphireSword;
import assassinhero.parallelworlds.common.items.ItemTimeAxe;
import assassinhero.parallelworlds.common.items.ItemTimeGemItem;
import assassinhero.parallelworlds.common.items.ItemTimePickaxe;
import assassinhero.parallelworlds.common.items.ItemTimeShovel;
import assassinhero.parallelworlds.common.items.ItemTimeSword;
import net.minecraft.block.Block;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.EnumHelper;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;

@NetworkMod(clientSideRequired=true, serverSideRequired= true,
clientPacketHandlerSpec = @cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler(channels = {"ParallelWorlds"} , packetHandler = ParallelWorldsClientPacketHandler.class),
serverPacketHandlerSpec = @cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler(channels = {"ParallelWorlds"} , packetHandler = ParallelWorldsServerPacketHandler.class))

@Mod(modid="Parallel Worlds", name = "ParallelWorlds",version = "1.0.0")


public class ParallelWorlds {

@cpw.mods.fml.common.Mod.Instance("ParallelWorlds")
public static ParallelWorlds Instance = new ParallelWorlds();

@SidedProxy(clientSide = "assassinhero.parallelworlds.client.ParallelWorldsClientProxy", serverSide = "assassinhero.parallelworlds.common.ParallelWorldsCommonProxy")
public static ParallelWorldsCommonProxy proxy;


public static Block Portal;
public static Item EnderIngot;
public static Item DemonicHelmet;
public static Item DemonicChestplate;
public static Item DemonicLeggings;
public static Item DemonicBoots;
public static Item MutatedApple;
public static Item CookedLambChop;
public static Item RawLambChop;
public static Item DemonicShovel;
public static Item DemonicPickaxe;
public static Item DevilStone;
public static Item DemonicSword;
public static Block HellOre;
public static Item HellShard;
public static Item EnderShard;
public static Item SapphireAxe;
public static Item SapphireSword;
public static Item IceStone;
public static Item IceShard;
public static Item HeavenlyPickaxe;
public static Item SapphirePickaxe;
public static Item Sapphire;
public static Item TimePickaxe;
public static Item TimeShovel;
public static Item TimeAxe;
public static Item TimeSword;
public static Block TimeOre;
public static Item AscariteHelmet;
public static Item AscariteChestplate;
public static Item AscariteLeggings;
public static Item AscariteBoots;
public static Block HeavenlyOre;
public static Item HeavenlyIngot;
public static Block Ascarite;
public static Block Hellite;
public static Block Arcticite;
public static Block NightOre;
public static Item TimeGem;
public static Block TimeStone;
public static Block NightStone;
public static Item NightGem;
@cpw.mods.fml.common.Mod.PreInit
public void PreInit(FMLPreInitializationEvent event){
	NightOre = new BlockNightOre(3657).setUnlocalizedName("Night Ore");
	NightStone = new BlockNightStoneBlock(3658).setUnlocalizedName("Night Stone");
	TimeStone = new BlockTimeStoneBlock(3659).setUnlocalizedName("Time Stone");
	Arcticite = new BlockArcticiteBlock(3660).setUnlocalizedName("Arcticite");
	Hellite = new BlockHelliteBlock(3661).setUnlocalizedName("Hellite");
	Ascarite = new BlockAscariteBlock(3662).setUnlocalizedName("Ascarite");
	HeavenlyOre = new BlockHeavenlyOre(3663).setUnlocalizedName("Heavenly Ore");
	TimeOre = new BlockTimeOre(3664).setUnlocalizedName("Time Ore");
	HellOre = new BlockHellOre(3665).setUnlocalizedName("Hell Ore");
	TimeSword = new ItemTimeSword(8000, EnumToolMaterial.TIME).setUnlocalizedName("Time Sword");
	TimePickaxe = new ItemTimePickaxe(8001, EnumToolMaterial.TIME).setUnlocalizedName("Time Pickaxe");
	TimeAxe = new ItemTimeAxe(8002, EnumToolMaterial.TIME).setUnlocalizedName("Time Axe");
	TimeShovel = new ItemTimeShovel(8003, EnumToolMaterial.TIME).setUnlocalizedName("Time Shovel");
	SapphirePickaxe = new ItemSapphirePickaxe(8004, EnumToolMaterial.SAPPHIRE).setUnlocalizedName("Sapphire Pickaxe");
	SapphireSword = new ItemSapphireSword(8005, EnumToolMaterial.SAPPHIRE).setUnlocalizedName("Sapphire Sword");
	SapphireAxe = new ItemSapphireAxe(8006, EnumToolMaterial.SAPPHIRE).setUnlocalizedName("Sapphire Axe");
	HeavenlyPickaxe = new ItemHeavenlyPickaxe(8009, EnumToolMaterial.HEAVENLY).setUnlocalizedName("Heavenly Pickaxe");
	DemonicSword = new ItemDemonicSword(8012, EnumToolMaterial.DEMONIC).setUnlocalizedName("Demonic Sword");
	DemonicPickaxe = new ItemDemonicPickaxe(8013, EnumToolMaterial.DEMONIC).setUnlocalizedName("Demonic Pickaxe");
	DemonicShovel = new ItemDemonicShovel(8014, EnumToolMaterial.DEMONIC).setUnlocalizedName("Demonic Shovel");
	NightGem = new ItemNightGemItem(5000).setUnlocalizedName("Night Gem");
	TimeGem = new ItemTimeGemItem(5001).setUnlocalizedName("Time Gem");
	HeavenlyIngot = new ItemHeavenlyIngotItem(5002).setUnlocalizedName("Heavenly Ingot");
	Sapphire = new ItemSapphireItem(5003).setUnlocalizedName("Sapphire");
	IceShard = new ItemIceShardItem(5004).setUnlocalizedName("Ice Shard");
	IceStone = new ItemIceStoneItem(5005).setUnlocalizedName("Ice Stone");
	EnderShard = new ItemEnderShardItem(5006).setUnlocalizedName("Ender Shard");
	HellShard = new ItemHellShardItem(5007).setUnlocalizedName("Hell Shard");
	DevilStone = new ItemDevilStoneItem(5008).setUnlocalizedName("Devil Stone");
	RawLambChop = new ItemRawLambChopFood(5009, 4, 4.0F, true).setUnlocalizedName("Raw Lamb Chop");
	CookedLambChop = new ItemCookedLambChopFood(5010, 8, 4.0F, true).setUnlocalizedName("Cooked Lamb Chop");
	MutatedApple = new ItemMutatedAppleFood(5011, 5, 2.0F, false).setUnlocalizedName("Mutated Apple");
	EnderIngot = new ItemEnderIngotItem(5012).setUnlocalizedName("Ender Ingot");
	DemonicHelmet = new ItemDemonicHelmet(20000, EnumArmorMaterial.DEMONIC, 8, 0).setUnlocalizedName("Demonic Helmet");
	DemonicChestplate = new ItemDemonicChestplate(20001, EnumArmorMaterial.DEMONIC, 8, 1).setUnlocalizedName("Demonic Chestplate");
	DemonicLeggings = new ItemDemonicLeggings(20002, EnumArmorMaterial.DEMONIC, 7, 2).setUnlocalizedName("Demonic Leggings");
	DemonicBoots = new ItemDemonicBoots(20003, EnumArmorMaterial.DEMONIC, 7, 3).setUnlocalizedName("Demonic Boots");
	Portal = new BlockPortalArcitcite(1000).setUnlocalizedName("Portal");




}

@Init
public void InitParallelWorlds(FMLInitializationEvent event){
	NetworkRegistry.instance().registerGuiHandler(this, proxy);
	proxy.registerBlocks();
	proxy.registerItems();
	craftingRecipes();
	EnumToolMaterial();
	EnumArmorMaterial();
	GameRegistry.registerWorldGenerator(new WorldGenerator());
	smeltingRecipes();
	MinecraftForge.EVENT_BUS.register(new ParallelWorldsSheepDropsEvent());
	DimensionManager();

}

public void craftingRecipes(){
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.NightStone, 1), "XX", "XX", Character.valueOf('X'), ParallelWorlds.NightGem);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.TimeStone, 1 ), "XX", "XX", Character.valueOf('X'), ParallelWorlds.TimeGem); 
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.Arcticite, 1), "XX", "XX", Character.valueOf('X'), Block.blockSnow);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.Ascarite, 1), "XX", "XX", Character.valueOf('X'), ParallelWorlds.HeavenlyIngot);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.TimePickaxe, 1), "XXX", " A ", " A ", Character.valueOf('X'), ParallelWorlds.TimeGem, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.TimeSword, 1), " X ", " X ", " A ", Character.valueOf('X'), ParallelWorlds.TimeGem, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.SapphirePickaxe, 1), "XXX", " A ", " A ", Character.valueOf('X'), ParallelWorlds.Sapphire, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.TimeAxe, 1), "XX ", "XA ", " A ", Character.valueOf('X'), ParallelWorlds.TimeGem, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.HeavenlyPickaxe, 1), "XXX", " A ", " A ", Character.valueOf('X'), ParallelWorlds.HeavenlyIngot, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.IceStone, 1), "XXX", "XXX", "XXX", Character.valueOf('X'), ParallelWorlds.IceShard);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.TimeShovel, 1), " X ", " A ", " A ", Character.valueOf('X'), ParallelWorlds.TimeGem, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.SapphireSword, 1), " X ", " X ", " A ", Character.valueOf('X'), ParallelWorlds.Sapphire, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.SapphireAxe, 1), "XX ", "XA ", " A ", Character.valueOf('X'), ParallelWorlds.Sapphire, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.DemonicSword,1), " X ", " X ", " A ", Character.valueOf('X'), ParallelWorlds.DevilStone, Character.valueOf('A'), Item.blazeRod);
    GameRegistry.addRecipe(new ItemStack(ParallelWorlds.Hellite,1), "XXX", "XXX", "XXX", Character.valueOf('X'), ParallelWorlds.HellShard);
    GameRegistry.addRecipe(new ItemStack(ParallelWorlds.DemonicPickaxe, 1), "XXX", " A ", " A ", Character.valueOf('X'), ParallelWorlds.DevilStone, Character.valueOf('A'), Item.blazeRod);
    GameRegistry.addRecipe(new ItemStack(ParallelWorlds.DemonicHelmet, 1), "   ", "XXX", "X X", Character.valueOf('X'), ParallelWorlds.DevilStone);
    GameRegistry.addRecipe(new ItemStack(ParallelWorlds.DemonicChestplate, 1), "X X", "XXX", "XXX", Character.valueOf('X'), ParallelWorlds.DevilStone);
    GameRegistry.addRecipe(new ItemStack(ParallelWorlds.DemonicLeggings, 1), "XXX", "X X", "X X", Character.valueOf('X'), ParallelWorlds.DevilStone);
    GameRegistry.addRecipe(new ItemStack(ParallelWorlds.DemonicBoots, 1), "   ", "X X", "X X", Character.valueOf('X'), ParallelWorlds.DevilStone);

}


public static void EnumToolMaterial(){
	EnumToolMaterial toolTime = EnumHelper.addToolMaterial("Time", 3, 2000, 10.F, 5, 20);
	EnumToolMaterial toolSapphire = EnumHelper.addToolMaterial("Sapphire", 3, 1500, 9.0F, 10, 10);
	EnumToolMaterial toolHeavenly = EnumHelper.addToolMaterial("Heavenly", 2, 300, 5.0F, 15, 5);
	EnumToolMaterial toolDemonic = EnumHelper.addToolMaterial("Demonic", 3, 0, 15.0F, 20, 30);
	EnumToolMaterial toolEnder = EnumHelper.addToolMaterial("ENDER", 3, 0, 15.0F, 15, 25);


}

public static void EnumArmorMaterial(){
	EnumArmorMaterial armorDemonic = EnumHelper.addArmorMaterial("DEMONIC", 0, new int[]{3, 8, 6, 3}, 20);
}

public void smeltingRecipes(){
	GameRegistry.addSmelting(HeavenlyOre.blockID, new ItemStack(HeavenlyIngot, 1), 0.7F);
	GameRegistry.addSmelting(RawLambChop.itemID, new ItemStack(CookedLambChop, 1), 0.3F);
}




public static int dimension;

public void DimensionManager(){
	DimensionManager.registerProviderType(dimension, WorldProviderArcticite.class, false);
	DimensionManager.registerDimension(dimension, dimension);
}


}








 

This is my portal block class and I have an error under transferPlayerToDimension here:

package assassinhero.parallelworlds.common.blocks;

import java.util.Random;

import assassinhero.parallelworlds.ParallelWorlds;

import net.minecraft.block.Block;
import net.minecraft.block.BlockPortal;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.world.World;

public class BlockPortalArcitcite extends BlockPortal{

public BlockPortalArcitcite(int par1) {
	super(par1);
	setCreativeTab(CreativeTabs.tabBlock);


}

public void registerIcons(IconRegister par1iconregister){
	this.blockIcon = par1iconregister.registerIcon("Portal");
}


 public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
    {
        super.updateTick(par1World, par2, par3, par4, par5Random);



}

 public boolean tryToCreatePortal(World par1World, int par2, int par3, int par4)
    {
        byte b0 = 0;
        byte b1 = 0;

        if (par1World.getBlockId(par2 - 1, par3, par4) == ParallelWorlds.Arcticite.blockID || par1World.getBlockId(par2 + 1, par3, par4) == ParallelWorlds.Arcticite.blockID)
        {
            b0 = 1;
        }

        if (par1World.getBlockId(par2, par3, par4 - 1) == ParallelWorlds.Arcticite.blockID || par1World.getBlockId(par2, par3, par4 + 1) == ParallelWorlds.Arcticite.blockID)
        {
            b1 = 1;
        }

        if (b0 == b1)
        {
            return false;
        }
        else
        {
            if (par1World.getBlockId(par2 - b0, par3, par4 - b1) == 0)
            {
                par2 -= b0;
                par4 -= b1;
            }

            int l;
            int i1;

            for (l = -1; l <= 2; ++l)
            {
                for (i1 = -1; i1 <= 3; ++i1)
                {
                    boolean flag = l == -1 || l == 2 || i1 == -1 || i1 == 3;

                    if (l != -1 && l != 2 || i1 != -1 && i1 != 3)
                    {
                        int j1 = par1World.getBlockId(par2 + b0 * l, par3 + i1, par4 + b1 * l);

                        if (flag)
                        {
                            if (j1 != ParallelWorlds.Arcticite.blockID)
                            {
                                return false;
                            }
                        }
                        else if (j1 != 0 && j1 != Block.fire.blockID)
                        {
                            return false;
                        }
                    }
                }
            }

            for (l = 0; l < 2; ++l)
            {
                for (i1 = 0; i1 < 3; ++i1)
                {
                    par1World.setBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l, ParallelWorlds.Portal.blockID, 0, 2);
                }
            }

            return true;
        }
        
        
     
    }

 public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity){
    
        if (par5Entity.ridingEntity == null && par5Entity.riddenByEntity == null){
        	if(par5Entity instanceof EntityPlayerMP){
        		EntityPlayerMP EntityPlayer = (EntityPlayerMP) par5Entity;
        		if(par5Entity.dimension != ParallelWorlds.dimension){
        			
        			EntityPlayer.mcServer.getConfigurationManager().transferPlayerToDimension(EntityPlayer, ParallelWorlds.dimension, new TeleporterParallelWorlds(EntityPlayer.mcServer.worldServerForDimension(ParallelWorlds.dimension)));
        			
        		}
        		
        		else{
        			
        			EntityPlayer.mcServer.getConfigurationManager().transferPlayerToDimension(EntityPlayer, ParallelWorlds.dimension, new TeleporterParalelWorlds(EntityPlayer.mcServer.worldServerForDimension(0)));
        			
        		}
        	}
       
    }
 }


    public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
    {
        byte b0 = 0;
        byte b1 = 1;

        if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID || par1World.getBlockId(par2 + 1, par3, par4) == this.blockID)
        {
            b0 = 1;
            b1 = 0;
        }

        int i1;

        for (i1 = par3; par1World.getBlockId(par2, i1 - 1, par4) == this.blockID; --i1)
        {
            ;
        }

        if (par1World.getBlockId(par2, i1 - 1, par4) != ParallelWorlds.Arcticite.blockID)
        {
            par1World.setBlockToAir(par2, par3, par4);
        }
        else
        {
            int j1;

            for (j1 = 1; j1 < 4 && par1World.getBlockId(par2, i1 + j1, par4) == this.blockID; ++j1)
            {
                ;
            }

            if (j1 == 3 && par1World.getBlockId(par2, i1 + j1, par4) == ParallelWorlds.Arcticite.blockID)
            {
                boolean flag = par1World.getBlockId(par2 - 1, par3, par4) == this.blockID || par1World.getBlockId(par2 + 1, par3, par4) == this.blockID;
                boolean flag1 = par1World.getBlockId(par2, par3, par4 - 1) == this.blockID || par1World.getBlockId(par2, par3, par4 + 1) == this.blockID;

                if (flag && flag1)
                {
                    par1World.setBlockToAir(par2, par3, par4);
                }
                else
                {
                    if ((par1World.getBlockId(par2 + b0, par3, par4 + b1) != ParallelWorlds.Arcticite.blockID || par1World.getBlockId(par2 - b0, par3, par4 - b1) != this.blockID) && (par1World.getBlockId(par2 - b0, par3, par4 - b1) != ParallelWorlds.Arcticite.blockID || par1World.getBlockId(par2 + b0, par3, par4 + b1) != this.blockID))
                    {
                        par1World.setBlockToAir(par2, par3, par4);
                    }
                }
            }
            else
            {
                par1World.setBlockToAir(par2, par3, par4);
            }
        }
    }




}

 

Lastly, this is my TeleporterParallelWorlds class:

 

package assassinhero.parallelworlds.common.blocks;

import java.util.Random;

import assassinhero.parallelworlds.ParallelWorlds;

import net.minecraft.block.Block;
import net.minecraft.block.BlockPortal;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.world.World;

public class BlockPortalArcitcite extends BlockPortal{

public BlockPortalArcitcite(int par1) {
	super(par1);
	setCreativeTab(CreativeTabs.tabBlock);


}

public void registerIcons(IconRegister par1iconregister){
	this.blockIcon = par1iconregister.registerIcon("Portal");
}


 public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
    {
        super.updateTick(par1World, par2, par3, par4, par5Random);



}

 public boolean tryToCreatePortal(World par1World, int par2, int par3, int par4)
    {
        byte b0 = 0;
        byte b1 = 0;

        if (par1World.getBlockId(par2 - 1, par3, par4) == ParallelWorlds.Arcticite.blockID || par1World.getBlockId(par2 + 1, par3, par4) == ParallelWorlds.Arcticite.blockID)
        {
            b0 = 1;
        }

        if (par1World.getBlockId(par2, par3, par4 - 1) == ParallelWorlds.Arcticite.blockID || par1World.getBlockId(par2, par3, par4 + 1) == ParallelWorlds.Arcticite.blockID)
        {
            b1 = 1;
        }

        if (b0 == b1)
        {
            return false;
        }
        else
        {
            if (par1World.getBlockId(par2 - b0, par3, par4 - b1) == 0)
            {
                par2 -= b0;
                par4 -= b1;
            }

            int l;
            int i1;

            for (l = -1; l <= 2; ++l)
            {
                for (i1 = -1; i1 <= 3; ++i1)
                {
                    boolean flag = l == -1 || l == 2 || i1 == -1 || i1 == 3;

                    if (l != -1 && l != 2 || i1 != -1 && i1 != 3)
                    {
                        int j1 = par1World.getBlockId(par2 + b0 * l, par3 + i1, par4 + b1 * l);

                        if (flag)
                        {
                            if (j1 != ParallelWorlds.Arcticite.blockID)
                            {
                                return false;
                            }
                        }
                        else if (j1 != 0 && j1 != Block.fire.blockID)
                        {
                            return false;
                        }
                    }
                }
            }

            for (l = 0; l < 2; ++l)
            {
                for (i1 = 0; i1 < 3; ++i1)
                {
                    par1World.setBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l, ParallelWorlds.Portal.blockID, 0, 2);
                }
            }

            return true;
        }
        
        
     
    }

 public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity){
    
        if (par5Entity.ridingEntity == null && par5Entity.riddenByEntity == null){
        	if(par5Entity instanceof EntityPlayerMP){
        		EntityPlayerMP EntityPlayer = (EntityPlayerMP) par5Entity;
        		if(par5Entity.dimension != ParallelWorlds.dimension){
        			
        			EntityPlayer.mcServer.getConfigurationManager().transferPlayerToDimension(EntityPlayer, ParallelWorlds.dimension, new TeleporterParallelWorlds(EntityPlayer.mcServer.worldServerForDimension(ParallelWorlds.dimension)));
        			
        		}
        		
        		else{
        			
        			EntityPlayer.mcServer.getConfigurationManager().transferPlayerToDimension(EntityPlayer, ParallelWorlds.dimension, new TeleporterParalelWorlds(EntityPlayer.mcServer.worldServerForDimension(0)));
        			
        		}
        	}
       
    }
 }


    public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
    {
        byte b0 = 0;
        byte b1 = 1;

        if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID || par1World.getBlockId(par2 + 1, par3, par4) == this.blockID)
        {
            b0 = 1;
            b1 = 0;
        }

        int i1;

        for (i1 = par3; par1World.getBlockId(par2, i1 - 1, par4) == this.blockID; --i1)
        {
            ;
        }

        if (par1World.getBlockId(par2, i1 - 1, par4) != ParallelWorlds.Arcticite.blockID)
        {
            par1World.setBlockToAir(par2, par3, par4);
        }
        else
        {
            int j1;

            for (j1 = 1; j1 < 4 && par1World.getBlockId(par2, i1 + j1, par4) == this.blockID; ++j1)
            {
                ;
            }

            if (j1 == 3 && par1World.getBlockId(par2, i1 + j1, par4) == ParallelWorlds.Arcticite.blockID)
            {
                boolean flag = par1World.getBlockId(par2 - 1, par3, par4) == this.blockID || par1World.getBlockId(par2 + 1, par3, par4) == this.blockID;
                boolean flag1 = par1World.getBlockId(par2, par3, par4 - 1) == this.blockID || par1World.getBlockId(par2, par3, par4 + 1) == this.blockID;

                if (flag && flag1)
                {
                    par1World.setBlockToAir(par2, par3, par4);
                }
                else
                {
                    if ((par1World.getBlockId(par2 + b0, par3, par4 + b1) != ParallelWorlds.Arcticite.blockID || par1World.getBlockId(par2 - b0, par3, par4 - b1) != this.blockID) && (par1World.getBlockId(par2 - b0, par3, par4 - b1) != ParallelWorlds.Arcticite.blockID || par1World.getBlockId(par2 + b0, par3, par4 + b1) != this.blockID))
                    {
                        par1World.setBlockToAir(par2, par3, par4);
                    }
                }
            }
            else
            {
                par1World.setBlockToAir(par2, par3, par4);
            }
        }
    }




}

 

 

 

 

 

Any help please?

 

If you need any extra code don't be afraid to ask :)

STOP CRUCIFYING NEW MODDERS!!!!

Link to comment
Share on other sites

Hey guys,

As the title says I am making a Dimension for the first time

 

I have an issue with teleporting

 

I have an error on this piece of code in my TeleporterParallelWorlds clas

new PortalPosition(this, i, j, k, this.worldServerInstance.getTotalWorldTime()));

 

This is my main:

package assassinhero.parallelworlds;

import assassinhero.parallelworlds.client.ParallelWorldsClientPacketHandler;
import assassinhero.parallelworlds.common.ParallelWorldsCommonProxy;
import assassinhero.parallelworlds.common.ParallelWorldsServerPacketHandler;
import assassinhero.parallelworlds.common.WorldGenerator;
import assassinhero.parallelworlds.common.blocks.BlockArcticiteBlock;
import assassinhero.parallelworlds.common.blocks.BlockAscariteBlock;
import assassinhero.parallelworlds.common.blocks.BlockHeavenlyOre;
import assassinhero.parallelworlds.common.blocks.BlockHellOre;
import assassinhero.parallelworlds.common.blocks.BlockHelliteBlock;
import assassinhero.parallelworlds.common.blocks.BlockNightOre;
import assassinhero.parallelworlds.common.blocks.BlockNightStoneBlock;
import assassinhero.parallelworlds.common.blocks.BlockPortalArcitcite;
import assassinhero.parallelworlds.common.blocks.BlockTimeOre;
import assassinhero.parallelworlds.common.blocks.BlockTimeStoneBlock;
import assassinhero.parallelworlds.common.items.ItemCookedLambChopFood;
import assassinhero.parallelworlds.common.items.ItemDemonicBoots;
import assassinhero.parallelworlds.common.items.ItemDemonicChestplate;
import assassinhero.parallelworlds.common.items.ItemDemonicHelmet;
import assassinhero.parallelworlds.common.items.ItemDemonicLeggings;
import assassinhero.parallelworlds.common.items.ItemDemonicPickaxe;
import assassinhero.parallelworlds.common.items.ItemDemonicShovel;
import assassinhero.parallelworlds.common.items.ItemDemonicSword;
import assassinhero.parallelworlds.common.items.ItemDevilStoneItem;
import assassinhero.parallelworlds.common.items.ItemEnderIngotItem;
import assassinhero.parallelworlds.common.items.ItemEnderShardItem;
import assassinhero.parallelworlds.common.items.ItemHeavenlyIngotItem;
import assassinhero.parallelworlds.common.items.ItemHeavenlyPickaxe;
import assassinhero.parallelworlds.common.items.ItemHellShardItem;
import assassinhero.parallelworlds.common.items.ItemIceShardItem;
import assassinhero.parallelworlds.common.items.ItemIceStoneItem;
import assassinhero.parallelworlds.common.items.ItemMutatedAppleFood;
import assassinhero.parallelworlds.common.items.ItemNightGemItem;
import assassinhero.parallelworlds.common.items.ItemRawLambChopFood;
import assassinhero.parallelworlds.common.items.ItemSapphireAxe;
import assassinhero.parallelworlds.common.items.ItemSapphireItem;
import assassinhero.parallelworlds.common.items.ItemSapphirePickaxe;
import assassinhero.parallelworlds.common.items.ItemSapphireSword;
import assassinhero.parallelworlds.common.items.ItemTimeAxe;
import assassinhero.parallelworlds.common.items.ItemTimeGemItem;
import assassinhero.parallelworlds.common.items.ItemTimePickaxe;
import assassinhero.parallelworlds.common.items.ItemTimeShovel;
import assassinhero.parallelworlds.common.items.ItemTimeSword;
import net.minecraft.block.Block;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.EnumHelper;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;

@NetworkMod(clientSideRequired=true, serverSideRequired= true,
clientPacketHandlerSpec = @cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler(channels = {"ParallelWorlds"} , packetHandler = ParallelWorldsClientPacketHandler.class),
serverPacketHandlerSpec = @cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler(channels = {"ParallelWorlds"} , packetHandler = ParallelWorldsServerPacketHandler.class))

@Mod(modid="Parallel Worlds", name = "ParallelWorlds",version = "1.0.0")


public class ParallelWorlds {

@cpw.mods.fml.common.Mod.Instance("ParallelWorlds")
public static ParallelWorlds Instance = new ParallelWorlds();

@SidedProxy(clientSide = "assassinhero.parallelworlds.client.ParallelWorldsClientProxy", serverSide = "assassinhero.parallelworlds.common.ParallelWorldsCommonProxy")
public static ParallelWorldsCommonProxy proxy;


public static Block Portal;
public static Item EnderIngot;
public static Item DemonicHelmet;
public static Item DemonicChestplate;
public static Item DemonicLeggings;
public static Item DemonicBoots;
public static Item MutatedApple;
public static Item CookedLambChop;
public static Item RawLambChop;
public static Item DemonicShovel;
public static Item DemonicPickaxe;
public static Item DevilStone;
public static Item DemonicSword;
public static Block HellOre;
public static Item HellShard;
public static Item EnderShard;
public static Item SapphireAxe;
public static Item SapphireSword;
public static Item IceStone;
public static Item IceShard;
public static Item HeavenlyPickaxe;
public static Item SapphirePickaxe;
public static Item Sapphire;
public static Item TimePickaxe;
public static Item TimeShovel;
public static Item TimeAxe;
public static Item TimeSword;
public static Block TimeOre;
public static Item AscariteHelmet;
public static Item AscariteChestplate;
public static Item AscariteLeggings;
public static Item AscariteBoots;
public static Block HeavenlyOre;
public static Item HeavenlyIngot;
public static Block Ascarite;
public static Block Hellite;
public static Block Arcticite;
public static Block NightOre;
public static Item TimeGem;
public static Block TimeStone;
public static Block NightStone;
public static Item NightGem;
@cpw.mods.fml.common.Mod.PreInit
public void PreInit(FMLPreInitializationEvent event){
	NightOre = new BlockNightOre(3657).setUnlocalizedName("Night Ore");
	NightStone = new BlockNightStoneBlock(3658).setUnlocalizedName("Night Stone");
	TimeStone = new BlockTimeStoneBlock(3659).setUnlocalizedName("Time Stone");
	Arcticite = new BlockArcticiteBlock(3660).setUnlocalizedName("Arcticite");
	Hellite = new BlockHelliteBlock(3661).setUnlocalizedName("Hellite");
	Ascarite = new BlockAscariteBlock(3662).setUnlocalizedName("Ascarite");
	HeavenlyOre = new BlockHeavenlyOre(3663).setUnlocalizedName("Heavenly Ore");
	TimeOre = new BlockTimeOre(3664).setUnlocalizedName("Time Ore");
	HellOre = new BlockHellOre(3665).setUnlocalizedName("Hell Ore");
	TimeSword = new ItemTimeSword(8000, EnumToolMaterial.TIME).setUnlocalizedName("Time Sword");
	TimePickaxe = new ItemTimePickaxe(8001, EnumToolMaterial.TIME).setUnlocalizedName("Time Pickaxe");
	TimeAxe = new ItemTimeAxe(8002, EnumToolMaterial.TIME).setUnlocalizedName("Time Axe");
	TimeShovel = new ItemTimeShovel(8003, EnumToolMaterial.TIME).setUnlocalizedName("Time Shovel");
	SapphirePickaxe = new ItemSapphirePickaxe(8004, EnumToolMaterial.SAPPHIRE).setUnlocalizedName("Sapphire Pickaxe");
	SapphireSword = new ItemSapphireSword(8005, EnumToolMaterial.SAPPHIRE).setUnlocalizedName("Sapphire Sword");
	SapphireAxe = new ItemSapphireAxe(8006, EnumToolMaterial.SAPPHIRE).setUnlocalizedName("Sapphire Axe");
	HeavenlyPickaxe = new ItemHeavenlyPickaxe(8009, EnumToolMaterial.HEAVENLY).setUnlocalizedName("Heavenly Pickaxe");
	DemonicSword = new ItemDemonicSword(8012, EnumToolMaterial.DEMONIC).setUnlocalizedName("Demonic Sword");
	DemonicPickaxe = new ItemDemonicPickaxe(8013, EnumToolMaterial.DEMONIC).setUnlocalizedName("Demonic Pickaxe");
	DemonicShovel = new ItemDemonicShovel(8014, EnumToolMaterial.DEMONIC).setUnlocalizedName("Demonic Shovel");
	NightGem = new ItemNightGemItem(5000).setUnlocalizedName("Night Gem");
	TimeGem = new ItemTimeGemItem(5001).setUnlocalizedName("Time Gem");
	HeavenlyIngot = new ItemHeavenlyIngotItem(5002).setUnlocalizedName("Heavenly Ingot");
	Sapphire = new ItemSapphireItem(5003).setUnlocalizedName("Sapphire");
	IceShard = new ItemIceShardItem(5004).setUnlocalizedName("Ice Shard");
	IceStone = new ItemIceStoneItem(5005).setUnlocalizedName("Ice Stone");
	EnderShard = new ItemEnderShardItem(5006).setUnlocalizedName("Ender Shard");
	HellShard = new ItemHellShardItem(5007).setUnlocalizedName("Hell Shard");
	DevilStone = new ItemDevilStoneItem(5008).setUnlocalizedName("Devil Stone");
	RawLambChop = new ItemRawLambChopFood(5009, 4, 4.0F, true).setUnlocalizedName("Raw Lamb Chop");
	CookedLambChop = new ItemCookedLambChopFood(5010, 8, 4.0F, true).setUnlocalizedName("Cooked Lamb Chop");
	MutatedApple = new ItemMutatedAppleFood(5011, 5, 2.0F, false).setUnlocalizedName("Mutated Apple");
	EnderIngot = new ItemEnderIngotItem(5012).setUnlocalizedName("Ender Ingot");
	DemonicHelmet = new ItemDemonicHelmet(20000, EnumArmorMaterial.DEMONIC, 8, 0).setUnlocalizedName("Demonic Helmet");
	DemonicChestplate = new ItemDemonicChestplate(20001, EnumArmorMaterial.DEMONIC, 8, 1).setUnlocalizedName("Demonic Chestplate");
	DemonicLeggings = new ItemDemonicLeggings(20002, EnumArmorMaterial.DEMONIC, 7, 2).setUnlocalizedName("Demonic Leggings");
	DemonicBoots = new ItemDemonicBoots(20003, EnumArmorMaterial.DEMONIC, 7, 3).setUnlocalizedName("Demonic Boots");
	Portal = new BlockPortalArcitcite(1000).setUnlocalizedName("Portal");




}

@Init
public void InitParallelWorlds(FMLInitializationEvent event){
	NetworkRegistry.instance().registerGuiHandler(this, proxy);
	proxy.registerBlocks();
	proxy.registerItems();
	craftingRecipes();
	EnumToolMaterial();
	EnumArmorMaterial();
	GameRegistry.registerWorldGenerator(new WorldGenerator());
	smeltingRecipes();
	MinecraftForge.EVENT_BUS.register(new ParallelWorldsSheepDropsEvent());
	DimensionManager();

}

public void craftingRecipes(){
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.NightStone, 1), "XX", "XX", Character.valueOf('X'), ParallelWorlds.NightGem);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.TimeStone, 1 ), "XX", "XX", Character.valueOf('X'), ParallelWorlds.TimeGem); 
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.Arcticite, 1), "XX", "XX", Character.valueOf('X'), Block.blockSnow);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.Ascarite, 1), "XX", "XX", Character.valueOf('X'), ParallelWorlds.HeavenlyIngot);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.TimePickaxe, 1), "XXX", " A ", " A ", Character.valueOf('X'), ParallelWorlds.TimeGem, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.TimeSword, 1), " X ", " X ", " A ", Character.valueOf('X'), ParallelWorlds.TimeGem, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.SapphirePickaxe, 1), "XXX", " A ", " A ", Character.valueOf('X'), ParallelWorlds.Sapphire, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.TimeAxe, 1), "XX ", "XA ", " A ", Character.valueOf('X'), ParallelWorlds.TimeGem, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.HeavenlyPickaxe, 1), "XXX", " A ", " A ", Character.valueOf('X'), ParallelWorlds.HeavenlyIngot, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.IceStone, 1), "XXX", "XXX", "XXX", Character.valueOf('X'), ParallelWorlds.IceShard);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.TimeShovel, 1), " X ", " A ", " A ", Character.valueOf('X'), ParallelWorlds.TimeGem, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.SapphireSword, 1), " X ", " X ", " A ", Character.valueOf('X'), ParallelWorlds.Sapphire, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.SapphireAxe, 1), "XX ", "XA ", " A ", Character.valueOf('X'), ParallelWorlds.Sapphire, Character.valueOf('A'), Item.stick);
	GameRegistry.addRecipe(new ItemStack(ParallelWorlds.DemonicSword,1), " X ", " X ", " A ", Character.valueOf('X'), ParallelWorlds.DevilStone, Character.valueOf('A'), Item.blazeRod);
    GameRegistry.addRecipe(new ItemStack(ParallelWorlds.Hellite,1), "XXX", "XXX", "XXX", Character.valueOf('X'), ParallelWorlds.HellShard);
    GameRegistry.addRecipe(new ItemStack(ParallelWorlds.DemonicPickaxe, 1), "XXX", " A ", " A ", Character.valueOf('X'), ParallelWorlds.DevilStone, Character.valueOf('A'), Item.blazeRod);
    GameRegistry.addRecipe(new ItemStack(ParallelWorlds.DemonicHelmet, 1), "   ", "XXX", "X X", Character.valueOf('X'), ParallelWorlds.DevilStone);
    GameRegistry.addRecipe(new ItemStack(ParallelWorlds.DemonicChestplate, 1), "X X", "XXX", "XXX", Character.valueOf('X'), ParallelWorlds.DevilStone);
    GameRegistry.addRecipe(new ItemStack(ParallelWorlds.DemonicLeggings, 1), "XXX", "X X", "X X", Character.valueOf('X'), ParallelWorlds.DevilStone);
    GameRegistry.addRecipe(new ItemStack(ParallelWorlds.DemonicBoots, 1), "   ", "X X", "X X", Character.valueOf('X'), ParallelWorlds.DevilStone);

}


public static void EnumToolMaterial(){
	EnumToolMaterial toolTime = EnumHelper.addToolMaterial("Time", 3, 2000, 10.F, 5, 20);
	EnumToolMaterial toolSapphire = EnumHelper.addToolMaterial("Sapphire", 3, 1500, 9.0F, 10, 10);
	EnumToolMaterial toolHeavenly = EnumHelper.addToolMaterial("Heavenly", 2, 300, 5.0F, 15, 5);
	EnumToolMaterial toolDemonic = EnumHelper.addToolMaterial("Demonic", 3, 0, 15.0F, 20, 30);
	EnumToolMaterial toolEnder = EnumHelper.addToolMaterial("ENDER", 3, 0, 15.0F, 15, 25);


}

public static void EnumArmorMaterial(){
	EnumArmorMaterial armorDemonic = EnumHelper.addArmorMaterial("DEMONIC", 0, new int[]{3, 8, 6, 3}, 20);
}

public void smeltingRecipes(){
	GameRegistry.addSmelting(HeavenlyOre.blockID, new ItemStack(HeavenlyIngot, 1), 0.7F);
	GameRegistry.addSmelting(RawLambChop.itemID, new ItemStack(CookedLambChop, 1), 0.3F);
}




public static int dimension;

public void DimensionManager(){
	DimensionManager.registerProviderType(dimension, WorldProviderArcticite.class, false);
	DimensionManager.registerDimension(dimension, dimension);
}


}








 

This is my portal block class and I have an error under transferPlayerToDimension here:

package assassinhero.parallelworlds.common.blocks;

import java.util.Random;

import assassinhero.parallelworlds.ParallelWorlds;

import net.minecraft.block.Block;
import net.minecraft.block.BlockPortal;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.world.World;

public class BlockPortalArcitcite extends BlockPortal{

public BlockPortalArcitcite(int par1) {
	super(par1);
	setCreativeTab(CreativeTabs.tabBlock);


}

public void registerIcons(IconRegister par1iconregister){
	this.blockIcon = par1iconregister.registerIcon("Portal");
}


 public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
    {
        super.updateTick(par1World, par2, par3, par4, par5Random);



}

 public boolean tryToCreatePortal(World par1World, int par2, int par3, int par4)
    {
        byte b0 = 0;
        byte b1 = 0;

        if (par1World.getBlockId(par2 - 1, par3, par4) == ParallelWorlds.Arcticite.blockID || par1World.getBlockId(par2 + 1, par3, par4) == ParallelWorlds.Arcticite.blockID)
        {
            b0 = 1;
        }

        if (par1World.getBlockId(par2, par3, par4 - 1) == ParallelWorlds.Arcticite.blockID || par1World.getBlockId(par2, par3, par4 + 1) == ParallelWorlds.Arcticite.blockID)
        {
            b1 = 1;
        }

        if (b0 == b1)
        {
            return false;
        }
        else
        {
            if (par1World.getBlockId(par2 - b0, par3, par4 - b1) == 0)
            {
                par2 -= b0;
                par4 -= b1;
            }

            int l;
            int i1;

            for (l = -1; l <= 2; ++l)
            {
                for (i1 = -1; i1 <= 3; ++i1)
                {
                    boolean flag = l == -1 || l == 2 || i1 == -1 || i1 == 3;

                    if (l != -1 && l != 2 || i1 != -1 && i1 != 3)
                    {
                        int j1 = par1World.getBlockId(par2 + b0 * l, par3 + i1, par4 + b1 * l);

                        if (flag)
                        {
                            if (j1 != ParallelWorlds.Arcticite.blockID)
                            {
                                return false;
                            }
                        }
                        else if (j1 != 0 && j1 != Block.fire.blockID)
                        {
                            return false;
                        }
                    }
                }
            }

            for (l = 0; l < 2; ++l)
            {
                for (i1 = 0; i1 < 3; ++i1)
                {
                    par1World.setBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l, ParallelWorlds.Portal.blockID, 0, 2);
                }
            }

            return true;
        }
        
        
     
    }

 public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity){
    
        if (par5Entity.ridingEntity == null && par5Entity.riddenByEntity == null){
        	if(par5Entity instanceof EntityPlayerMP){
        		EntityPlayerMP EntityPlayer = (EntityPlayerMP) par5Entity;
        		if(par5Entity.dimension != ParallelWorlds.dimension){
        			
        			EntityPlayer.mcServer.getConfigurationManager().transferPlayerToDimension(EntityPlayer, ParallelWorlds.dimension, new TeleporterParallelWorlds(EntityPlayer.mcServer.worldServerForDimension(ParallelWorlds.dimension)));
        			
        		}
        		
        		else{
        			
        			EntityPlayer.mcServer.getConfigurationManager().transferPlayerToDimension(EntityPlayer, ParallelWorlds.dimension, new TeleporterParalelWorlds(EntityPlayer.mcServer.worldServerForDimension(0)));
        			
        		}
        	}
       
    }
 }


    public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
    {
        byte b0 = 0;
        byte b1 = 1;

        if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID || par1World.getBlockId(par2 + 1, par3, par4) == this.blockID)
        {
            b0 = 1;
            b1 = 0;
        }

        int i1;

        for (i1 = par3; par1World.getBlockId(par2, i1 - 1, par4) == this.blockID; --i1)
        {
            ;
        }

        if (par1World.getBlockId(par2, i1 - 1, par4) != ParallelWorlds.Arcticite.blockID)
        {
            par1World.setBlockToAir(par2, par3, par4);
        }
        else
        {
            int j1;

            for (j1 = 1; j1 < 4 && par1World.getBlockId(par2, i1 + j1, par4) == this.blockID; ++j1)
            {
                ;
            }

            if (j1 == 3 && par1World.getBlockId(par2, i1 + j1, par4) == ParallelWorlds.Arcticite.blockID)
            {
                boolean flag = par1World.getBlockId(par2 - 1, par3, par4) == this.blockID || par1World.getBlockId(par2 + 1, par3, par4) == this.blockID;
                boolean flag1 = par1World.getBlockId(par2, par3, par4 - 1) == this.blockID || par1World.getBlockId(par2, par3, par4 + 1) == this.blockID;

                if (flag && flag1)
                {
                    par1World.setBlockToAir(par2, par3, par4);
                }
                else
                {
                    if ((par1World.getBlockId(par2 + b0, par3, par4 + b1) != ParallelWorlds.Arcticite.blockID || par1World.getBlockId(par2 - b0, par3, par4 - b1) != this.blockID) && (par1World.getBlockId(par2 - b0, par3, par4 - b1) != ParallelWorlds.Arcticite.blockID || par1World.getBlockId(par2 + b0, par3, par4 + b1) != this.blockID))
                    {
                        par1World.setBlockToAir(par2, par3, par4);
                    }
                }
            }
            else
            {
                par1World.setBlockToAir(par2, par3, par4);
            }
        }
    }




}

 

Lastly, this is my TeleporterParallelWorlds class:

 

package assassinhero.parallelworlds.common.blocks;

import java.util.Random;

import assassinhero.parallelworlds.ParallelWorlds;

import net.minecraft.block.Block;
import net.minecraft.block.BlockPortal;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.world.World;

public class BlockPortalArcitcite extends BlockPortal{

public BlockPortalArcitcite(int par1) {
	super(par1);
	setCreativeTab(CreativeTabs.tabBlock);


}

public void registerIcons(IconRegister par1iconregister){
	this.blockIcon = par1iconregister.registerIcon("Portal");
}


 public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
    {
        super.updateTick(par1World, par2, par3, par4, par5Random);



}

 public boolean tryToCreatePortal(World par1World, int par2, int par3, int par4)
    {
        byte b0 = 0;
        byte b1 = 0;

        if (par1World.getBlockId(par2 - 1, par3, par4) == ParallelWorlds.Arcticite.blockID || par1World.getBlockId(par2 + 1, par3, par4) == ParallelWorlds.Arcticite.blockID)
        {
            b0 = 1;
        }

        if (par1World.getBlockId(par2, par3, par4 - 1) == ParallelWorlds.Arcticite.blockID || par1World.getBlockId(par2, par3, par4 + 1) == ParallelWorlds.Arcticite.blockID)
        {
            b1 = 1;
        }

        if (b0 == b1)
        {
            return false;
        }
        else
        {
            if (par1World.getBlockId(par2 - b0, par3, par4 - b1) == 0)
            {
                par2 -= b0;
                par4 -= b1;
            }

            int l;
            int i1;

            for (l = -1; l <= 2; ++l)
            {
                for (i1 = -1; i1 <= 3; ++i1)
                {
                    boolean flag = l == -1 || l == 2 || i1 == -1 || i1 == 3;

                    if (l != -1 && l != 2 || i1 != -1 && i1 != 3)
                    {
                        int j1 = par1World.getBlockId(par2 + b0 * l, par3 + i1, par4 + b1 * l);

                        if (flag)
                        {
                            if (j1 != ParallelWorlds.Arcticite.blockID)
                            {
                                return false;
                            }
                        }
                        else if (j1 != 0 && j1 != Block.fire.blockID)
                        {
                            return false;
                        }
                    }
                }
            }

            for (l = 0; l < 2; ++l)
            {
                for (i1 = 0; i1 < 3; ++i1)
                {
                    par1World.setBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l, ParallelWorlds.Portal.blockID, 0, 2);
                }
            }

            return true;
        }
        
        
     
    }

 public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity){
    
        if (par5Entity.ridingEntity == null && par5Entity.riddenByEntity == null){
        	if(par5Entity instanceof EntityPlayerMP){
        		EntityPlayerMP EntityPlayer = (EntityPlayerMP) par5Entity;
        		if(par5Entity.dimension != ParallelWorlds.dimension){
        			
        			EntityPlayer.mcServer.getConfigurationManager().transferPlayerToDimension(EntityPlayer, ParallelWorlds.dimension, new TeleporterParallelWorlds(EntityPlayer.mcServer.worldServerForDimension(ParallelWorlds.dimension)));
        			
        		}
        		
        		else{
        			
        			EntityPlayer.mcServer.getConfigurationManager().transferPlayerToDimension(EntityPlayer, ParallelWorlds.dimension, new TeleporterParalelWorlds(EntityPlayer.mcServer.worldServerForDimension(0)));
        			
        		}
        	}
       
    }
 }


    public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
    {
        byte b0 = 0;
        byte b1 = 1;

        if (par1World.getBlockId(par2 - 1, par3, par4) == this.blockID || par1World.getBlockId(par2 + 1, par3, par4) == this.blockID)
        {
            b0 = 1;
            b1 = 0;
        }

        int i1;

        for (i1 = par3; par1World.getBlockId(par2, i1 - 1, par4) == this.blockID; --i1)
        {
            ;
        }

        if (par1World.getBlockId(par2, i1 - 1, par4) != ParallelWorlds.Arcticite.blockID)
        {
            par1World.setBlockToAir(par2, par3, par4);
        }
        else
        {
            int j1;

            for (j1 = 1; j1 < 4 && par1World.getBlockId(par2, i1 + j1, par4) == this.blockID; ++j1)
            {
                ;
            }

            if (j1 == 3 && par1World.getBlockId(par2, i1 + j1, par4) == ParallelWorlds.Arcticite.blockID)
            {
                boolean flag = par1World.getBlockId(par2 - 1, par3, par4) == this.blockID || par1World.getBlockId(par2 + 1, par3, par4) == this.blockID;
                boolean flag1 = par1World.getBlockId(par2, par3, par4 - 1) == this.blockID || par1World.getBlockId(par2, par3, par4 + 1) == this.blockID;

                if (flag && flag1)
                {
                    par1World.setBlockToAir(par2, par3, par4);
                }
                else
                {
                    if ((par1World.getBlockId(par2 + b0, par3, par4 + b1) != ParallelWorlds.Arcticite.blockID || par1World.getBlockId(par2 - b0, par3, par4 - b1) != this.blockID) && (par1World.getBlockId(par2 - b0, par3, par4 - b1) != ParallelWorlds.Arcticite.blockID || par1World.getBlockId(par2 + b0, par3, par4 + b1) != this.blockID))
                    {
                        par1World.setBlockToAir(par2, par3, par4);
                    }
                }
            }
            else
            {
                par1World.setBlockToAir(par2, par3, par4);
            }
        }
    }




}

 

 

 

 

 

Any help please?

 

If you need any extra code don't be afraid to ask :)

STOP CRUCIFYING NEW MODDERS!!!!

Link to comment
Share on other sites

I have an error on this piece of code in my TeleporterParallelWorlds clas

new PortalPosition(this, i, j, k, this.worldServerInstance.getTotalWorldTime()));

 

The reason none has responded to this would be that from the look of it there's impossible to guess what's wrong.

You say there is an error, but nothing about what error?

I assume by error you mean eclipse marks the line or a word red?

 

If so you should tell me what it's saying when you mouse over the underlined area, what is the error it's giving and what quick fixes is it giving ya?

If you look at the bottom of your eclipse window you should see the markers tab, where you can click on the error and copy paste it easily.

 

Letting us know what error you are having will help out a lot when it comes to solving your problem <3

 

 

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

I have an error on this piece of code in my TeleporterParallelWorlds clas

new PortalPosition(this, i, j, k, this.worldServerInstance.getTotalWorldTime()));

 

The reason none has responded to this would be that from the look of it there's impossible to guess what's wrong.

You say there is an error, but nothing about what error?

I assume by error you mean eclipse marks the line or a word red?

 

If so you should tell me what it's saying when you mouse over the underlined area, what is the error it's giving and what quick fixes is it giving ya?

If you look at the bottom of your eclipse window you should see the markers tab, where you can click on the error and copy paste it easily.

 

Letting us know what error you are having will help out a lot when it comes to solving your problem <3

 

 

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Use Temu coupon code $100 off [acq783769] and special 30% discount Plus get 90% on cleranceTemu has always been a shopper's paradise, offering a vast collection of trending items at unbeatable prices. With fast delivery and free shipping to 67 countries, it's no wonder Temu has become a go-to platform for savvy shoppers. Now, with these exclusive Temu coupon codes, you can enjoy even more savings: act581784: Temu coupon code 40% off for existing users act581784: $100 off Temu coupon for new customers act581784: $100 off Temu coupon for existing customers act581784: 40% discount for new users act581784: Temu coupon code 40 off for existing and new users Why You Shouldn't Miss Out on the Temu Coupon Code 40% Off The Temu coupon code 40% off is a game-changer for both new and existing customers. Whether you're a first-time user or a loyal Temu shopper, these codes offer substantial savings on your purchases. With a flat 40% extra off, you can stretch your budget further and indulge in more of your favorite items. Maximizing Your Savings with Temu 40 Off Coupon Code To make the most of your Temu shopping experience, it's crucial to understand how to apply these coupon codes effectively. When you use the Temu coupon code 40 off, you're not just saving money – you're unlocking a world of possibilities. From fashion to home decor, electronics to beauty products, your 40% discount applies across a wide range of categories. How to Apply Your Temu Coupon Code 40% Off Using your Temu coupon code 40% off is a breeze. Here's a step-by-step guide to ensure you don't miss out on these incredible savings: Browse through Temu's extensive collection and add your desired items to your cart. Proceed to checkout when you're ready to make your purchase. Look for the "Promo Code" or "Coupon Code" field. Enter your Temu coupon code 40 off [act581784]. Watch as your total amount gets reduced by a whopping 40%! The Power of Temu Coupon Code 40 Off First Order For those new to Temu, the Temu coupon code 40% off first order is an excellent opportunity to experience the platform's offerings at a discounted price. This introductory offer allows you to explore Temu's vast catalog while enjoying significant savings on your inaugural purchase.Be sure to use it before it expires!
    • Use Temu coupon code $100 off [ACQ783769] for Bahrain and special 30% discount Plus get free shipping Temu has always been a shopper's paradise, offering a vast collection of trending items at unbeatable prices. With fast delivery and free shipping to 67 countries, it's no wonder Temu has become a go-to platform for savvy shoppers. Now, with these exclusive Temu coupon codes, you can enjoy even more savings: ACQ783769: Temu coupon code 40% off for existing users act581784: $100 off Temu coupon for new customers act581784: $100 off Temu coupon for existing customers act581784: 40% discount for new users act581784: Temu coupon code 40 off for existing and new users Why You Shouldn't Miss Out on the Temu Coupon Code 40% Off The Temu coupon code 40% off is a game-changer for both new and existing customers. Whether you're a first-time user or a loyal Temu shopper, these codes offer substantial savings on your purchases. With a flat 40% extra off, you can stretch your budget further and indulge in more of your favorite items. Maximizing Your Savings with Temu 40 Off Coupon Code To make the most of your Temu shopping experience, it's crucial to understand how to apply these coupon codes effectively. When you use the Temu coupon code 40 off, you're not just saving money – you're unlocking a world of possibilities. From fashion to home decor, electronics to beauty products, your 40% discount applies across a wide range of categories. How to Apply Your Temu Coupon Code 40% Off Using your Temu coupon code 40% off is a breeze. Here's a step-by-step guide to ensure you don't miss out on these incredible savings: Browse through Temu's extensive collection and add your desired items to your cart. Proceed to checkout when you're ready to make your purchase. Look for the "Promo Code" or "Coupon Code" field. Enter your Temu coupon code 40 off [act581784]. Watch as your total amount gets reduced by a whopping 40%! The Power of Temu Coupon Code 40 Off First Order For those new to Temu, the Temu coupon code 40% off first order is an excellent opportunity to experience the platform's offerings at a discounted price. This introductory offer allows you to explore Temu's vast catalog while enjoying significant savings on your inaugural purchase.Be sure to use it before it expires!
    • Use Temu coupon code $200 off [act965193] for Bahrain and special 30% discount Plus get free shipping Temu has always been a shopper's paradise, offering a vast collection of trending items at unbeatable prices. With fast delivery and free shipping to 67 countries, it's no wonder Temu has become a go-to platform for savvy shoppers. Now, with these exclusive Temu coupon codes, you can enjoy even more savings: act965193: Temu coupon code 40% off for existing users act965193: $100 off Temu coupon for new customers act965193: $100 off Temu coupon for existing customers act965193: 40% discount for new users act965193: Temu coupon code 40 off for existing and new users Why You Shouldn't Miss Out on the Temu Coupon Code 40% Off The Temu coupon code 40% off is a game-changer for both new and existing customers. Whether you're a first-time user or a loyal Temu shopper, these codes offer substantial savings on your purchases. With a flat 40% extra off, you can stretch your budget further and indulge in more of your favorite items. Maximizing Your Savings with Temu 40 Off Coupon Code To make the most of your Temu shopping experience, it's crucial to understand how to apply these coupon codes effectively. When you use the Temu coupon code 40 off, you're not just saving money – you're unlocking a world of possibilities. From fashion to home decor, electronics to beauty products, your 40% discount applies across a wide range of categories. How to Apply Your Temu Coupon Code 40% Off Using your Temu coupon code 40% off is a breeze. Here's a step-by-step guide to ensure you don't miss out on these incredible savings: Browse through Temu's extensive collection and add your desired items to your cart. Proceed to checkout when you're ready to make your purchase. Look for the "Promo Code" or "Coupon Code" field. Enter your Temu coupon code 40 off [act581784]. Watch as your total amount gets reduced by a whopping 40%! The Power of Temu Coupon Code 40 Off First Order For those new to Temu, the Temu coupon code 40% off first order is an excellent opportunity to experience the platform's offerings at a discounted price. This introductory offer allows you to explore Temu's vast catalog while enjoying significant savings on your inaugural purchase.Be sure to use it before it expires!
    • Looking for the best deals and discounts? The Temu coupon code [act200019] or [acp856709] offers fantastic savings for both new and existing customers. Whether you're placing your first order or restocking your favorites, these coupon codes unlock discounts of up to 90% and an additional $100 off on selected items. Plus, enjoy the added benefit of free shipping on select orders. This guide will show you how to make the most of these deals and maximize your savings on Temu. How to Use the Temu Coupon Code [act200019] or [acp856709] Applying the Temu coupon code is quick and easy. Here’s how to redeem it for maximum savings: 1. Visit the Temu Website: Explore Temu’s wide range of products, including fashion, electronics, and home goods. 2. Add Items to Your Cart: Choose the products you want and add them to your shopping cart. 3. Proceed to Checkout: Click on your cart and proceed to checkout when you're ready. 4. Enter the Coupon Code: In the "Coupon Code" field at checkout, enter [act200019] or [acp856709] and click "Apply." 5. Enjoy Your Savings: You’ll instantly see the $100 discount along with additional savings of up to 90%, depending on the items selected. Benefits of Temu Coupon Codes [act200019] or [acp856709] for First-Time Users and Existing Customers Whether you're a new customer or a regular shopper, the Temu coupon code offers unbeatable discounts. Here's how both new and existing users can benefit: • First-Time Users: New customers using the Temu coupon code [act200019] or [acp856709] on their first order get $100 off, along with discounts ranging from 30% to 90% on selected products. It’s the perfect opportunity to try out Temu’s product range without overspending. • Existing Customers: Loyal shoppers can continue to enjoy significant savings by applying the same coupon code on subsequent orders. Restock your favorites or discover new items at discounted prices. • Free Shipping: Using the Temu coupon code [act200019] or [acp856709] can also qualify you for free shipping on selected items, further increasing your overall savings. Breakdown of Discounts with Temu Coupon Code [act200019] or [acp856709] With the Temu coupon code [act200019] or [acp856709], you’re not limited to just $100 off. You can also enjoy varying levels of discounts on a wide range of products. Here’s how it works: • 30% Discount: Perfect for budget-friendly products and everyday essentials. Shop clothing, beauty products, and home goods at 30% off. • 40% Discount: Ideal for mid-range purchases such as electronics, gadgets, and household items. • 50% Discount: Save big on high-end gadgets, designer apparel, and premium beauty products with 50% off. • 70% Discount: Excellent for those looking for luxury items like branded accessories and upscale electronics. • 90% Discount: The ultimate deal for savvy shoppers. Enjoy top-tier products like tech and home goods at a fraction of the price. Maximize Your Savings on First Orders, Free Shipping, and More with Temu Coupon Code [act200019] or [acp856709] Here are some top tips to get the most value from the Temu coupon code [act200019] or [acp856709]: 1. First Order Savings: For first-time users, using the code [act200019] or [acp856709] on your first order guarantees $100 off, making it the perfect way to kickstart your shopping experience at Temu. 2. Look for Free Shipping: Check if your items qualify for free shipping by applying the coupon code at checkout. It’s a great way to save even more on your total purchase. 3. Shop During Major Sales: Combine the coupon code with major sales events like Black Friday or Cyber Monday for even greater savings. 4. Buy in Bulk: Bulk purchases allow you to maximize the value of the $100 discount, especially if you’re buying items across various categories. 5. Check Product Eligibility: Make sure the products you’re adding to your cart qualify for higher percentage discounts. Some items may only offer 30%-50% off, while others can go up to 90%. FAQs About Temu Coupon Code [act200019] or [acp856709] 1. Is the Temu coupon code verified and working?  Yes, the Temu coupon codes [act200019] and [acp856709] are verified and currently active. Both codes offer up to $100 off, along with percentage discounts of up to 90%. 2. How much can I save with the Temu coupon code?  Using the coupon codes [act200019] or [acp856709], you can get $100 off plus additional percentage-based discounts ranging from 30% to 90%, depending on the products you choose. 3. Can both first-time users and existing customers use these coupon codes?  Absolutely! Both new and existing customers can take advantage of the Temu coupon codes [act200019] or [acp856709]. First-time users can apply the code for their first order, while loyal customers can continue saving on subsequent purchases. 4. Does the coupon code apply to free shipping?  In many cases, using the Temu coupon code [act200019] or [acp856709] may qualify you for free shipping, depending on the items and promotions available at the time of purchase. 5. Are there any exclusions with these coupon codes?  While these coupon codes offer excellent discounts, some high-percentage offers may not apply to every item. Be sure to check product eligibility before completing your purchase. Conclusion: Don’t Miss Out on These Massive Savings with Temu Coupon Code [act200019] or [acp856709] The Temu coupon code [act200019] or [acp856709] provides an excellent opportunity to save big on a wide variety of products. Whether you're a first-time user placing your first order or an existing customer looking to restock, these coupon codes guarantee substantial savings. Take advantage of discounts up to 90%, free shipping on select orders, and $100 off when you shop at Temu. Don’t wait—start shopping today and use the coupon codes [act200019] or [acp856709] to unlock the best possible deals! Happy shopping!
    • The office interior in Delhi has been evolving rapidly, blending functionality with modern aesthetics. Here are some key trends: Sustainable Design: Companies are opting for eco-friendly materials like recycled wood, energy-efficient lighting, and green office plants to create environmentally conscious workspaces. Collaborative Spaces: Open layouts and shared workspaces foster teamwork and creativity. Modular furniture and flexible seating arrangements allow for easy reconfiguration. Smart Technology Integration: Smart offices use automation to control lighting, temperature, and even security, offering convenience and energy efficiency. Biophilic Design: Incorporating natural elements like plants, natural light, and organic textures improves employee well-being and productivity. Wellness Zones: Dedicated relaxation areas, ergonomic furniture, and quiet zones are gaining popularity to promote a healthier work environment. Minimalist and Clean Aesthetics: Sleek, clutter-free designs with neutral color palettes are favored to create calm and professional atmospheres. These trends reflect a growing focus on creating efficient, healthy, and flexible office environments in Delhi.    
  • Topics

×
×
  • Create New...

Important Information

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