Jump to content

Recommended Posts

Posted

Hello everyone, i am having an issue i just cant seem to figure out. I run into this error on startup.

 

Crash Report:

---- Minecraft Crash Report ----
// Ooh. Shiny.

Time: 10/26/13 3:45 PM
Description: There was a severe problem during mod loading that has caused the game to fail

cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:75)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:524)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:194)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:174)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:105)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:509)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:183)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:472)
at net.minecraft.client.Minecraft.run(Minecraft.java:807)
at net.minecraft.client.main.Main.main(Main.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
Caused by: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:68)
... 33 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
Minecraft Version: 1.6.4
Operating System: Windows 7 (x86) version 6.1
Java Version: 1.7.0_25, Oracle Corporation
Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
Memory: 958884128 bytes (914 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v8.11 FML v6.4.20.916 Minecraft Forge 9.11.1.916 4 mods loaded, 4 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML{6.4.20.916} [Forge Mod Loader] (bin) Unloaded->Constructed
Forge{9.11.1.916} [Minecraft Forge] (bin) Unloaded->Constructed
BlueStoneMod{v1.3-BETA} [blueStone Mod] (bin) Unloaded->Errored

 

 

Not sure what to do here, any help is much appreciated.

 

Main file

 

 

 /* Copyright (C) BlueStone Servers , Inc - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by The BlueStone Dev Team 
*/

package assets.bluestone;

/* Basic importing */
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.src.ModLoader;
import net.minecraftforge.common.EnumHelper;
import assets.bluestone.CommonProxy;
import assets.bluestone.blocks.BlockBlueStone;
import assets.bluestone.blocks.BlockBlueStone_Ore;
import assets.bluestone.blocks.BlockBlueStone_Wire;
import assets.bluestone.items.ItemBlueStone;
import assets.bluestone.items.ItemBlueStoneArmor;
import assets.bluestone.items.ItemBlueStoneAxe;
import assets.bluestone.items.ItemBlueStoneChunk;
import assets.bluestone.items.ItemBlueStoneCrystal;
import assets.bluestone.items.ItemBlueStoneGem;
import assets.bluestone.items.ItemBlueStoneGemAxe;
import assets.bluestone.items.ItemBlueStoneGemHoe;
import assets.bluestone.items.ItemBlueStoneGemPickaxe;
import assets.bluestone.items.ItemBlueStoneGemShovel;
import assets.bluestone.items.ItemBlueStoneGemSword;
import assets.bluestone.items.ItemBlueStoneHoe;
import assets.bluestone.items.ItemBlueStoneIngot;
import assets.bluestone.items.ItemBlueStonePickaxe;
import assets.bluestone.items.ItemBlueStoneShard;
import assets.bluestone.items.ItemBlueStoneShovel;
import assets.bluestone.items.ItemBlueStoneSword;
import assets.bluestone.items.ItemInfusedStick;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

/*
* Forge Identifier
*/
@Mod(modid="BlueStoneMod",name="BlueStone Mod",version="v1.3-BETA")
@NetworkMod(clientSideRequired=true,serverSideRequired=false)


public class BlueStoneMod {

public static CommonProxy proxy; 

@SidedProxy (clientSide = "assets.bluestone.ClientProxy", serverSide = "assets.bluestone.CommonProxy")
//Armor Material

static EnumArmorMaterial bluestoneGemArmor = EnumHelper.addArmorMaterial("Bluestone", 3000, new int[] {7,12,10,6}, 30);
/*
 * ToolMaterial
 */
    static EnumToolMaterial EnumToolMaterialBlueStone= EnumHelper.addToolMaterial("LowPower", 2, 300, 7.0F, 3, 15);
    static EnumToolMaterial EnumToolMaterialBlueStoneGem= EnumHelper.addToolMaterial("HighPower", 3, 3000, 15.0F, 5, 25);

    // creative tab
    public static CreativeTabs tabYourTab = new TabBlueStoneMod(CreativeTabs.getNextID(), "BlueStone");

    
    //Armor
    
    public static Item bluestoneHelmet;
    public static Item bluestoneChestplate;
    public static Item bluestoneLeggings;
    public static Item bluestoneBoots;
    //items
public static Item BlueStone;
public static Item BlueStoneIngot;
public static Item BlueStoneChunk;
public static Item BlueStoneShard;
public static Item BlueStoneCrystal;
public static Item BlueStoneGem;
public static Item InfusedStick;


//tools
public static Item BlueStoneAxe;
public static Item BlueStoneShovel;
public static Item BlueStoneSword;
public static Item BlueStonePickaxe;
public static Item BlueStoneHoe;
public static Item BlueStoneGemAxe;
public static Item BlueStoneGemShovel;
public static Item BlueStoneGemSword;
public static Item BlueStoneGemPickaxe;
public static Item BlueStoneGemHoe;

//blocks
public static Block redstoneWire;
public static Block BlueStone_Block;
public static Block BlueStone_Ore;
public static Block BlueStone_Wire;

//Achievements

//Machines

//Logic

//Cableing


//Declaring Init
@EventHandler
public void load(FMLInitializationEvent event){


	System.out.println("BlueStone Mod By BlackMage & Valderg");
	System.out.println("A BlueStone Servers Exclusive Mod");

	proxy.registerRenderers();
	proxy.registerServerTickHandler();



	//tools
	BlueStoneAxe = new ItemBlueStoneAxe(2503, EnumToolMaterialBlueStone).setUnlocalizedName("BlueStoneaxe");
	BlueStoneShovel = new ItemBlueStoneShovel(2504, EnumToolMaterialBlueStone).setUnlocalizedName("BlueStoneshovel");
	BlueStonePickaxe = new ItemBlueStonePickaxe(2505, EnumToolMaterialBlueStone).setUnlocalizedName("BlueStonepick");
	BlueStoneHoe = new ItemBlueStoneHoe(2506, EnumToolMaterialBlueStone).setUnlocalizedName("BlueStonehoe");
	BlueStoneSword = new ItemBlueStoneSword(2507, EnumToolMaterialBlueStone).setUnlocalizedName("BlueStonesword");
	BlueStoneGemAxe = new ItemBlueStoneGemAxe(2514, EnumToolMaterialBlueStoneGem).setUnlocalizedName("BlueStoneGemaxe");
	BlueStoneGemShovel = new ItemBlueStoneGemShovel(2515, EnumToolMaterialBlueStoneGem).setUnlocalizedName("BlueStoneGemshovel");
	BlueStoneGemPickaxe = new ItemBlueStoneGemPickaxe(2516, EnumToolMaterialBlueStoneGem).setUnlocalizedName("BlueStoneGempick");
	BlueStoneGemHoe = new ItemBlueStoneGemHoe(2517, EnumToolMaterialBlueStoneGem).setUnlocalizedName("BlueStoneGemhoe");
	BlueStoneGemSword = new ItemBlueStoneGemSword(2518, EnumToolMaterialBlueStoneGem).setUnlocalizedName("BlueStoneGemsword");

	//Armor
	bluestoneHelmet = new ItemBlueStoneArmor(2519, bluestoneGemArmor, ModLoader.addArmor("EnumToolMaterialBlueStoneGem"),0).setUnlocalizedName("bluestoneHelmet");
	bluestoneChestplate = new ItemBlueStoneArmor(2520, bluestoneGemArmor, ModLoader.addArmor("EnumToolMaterialBlueStoneGem"),1).setUnlocalizedName("bluestoneChestplate");
	bluestoneLeggings = new ItemBlueStoneArmor(2521, bluestoneGemArmor, ModLoader.addArmor("EnumToolMaterialBlueStoneGem"),2).setUnlocalizedName("bluestoneLeggings");
	bluestoneBoots = new ItemBlueStoneArmor(2522, bluestoneGemArmor, ModLoader.addArmor("EnumToolMaterialBlueStoneGem"),3).setUnlocalizedName("bluestoneBoots");

	//ore and blocks
	BlueStone_Ore = new BlockBlueStone_Ore(2502, "BlueStoneore").setUnlocalizedName("BlueStoneore").setHardness(2.0F).setStepSound(Block.soundStoneFootstep).setResistance(5.0F);
	BlueStone_Block = new BlockBlueStone(2500, "BlueStone Block").setUnlocalizedName("BlueStoneblock").setHardness(5.0F).setStepSound(Block.soundMetalFootstep).setResistance(10.0F);
	BlueStone_Wire = new BlockBlueStone_Wire(2508).setUnlocalizedName("BlueStonewire").setHardness(1.0F).setStepSound(Block.soundMetalFootstep).setResistance(5.0F);

	//items
	BlueStone = new ItemBlueStone(2501).setUnlocalizedName("BlueStone");
	BlueStoneIngot = new ItemBlueStoneIngot(2509).setUnlocalizedName("BlueStoneIngot");
	BlueStoneChunk = new ItemBlueStoneChunk(2510).setUnlocalizedName("BlueStoneChunk");
	BlueStoneShard = new ItemBlueStoneShard(2511).setUnlocalizedName("BlueStoneShard");
	BlueStoneCrystal = new ItemBlueStoneCrystal(2512).setUnlocalizedName("BlueStoneCrystal");
	BlueStoneGem = new ItemBlueStoneGem(2513).setUnlocalizedName("BlueStoneGem");
	InfusedStick = new ItemInfusedStick(2523).setUnlocalizedName("InfusedStick");

	//naming
	LanguageRegistry.addName(BlueStone, "BlueStone Dust");
	LanguageRegistry.addName(BlueStoneAxe, "BlueStone Axe");
	LanguageRegistry.addName(BlueStoneHoe, "BlueStone Hoe");
	LanguageRegistry.addName(BlueStoneShovel, "BlueStone Spade");
	LanguageRegistry.addName(BlueStonePickaxe, "BlueStone Pickaxe");
	LanguageRegistry.addName(BlueStoneSword, "BlueStone Sword");
	LanguageRegistry.addName(BlueStone_Ore, "BlueStone Ore");
	LanguageRegistry.addName(BlueStone_Block, "BlueStone Block");
	LanguageRegistry.addName(BlueStone_Wire, "BlueStone Wire");
	LanguageRegistry.addName(BlueStoneIngot, "BlueStone Ingot");
	LanguageRegistry.addName(BlueStoneChunk, "Chunk of BlueStone");
	LanguageRegistry.addName(BlueStoneShard, "BlueStone Shard");
	LanguageRegistry.addName(BlueStoneCrystal, "BlueStone Crystal");
	LanguageRegistry.addName(BlueStoneGem, "BlueStone Gem");
	LanguageRegistry.addName(BlueStoneGemAxe, "BlueStone Gem Axe");
	LanguageRegistry.addName(BlueStoneGemHoe, "BlueStone Gem Hoe");
	LanguageRegistry.addName(BlueStoneGemShovel, "BlueStone Gem Spade");
	LanguageRegistry.addName(BlueStoneGemPickaxe, "BlueStone Gem Pickaxe");
	LanguageRegistry.addName(BlueStoneGemSword, "BlueStone Gem Sword");
	LanguageRegistry.addName(InfusedStick, "Infused Stick");
	LanguageRegistry.addName(bluestoneHelmet, "BlueStone Gem Helmet");
	LanguageRegistry.addName(bluestoneChestplate, "BlueStone Gem Chestplate");
	LanguageRegistry.addName(bluestoneLeggings, "BlueStone Gem Leggings");
	LanguageRegistry.addName(bluestoneBoots, "BlueStone Gem Boots");

	//register blocks
	GameRegistry.registerBlock(BlueStone_Ore, "BlueStone_Ore");
	GameRegistry.registerBlock(BlueStone_Block, "BlueStone_Block");
	GameRegistry.registerBlock(BlueStone_Wire, "BlueStone Wire");

	//crafting
	GameRegistry.addRecipe(new ItemStack(BlueStone_Block,1), new Object[]{
		"TTT","TTT","TTT",'T',BlueStoneIngot,
		});
	GameRegistry.addRecipe(new ItemStack(BlueStonePickaxe), new Object[]{
            "XXX"," S "," S ", 'X', BlueStoneIngot, 'S', Item.stick,
		});
	GameRegistry.addRecipe(new ItemStack(BlueStoneHoe), new Object[]{
            "XX "," S "," S ", 'X', BlueStoneIngot, 'S', Item.stick,
		});
	GameRegistry.addRecipe(new ItemStack(BlueStoneAxe), new Object[]{
            "XX ","XS "," S ", 'X', BlueStoneIngot, 'S', Item.stick,
		});
	GameRegistry.addRecipe(new ItemStack(BlueStoneShovel), new Object[]{
            " X "," S "," S ", 'X', BlueStoneIngot, 'S', Item.stick,
		});
	GameRegistry.addRecipe(new ItemStack(BlueStoneChunk), new Object[]{
            "BB ","BB ", 'B', BlueStone,
		});
	GameRegistry.addRecipe(new ItemStack(BlueStoneShard), new Object[]{
		"L  "," C ","  L", 'C', BlueStoneChunk, 'L', new ItemStack(Item.dyePowder, 1, 4),
	});
	GameRegistry.addRecipe(new ItemStack(BlueStoneCrystal), new Object[]{
		"sss","sss","sss", 's', BlueStoneShard,
	});
	GameRegistry.addRecipe(new ItemStack(BlueStoneGem), new Object[]{
		"ccc","cdc","ccc", 'c', BlueStoneCrystal, 'd', Item.diamond
		});
	GameRegistry.addRecipe(new ItemStack(BlueStonePickaxe), new Object[]{
		"XXX"," S "," S ", 'X', BlueStoneGem, 'S', InfusedStick,
		});
	GameRegistry.addRecipe(new ItemStack(BlueStoneHoe), new Object[]{
		"XX "," S "," S ", 'X', BlueStoneGem, 'S', InfusedStick,
		});
	GameRegistry.addRecipe(new ItemStack(BlueStoneAxe), new Object[]{
		"XX ","XS "," S ", 'X', BlueStoneGem, 'S', InfusedStick,
		});
	GameRegistry.addRecipe(new ItemStack(BlueStoneShovel), new Object[]{
		" X "," S "," S ", 'X', BlueStoneGem, 'S', InfusedStick,
		});
	GameRegistry.addRecipe(new ItemStack(InfusedStick), new Object[]{
		" s "," b ", 's', Item.stick, 'b', BlueStone,
		});
	//Shapeless Crafting
	GameRegistry.addShapelessRecipe(new ItemStack(BlueStone,9), new Object[]{
		BlueStone_Block });

	GameRegistry.addShapelessRecipe(new ItemStack(BlueStone,4), new Object[]{
		BlueStoneChunk });

	//smelting
	FurnaceRecipes.smelting().addSmelting(BlueStoneChunk.itemID, 0, new ItemStack(BlueStoneIngot), 0.1F);

	//world gen
	GameRegistry.registerWorldGenerator(new WorldGeneratorBlueStone());

	System.out.println("BlueStone Mod Succefully Loaded");

}

}

 

 

 

 

Client Proxy

 

 

 /* Copyright (C) BlueStone Servers , Inc - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by The BlueStone Dev Team 
*/


package assets.bluestone;

import java.util.EnumSet;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;

import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;

import assets.bluestone.blocks.BlockBlueStone_Wire;
import assets.bluestone.RenderBlueStone_Wire;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.TickType;

public class ClientProxy extends CommonProxy implements ISimpleBlockRenderingHandler{

public static Minecraft minecraft = Minecraft.getMinecraft();

@Override
public void registerRenderers()
{
	BlockBlueStone_Wire.modelID=RenderingRegistry.getNextAvailableRenderId();
        RenderingRegistry.registerBlockHandler(BlockBlueStone_Wire.modelID,this);
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
	if(modelId == BlockBlueStone_Wire.modelID)
        {
            return new RenderBlueStone_Wire().renderBlueStone_Wire(block, x, y, z, world);
        }
	return false;
}

@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
}
@Override
public boolean shouldRender3DInInventory() {
	return false;
}
@Override
public int getRenderId() {
	return -1;
}

@Override
public EnumSet<TickType> ticks() {
	return EnumSet.of(TickType.PLAYER,TickType.RENDER);
}
@Override
public void tickEnd(EnumSet<TickType> type, Object... tickData) {
	if(type.contains(TickType.PLAYER))
		onPlayerTick((EntityPlayer)tickData[0]);
	if(type.contains(TickType.RENDER))
		onRenderTick();
}

public void onRenderTick() {

}


}

 

 

