Jump to content

ASM Issues[1.6.4]


Rainfur

Recommended Posts

So, I'm trying to just replace certain class files on runtime, not inject into them. Basically, I am thrown an error below when I try to use the mod.

 

Error: http://pastebin.com/hAcK8m9Q

 

However, this shouldn't be happening. The block file in question is

 

 

 

package yamhaven.easycoloredlights.blocks;
//hi
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.util.Icon;
import yamhaven.easycoloredlights.lib.BlockInfo;
import yamhaven.easycoloredlights.lib.ModInfo;
  
public class WhiteColoredLightBlock extends net.minecraft.block.Block {
public WhiteColoredLightBlock(int id) {
	super(id, Material.glass);
	setUnlocalizedName(BlockInfo.whiteColoredLightBlock_unlocalizedName);
	setHardness(0.3F);
	setStepSound(Block.soundGlassFootstep);
	setCreativeTab(CreativeTabs.tabDecorations);
	setLightValue(1.0F);

	//Accepts RGB floats ranging from 0.0 to 1.0
	addColorLightValue(1.0F,1.0F,1.0F);
}

@SideOnly(Side.CLIENT)
private Icon blockIcon;

@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister icon) {
	blockIcon = icon.registerIcon(ModInfo.ID.toLowerCase() + ":" + BlockInfo.whiteColoredLightBlock_unlocalizedName);
}

@SideOnly(Side.CLIENT)
public Icon getIcon(int par1, int par2) {
	return blockIcon;
}
}

 

 

 

And it's loaded from the preinit of the main class:

 

 

 

package yamhaven.easycoloredlights;

import yamhaven.easycoloredlights.blocks.Blocks;
import yamhaven.easycoloredlights.lib.ConfigHandler;
import yamhaven.easycoloredlights.lib.ModInfo;
import yamhaven.easycoloredlights.proxy.CommonProxy;
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.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;

@Mod(modid = ModInfo.ID, name = ModInfo.NAME, version = ModInfo.VERSION)
@NetworkMod (channels = {ModInfo.CHANNEL}, clientSideRequired = true, serverSideRequired = true)

public class EasyColoredLights {
@SidedProxy(clientSide = ModInfo.PROXY_LOCATION + ".ClientProxy", serverSide = ModInfo.PROXY_LOCATION + ".CommonProxy")
public static CommonProxy proxy;

@EventHandler
public static void preInit(FMLPreInitializationEvent event) {
	ConfigHandler.init(event.getSuggestedConfigurationFile());
}

@EventHandler
public static void init(FMLInitializationEvent event) {
	Blocks.init();
	Blocks.addNames();
	Blocks.addBlockRecipes();
}

@EventHandler
public static void postInit(FMLPostInitializationEvent event) {

}
}

 

 

 

 

 

package yamhaven.easycoloredlights.lib;

import java.io.File;

import net.minecraft.client.Minecraft;
import net.minecraftforge.common.Configuration;
import yamhaven.easycoloredlights.lib.BlockIds;
import yamhaven.easycoloredlights.lib.BlockInfo;

public class ConfigHandler {
public static void init(File configFile) {
	Configuration config = new Configuration(configFile);
	config.load();
	BlockIds.whiteLightBlockID_actual = config.getBlock(BlockInfo.whiteColoredLighBlock_name, BlockIds.whiteLightBlockID_default).getInt();
	BlockIds.blackLightBlockID_actual = config.getBlock(BlockInfo.blackColoredLighBlock_name, BlockIds.blackLightBlockID_default).getInt();
	BlockIds.redLightBlockID_actual = config.getBlock(BlockInfo.redColoredLighBlock_name, BlockIds.redLightBlockID_default).getInt();
	BlockIds.greenLightBlockID_actual = config.getBlock(BlockInfo.greenColoredLighBlock_name, BlockIds.greenLightBlockID_default).getInt();
	BlockIds.blueLightBlockID_actual = config.getBlock(BlockInfo.blueColoredLighBlock_name, BlockIds.blueLightBlockID_default).getInt();
	config.save();
}
}

 

 

 

What could be causing this, and how do I fix it?

Link to comment
Share on other sites

Why are you trying to do this with ASM?

Seems something you can do in basic java.

Also I dont see your coremod side, as you say that's the thing thats injecting stuff we'd need to see it.

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • @bluedisgusted That actually fully fixed it, thank you so much
    • Hi, I would like to know how to create multiple hitboxes for the player like the ender dragon. I've searched everywhere but I haven't found anything.
    • FOLKWIN EXPERT RECOVERY is the crypto hero we all need in the ongoing battle against cryptocurrency theft. With the rise in popularity of digital assets like Bitcoin and Ethereum, crypto crime has also been on the rise as hackers look to steal funds stored in virtual wallets. Many a crypto investor has fallen victim to clever scams and hacking schemes that drain wallets of their precious coins. But fear not, for FOLKWIN EXPERT RECOVERY has arrived as a beacon of hope for those who have had their hard-earned crypto stolen. This service is like a superhero for tracking down lost or stolen cryptocurrency, utilizing their advanced forensic technology and expertise to follow the blockchain paper trail and identify where your funds have gone. Their team of ethical hackers act like detectives, piecing together crypto transactions and unmasking the thieves behind complex cybercrimes. No case is too difficult for FOLKWIN EXPERT RECOVERY; they have recovered millions in stolen crypto assets from around the globe. Their mission is to reunite victims with their lost funds and bring criminals who prey on cryptocurrency investors to justice. With their help, those who have been robbed of their digital fortunes now have a crypto guardian to call upon in their time of need. FOLKWIN EXPERT RECOVERY gives victims the hope that all is not lost forever when crypto theft occurs.For support, Contact details is: TELEGRAM: @FOLKWIN_EXPERT_RECOVERY, EMAIL: FOLKWINEXPERTRECOVERY at TECH-CENTER dot COM, WEBSITE: WWW.FOLKWINEXPERTRECOVERY.COM .  are the heroes we need in the ongoing battle to make cryptocurrency ownership safe and secure for all. Get FOLKWIN EXPERT RECOVERY on your side when you have issues like this by dialing: Do this and thank me later. God Blessings to all, I'm forever grateful oh God for the successful recovery. I recommend FOLKWIN EXPERT RECOVERY the best ever and i'm so happy i got all my lost money back. Best Regards. Pamela K Ingram.
    • Made it work. As a note, one of the times it didn't recognize the recipe cause the MOD_ID constant I was using somewhere was NOT referencing my MOD_ID but rather another static variable with the same name. Maybe OP is having a similar problem
    • What exactly is the issue?
  • Topics

×
×
  • Create New...

Important Information

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