Common Proxy

 

 

 /* Copyright (C) BlueStone Servers , Inc - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by The BlueStone Dev Team 
*/


package assets.bluestone;

import java.util.EnumSet;

import net.minecraft.entity.player.EntityPlayer;
import cpw.mods.fml.common.TickType;
import cpw.mods.fml.common.registry.TickRegistry;
import cpw.mods.fml.relauncher.Side;

public class CommonProxy {


public void registerRenderers() {

}

public void registerServerTickHandler() {
	TickRegistry.registerTickHandler(new ServerTickHandler(), Side.SERVER);
}

public void tickEnd(EnumSet<TickType> type, Object... tickData) {
	onPlayerTick((EntityPlayer)tickData[0]);
}

protected void onPlayerTick(EntityPlayer entityPlayer) {

}

public void tickStart(EnumSet<TickType> type, Object... tickData) {

}

public EnumSet<TickType> ticks() {
	return EnumSet.of(TickType.PLAYER);
}

}

 

 

 

ServerTickHandler

 

 

 /* Copyright (C) BlueStone Servers , Inc - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by The BlueStone Dev Team 
*/

package assets.bluestone;

import java.util.EnumSet;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import cpw.mods.fml.common.ITickHandler;
import cpw.mods.fml.common.TickType;

public class ServerTickHandler implements ITickHandler {


private void onPlayerTick(EntityPlayer player){

	if (player.getCurrentItemOrArmor(4) != null){

		ItemStack helmet = player.getCurrentItemOrArmor(4);

		if (helmet.getItem() == BlueStoneMod.bluestoneHelmet){
			player.addPotionEffect(new PotionEffect(Potion.nightVision.getId(), 40, 0));

		}

	}

}

@Override
public void tickStart(EnumSet<TickType> type, Object... tickData) {



}

@Override
public void tickEnd(EnumSet<TickType> type, Object... tickData) {


}

@Override
public EnumSet<TickType> ticks() {

	return null;
}

@Override
public String getLabel() {

	return null;
}

}

 

 

Posted

Sorry for the double post but after a little more inspection i figured it out.

 

I was calling the proxy class before telling the sidedproxy which one to use. Not sure i understood why because the two werent technically dependant but i switched it from

public static CommonProxy proxy; 

@SidedProxy (clientSide = "assets.bluestone.ClientProxy", serverSide = "assets.bluestone.CommonProxy")

 

To this



@SidedProxy (clientSide = "assets.bluestone.ClientProxy", serverSide = "assets.bluestone.CommonProxy")
public static CommonProxy proxy; 

 

and it booted right up.

Posted

Yeah, you didn't understand why, but you fixed it, that is good :)

 

Here is a simple explanation, if you are curious:

 

@SidedProxy is an annotation made to initialize the field below it.

Meaning, the client does

public static CommonProxy proxy = new ClientProxy();//from clientSide = "assets.bluestone.ClientProxy"

while server does

public static CommonProxy proxy = new CommonProxy();//from serverSide = "assets.bluestone.CommonProxy"

 

But if there is no field below...

*void* = new CommonProxy();//Java says: Me...crash.

 

By the way, when you do:

public static CommonProxy proxy; 

You are not calling the class, you are declaring a field ;) (static here, which means first loaded and auto initialized to a default value)

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

    • Ah, it appears I spoke too soon, I still need a little help here. I now have the forceloading working reliably.  However, I've realized it's not always the first tick that loads the entity.  I've seen it take anywhere from 2-20ish to actually go through, in which time my debugging has revealed that the chunk is loaded, but during which time calling  serverLevelIn.getEntity(uuidIn) returns a null result.  I suspect this has to do with queuing and how entities are loaded into the game.  While not optimal, it's acceptable, and I don't think there's a whole ton I can do to avoid it. However, my concern is that occasionally teleporting an entity in this manner causes a lag spike.  It's not every time and gives the appearance of being correlated with when other chunks are loading in.  It's also not typically a long spike, but can last a second or two, which is less than ideal.  The gist of how I'm summoning is here (although I've omitted some parts that weren't relevant.  The lag occurs before the actual summon so I'm pretty confident it's the loading, and not the actual summon call). ChunkPos chunkPos = new ChunkPos(entityPosIn); if (serverLevelIn.areEntitiesLoaded(chunkPos.toLong())) { boolean isSummoned = // The method I'm using for actual summoning is called here. Apart from a few checks, the bulk of it is shown later on. if (isSummoned) { // Code that runs here just notifies the player of the summon, clears it from the queue, and removes the forceload } } else { // I continue forcing the chunk until the summon succeeds, to make sure it isn't inadvertently cleared ForgeChunkManager.forceChunk(serverLevelIn, MODID, summonPosIn, chunkPos.x, chunkPos.z, true, true); } The summon code itself uses serverLevelIn.getEntity(uuidIn) to retrieve the entity, and moves it as such.  It is then moved thusly: if (entity.isAlive()) { entity.moveTo(posIn.getX(), posIn.getY(), posIn.getZ()); serverLevelIn.playSound(null, entity, SoundEvents.ENDERMAN_TELEPORT, SoundSource.NEUTRAL, 1.0F, 1.0F); return true; } I originally was calling .getEntity() more frequently and didn't have the check for whether or not entities were loaded in place to prevent unnecessary code calls, but even with those safety measures in place, the lag still persists.  Could this just be an issue with 1.18's lack of optimization in certain areas?  Is there anything I can do to mitigate it?  Is there a performance boosting mod I could recommend alongside my own to reduce the chunk loading lag? At the end of the day, it does work, and I'm putting measures in place to prevent players from abusing the system to cause lag (i.e. each player can only have one queued summon at a time-- trying to summon another replaces the first call).  It's also not an unacceptable level of lag, IMO, given the infrequency of such calls, and the fact that I'm providing the option to toggle off the feature if server admins don't want it used.  However, no amount of lag is ideal, so if possible I'd love to find a more elegant solution-- or at least a mod recommendation to help improve it. Thanks!
    • When i start my forge server its on but when i try to join its come a error Internal Exception: java.lang.OutOfMemoryError: Requested array size exceeds VM limit Server infos: Linux Minecraft version 1.20.1 -Xmx11G -Xms8G
    • Also add the latest.log from your logs-folder
    • Add the mods in groups
  • Topics

×
×
  • Create New...

Important Information

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