Jump to content

Recommended Posts

Posted

Hello,

 

First of all, I need to let you know that I am new to the forums and Minecraft modding, yes I know the most of the basics from java.

But anyways, I don't know if this is the right section for this topic.

 

So.., too the problem.

Just like the title says, my Forge fails to initialize the game when I add my own mod, but Eclipse runs it without a problem/

 

My main jar file with the code:

package com.SurvivalOverhaul.common;

import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;

import com.SurvivalOverhaul.common.lib.ProxyCommon;
import com.SurvivalOverhaul.common.lib.References;

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.registry.GameRegistry;

@Mod(modid = References.MODID, name = References.NAME,  version = References.VERSION)
public class SurvivalOverhaul {

@SidedProxy(clientSide = References.Client, serverSide = References.Common)
public static ProxyCommon proxy;

@EventHandler
public void init(FMLInitializationEvent event) 
{

}

@EventHandler
public void load (FMLInitializationEvent event) {
	proxy.registerRenderInformation();
}

public SurvivalOverhaul() {
	//Item registry
        //GameReg
GameRegistry.addShapedRecipe(new ItemStack(Blocks.web), "XXX", "XXX", "XXX", 'X', Items.string);
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.obsidian), Items.water_bucket, Items.lava_bucket );
GameRegistry.addShapedRecipe(new ItemStack(Items.record_11), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.coal);
GameRegistry.addShapedRecipe(new ItemStack(Items.record_13), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.gold_nugget);
GameRegistry.addShapedRecipe(new ItemStack(Items.record_cat), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.emerald);
GameRegistry.addShapedRecipe(new ItemStack(Items.record_blocks), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.brick);
GameRegistry.addShapedRecipe(new ItemStack(Items.record_chirp), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.redstone);
GameRegistry.addShapedRecipe(new ItemStack(Items.record_far), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.poisonous_potato);
GameRegistry.addShapedRecipe(new ItemStack(Items.record_mall), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', new ItemStack(Items.dye, 1, 13));
GameRegistry.addShapedRecipe(new ItemStack(Items.record_mellohi), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.potionitem);
GameRegistry.addShapedRecipe(new ItemStack(Items.record_stal), "XXX", "XXX", "XXX", 'X', Blocks.obsidian);
GameRegistry.addShapedRecipe(new ItemStack(Items.record_strad), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.bone);
GameRegistry.addShapedRecipe(new ItemStack(Items.record_ward), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.ender_pearl);
GameRegistry.addShapedRecipe(new ItemStack(Items.record_wait), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.diamond);
GameRegistry.addShapedRecipe(new ItemStack(Items.saddle), "XXX", "XSX", " I ", 'X', Items.leather, 'S', Items.string, 'I', Items.iron_ingot);
GameRegistry.addShapelessRecipe(new ItemStack(Items.clay_ball), Blocks.dirt, Items.water_bucket);
}
}

 

My crash log from main Minecraft:

---- Minecraft Crash Report ----
// Hey, that tickles! Hehehe!

Time: 24-5-14 16:31
Description: Initializing game

java.lang.NoSuchFieldError: web
at com.SurvivalOverhaul.common.SurvivalOverhaul.<init>(SurvivalOverhaul.java:38)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at cpw.mods.fml.common.ILanguageAdapter$JavaAdapter.getNewInstance(ILanguageAdapter.java:173)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:486)
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:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
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:209)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188)
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:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
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:119)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:489)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:202)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:465)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:813)
at net.minecraft.client.main.Main.main(SourceFile:103)
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:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


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

-- Head --
Stacktrace:
at com.SurvivalOverhaul.common.SurvivalOverhaul.<init>(SurvivalOverhaul.java:38)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at cpw.mods.fml.common.ILanguageAdapter$JavaAdapter.getNewInstance(ILanguageAdapter.java:173)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:486)
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:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
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:209)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188)
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:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
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:119)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:489)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:202)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:465)

-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:813)
at net.minecraft.client.main.Main.main(SourceFile:103)
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:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 70810056 bytes (67 MB) / 223870976 bytes (213 MB) up to 954728448 bytes (910 MB)
JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.01-pre FML v7.2.156.1060 Minecraft Forge 10.12.1.1060 4 mods loaded, 4 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML{7.2.156.1060} [Forge Mod Loader] (forge-1.7.2-10.12.1.1060.jar) Unloaded->Constructed
Forge{10.12.1.1060} [Minecraft Forge] (forge-1.7.2-10.12.1.1060.jar) Unloaded->Constructed
SurvivalOverhaul{Alpha 0.0.2} [survival Overhaul] (Choco's Survival Overhaul.jar) Unloaded
Launched Version: 1.7.2-Forge10.12.1.1060
LWJGL: 2.9.0
OpenGL: GeForce GT 520M/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: [CodeCrafted Custom.zip]
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
Anisotropic Filtering: On (16)

Posted

Keeps crashing with same error.

Hopefully I didn't forgot something.

Oh yes.. I use 1.7.2

 

package com.SurvivalOverhaul.common;

import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;

import com.SurvivalOverhaul.common.lib.ProxyCommon;
import com.SurvivalOverhaul.common.lib.References;

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.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;

@Mod(modid = References.MODID, name = References.NAME,  version = References.VERSION)
public class SurvivalOverhaul {

@SidedProxy(clientSide = References.Client, serverSide = References.Common)
public static ProxyCommon proxy;

@EventHandler
public void PreInit(FMLPreInitializationEvent event) {
	 GameRegistry.addShapedRecipe(new ItemStack(Blocks.web), "XXX", "XXX", "XXX", 'X', Items.string);
	 GameRegistry.addShapelessRecipe(new ItemStack(Blocks.obsidian), Items.water_bucket, Items.lava_bucket );
	 GameRegistry.addShapedRecipe(new ItemStack(Items.record_11), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.coal);
	 GameRegistry.addShapedRecipe(new ItemStack(Items.record_13), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.gold_nugget);
	 GameRegistry.addShapedRecipe(new ItemStack(Items.record_cat), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.emerald);
	 GameRegistry.addShapedRecipe(new ItemStack(Items.record_blocks), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.brick);
	 GameRegistry.addShapedRecipe(new ItemStack(Items.record_chirp), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.redstone);
	 GameRegistry.addShapedRecipe(new ItemStack(Items.record_far), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.poisonous_potato);
	 GameRegistry.addShapedRecipe(new ItemStack(Items.record_mall), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', new ItemStack(Items.dye, 1, 13));
	 GameRegistry.addShapedRecipe(new ItemStack(Items.record_mellohi), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.potionitem);
	 GameRegistry.addShapedRecipe(new ItemStack(Items.record_stal), "XXX", "XXX", "XXX", 'X', Blocks.obsidian);
	 GameRegistry.addShapedRecipe(new ItemStack(Items.record_strad), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.bone);
	 GameRegistry.addShapedRecipe(new ItemStack(Items.record_ward), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.ender_pearl);
	 GameRegistry.addShapedRecipe(new ItemStack(Items.record_wait), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.diamond);
	 GameRegistry.addShapedRecipe(new ItemStack(Items.saddle), "XXX", "XSX", " I ", 'X', Items.leather, 'S', Items.string, 'I', Items.iron_ingot);
	 GameRegistry.addShapelessRecipe(new ItemStack(Items.clay_ball), Blocks.dirt, Items.water_bucket);
}

@EventHandler
public void init(FMLInitializationEvent event) 
{

}

@EventHandler
public void load (FMLInitializationEvent event) {
	proxy.registerRenderInformation();
}

}

Posted

How are you building your jar?

You're trying to run non-obfusicated code which will not work.

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

Posted

Rewriting code with a SampleBlock now as a test subject, hopefully it will work.

 

Here's my new code:

package com.SurvivalOverhaul.common;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
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.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid = SurvivalOverhaul.MODID, name = SurvivalOverhaul.NAME,  version = SurvivalOverhaul.VERSION)
public class SurvivalOverhaul {
@SidedProxy(clientSide = "com.SurvivalOverhaul.common.ClientProxy", serverSide = "com.SurvivalOverhaul.common.CommonProxy")
public static CommonProxy proxy;

public static final String MODID = "SurvivalOverhaul"; //Main use other than registry is for tex.
public static final String VERSION = "Alpha 0.0.2"; //Version
public static final String NAME = "Choco's Survival Overhaul"; //Name

//Blocks
public static Block SampleBlock = new SampleBlockClass(3000, Material.rock).setBlockName("SampleBlock");

public SurvivalOverhaul() {
	GameRegistry.registerBlock(SampleBlock, "SampleBlock");
}
}

Posted

Don't do ANYTHING in the constructor, but in the PreInit phase. If you don't know what that means, go read some tutorials on the wiki, as you need that for sure.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

PreInit doesn't fix the crashes :S.

 

Oh by the way.., Minecraft won't texture my custom block.

 

 

====

Edit =

====

 

Minecraft error is getting less, but it has a problem with this line of code:

Block SampleBlock = new SampleBlockClass(3000, Material.rock).setBlockName("SampleBlock");

 

With the error:

Caused by: java.lang.NoSuchFieldError: rock
at com.SurvivalOverhaul.common.SurvivalOverhaul.preInit(SurvivalOverhaul.java:30)

 

In the code:

package com.SurvivalOverhaul.common;

import com.SurvivalOverhaul.common.Block.SampleBlockClass;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
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.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid = SurvivalOverhaul.MODID, name = SurvivalOverhaul.NAME,  version = SurvivalOverhaul.VERSION)
public class SurvivalOverhaul {
@SidedProxy(clientSide = "com.SurvivalOverhaul.common.ClientProxy", serverSide = "com.SurvivalOverhaul.common.CommonProxy")
public static CommonProxy proxy;

public static final String MODID = "SurvivalOverhaul"; //Main use other than registry is for textures.
public static final String VERSION = "Alpha 0.0.2"; //Version
public static final String NAME = "Choco's Survival Overhaul"; //Name

@Instance
public static SurvivalOverhaul instance;

@EventHandler
public void preInit(FMLPreInitializationEvent e) {
	Block SampleBlock = new SampleBlockClass(3000, Material.rock).setBlockName("SampleBlock");
	GameRegistry.registerBlock(SampleBlock, "SampleBlock");
}

@EventHandler
public void init(FMLInitializationEvent e) {

}
}

 

Textures still won't load for the custom block.

Posted
  On 5/24/2014 at 6:07 PM, LexManos said:

How are you building your jar?

You're trying to run non-obfusicated code which will not work.

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

Posted
  On 5/24/2014 at 8:16 PM, LexManos said:

  Quote

How are you building your jar?

You're trying to run non-obfusicated code which will not work.

 

Really confused now, I don't know what I do wrong :P.

Also I don't know why the texture isn't loading.

Posted

Why are people like this? I've asked a question that is important o solving your issue. ANSWER 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

Posted
  On 5/24/2014 at 8:44 PM, LexManos said:

Why are people like this? I've asked a question that is important o solving your issue. ANSWER IT.

 

 

Whoops didn't notice it was a question, sorry.

Here is a screenshot on how it looks in my Eclipse:

 

This is in the SampleBlockClass:

package com.SurvivalOverhaul.common.Block;

import com.SurvivalOverhaul.common.SurvivalOverhaul;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;

public class SampleBlockClass extends Block {

public SampleBlockClass(int id) {
	super(Material.rock);
	this.setCreativeTab(CreativeTabs.tabBlock);
	this.setHardness(5F);
	this.setResistance(7.0F);
	this.setBlockTextureName(SurvivalOverhaul.MODID + ":" + "SampleBlock");
}


}

----

I will use links every time by the way.

On every site, It won't accept my attachments.

Posted

The jar you are putting into the client. Outside of eclipse.

How are you making THAT!

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

Posted
  On 5/24/2014 at 10:51 PM, LexManos said:

The jar you are putting into the client. Outside of eclipse.

How are you making THAT!

 

Calm down man.., I thought you ment how I build it in eclipse.

 

But I simply click "Export"-> "JAR file" -> select "src/main/java" and "src/main/resources" -> "Finish"

I might go wrong there maybe?

 

  Quote

MODID and any part of package path should not contain capital letters. Get rid of them and use lower-case only.

 

Personally I think that shouldn't matter.

Posted
  On 5/25/2014 at 9:25 AM, Chocolate_with said:
Personally I think that shouldn't matter.

 

... but it matters. You can't simply break a Java convention.

 

  Quote
Package names are written in all lower case to avoid conflict with the names of classes or interfaces.

 

(see "Naming a package")

Posted

Oh dear.., I can't rename those packages :/.

 

Reason:

 

A resource exists with a different case:

'/Minecraft/src/main/java/com/SurvivalOverhaul'

------ Renamed Packages ------------

 

Crash still occurrs, also my custom block isn't loading it's textures.

 

it is in src/main/resources/assests/survivaloverhaul/textures/blocks/sampleblock.png

 

However, the lang file is working.

this one is in:

src/main/resources/assets/survivaloverhaul/lang/en_US.lang

Posted
  On 5/25/2014 at 10:56 AM, diesieben07 said:

First: you need to build your jar by running gradlew build, it will produce the jar in build/libs. That is because you need to reobfuscate your mod, which eclipse cannot do.

For renaming your package: That is because in Windows file names don't care about casing. Rename it to something else first, then to the lowercase version.

 

How do I that exactly?

Oh do you want my previous post wich is just editted?

My custom block won't texture, but the lang is working.

Posted
  On 5/25/2014 at 11:25 AM, diesieben07 said:

"that"? I covered multiple things in my post. For the textures we need your code (main & block class).

I will post my codes again.

 

Main file:

package com.survivaloverhaul.common;

import com.survivaloverhaul.common.block.*;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
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.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid = survivaloverhaul.modid, name = survivaloverhaul.name,  version = survivaloverhaul.version)
public class survivaloverhaul {
@SidedProxy(clientSide = "com.survivaloverhaul.common.ClientProxy", serverSide = "com.survivaloverhaul.common.CommonProxy")
public static CommonProxy proxy;

public static final String modid = "SurvivalOverhaul"; //Main use other than registry is for textures.
public static final String version = "Alpha 0.0.2"; //Version
public static final String name = "Choco's Survival Overhaul"; //Name

@Instance
public static survivaloverhaul instance;

@EventHandler
public void preInit(FMLPreInitializationEvent e) {
	Block sampleblock = new SampleBlock(3000, Material.rock);
	GameRegistry.registerBlock(sampleblock, "SampleBlock");
}

@EventHandler
public void init(FMLInitializationEvent e) {

}

@EventHandler
public void postInit(FMLPostInitializationEvent e) {

}
}

 

Block file

package com.survivaloverhaul.common.block;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;

import com.survivaloverhaul.common.survivaloverhaul;

public class SampleBlock extends Block {

public SampleBlock(int i, Material rock) {
	super(rock);
	this.setBlockName("SampleBlock");
	this.setCreativeTab(CreativeTabs.tabBlock);
	this.setHardness(5f);
	this.setResistance(7.0f);
	this.setBlockTextureName("survivaloverhaul.modid" + ":" + "SampleBlock");
}

}

 

 

By the way, for "How do I that exactly?" I ment how do I reobfuscate via gradlew.bat?

What I have done before I began with this I did open cmd.

typed in: 

 

cd <path to gradlew.bat>

 

then I did enter:

 

gradlew.bat setupDecompWorkspace --refresh-dependencies

 

after that I entered:

 

gradlew.bat eclipse

Posted
  On 5/25/2014 at 11:45 AM, diesieben07 said:

  Quote
public static final String modid = "SurvivalOverhaul";
ModID has to be all lowercase.
  Quote
this.setBlockTextureName("survivaloverhaul.modid" + ":" + "SampleBlock");
This will (literally) try to load the texture from
src/main/resources/assets/survivaloverhaul.modid/textures/blocks/SampleBlock.png

. See the problem?

 

First of all, I didn't notice that modid, changed it now.

It is now

public static final String modid = "survivaloverhaul"

 

You trying to say that I don't need that "this.setBlockTextureName"?

 

----

 

I did run gradlew.bat in a different way.

 

How I did it like I said in my previous post a little bit too late:

open command prompt -> cd <path to gradlew.bat> -> setupDecompWorkspace --refresh-dependencies

 

after that was done I did enter:

gradlew.bat eclipse

Posted
  On 5/25/2014 at 11:59 AM, diesieben07 said:

  Quote
You trying to say that I don't need that "this.setBlockTextureName"?
No, but you need to supply it with something like "modID:blockName". The String "survivaloverhaul.modid" is not your ModID. The String "survivaloverhaul" is, and it's stored in the field
survivaloverhaul.modid

(horrible classname by the way...).

  Quote
I did run gradlew.bat in a different way.

 

How I did it like I said in my previous post a little bit too late:

open command prompt -> cd <path to gradlew.bat> -> setupDecompWorkspace --refresh-dependencies

 

after that was done I did enter:

gradlew.bat eclipse

You do the same, but run gradlew build.

 

I know the classname is horrible :D, I will change it.

Oh and it is my first time doing custom blocks and working in 1.7.2, so that is why I conflict with it.

 

Will enter the path to gradlew.bat again and then I will type in gradlew.bat build

 

 

 

--- Update ----

 

Texture is getting loaded.

 

Client still crashes with error:

 

Caused by: java.lang.NoSuchFieldError: rock

at com.survivaloverhaul.common.survivaloverhaul.preInit(survivaloverhaul.java:31)

Posted
  On 5/25/2014 at 12:24 PM, diesieben07 said:

So you ran gradlew build and then grabbed the jar from build/libs? Did you change your build.gradle?

 

I didn't change build.gradle.

 

I grabbed the jar from build/libs.

 

Sorry for not pointing this out.

Posted

Nope it crashes with error:

Caused by: java.lang.NoSuchFieldError: rock
at com.survivaloverhaul.common.block.SampleBlock.<init>(SampleBlock.java:12)
at com.survivaloverhaul.common.survivaloverhaul.preInit(survivaloverhaul.java:31)

 

line 12 at SampleBlock.java:

	super(Material.rock);

 

line 31 in survivaloverhaul:

Block SampleBlock = (new SampleBlock(3000, 0)).setBlockName("SampleBlock");

 

yes I have changed those.., since I noticed some crash errors in eclipse.. but eclipse don't give crash errors anymore with these codes.

 

 

----

Rechecked the logs when I used the "gradlew.bat build" in command prompt.

There is 1 error given, wich is:

:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.6
1 warining

Posted

Can't upload it as attachment.

due error " Cannot access attachments upload path! "

 

So I made a copy of the original one and opened it with Notepad ++.

Here is the info you wanted:

 

buildscript {
    repositories {
        mavenCentral()
        maven {
            name = "forge"
            url = "http://files.minecraftforge.net/maven"
        }
        maven {
            name = "sonatype"
            url = "https://oss.sonatype.org/content/repositories/snapshots/"
        }
    }
    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
    }
}

apply plugin: 'forge'

version = "1.0"
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "modid"

minecraft {
    version = "1.7.2-10.12.1.1060"
    assetDir = "eclipse/assets"
}

processResources
{
    // this will ensure that this task is redone when the versions change.
    inputs.property "version", project.version
    inputs.property "mcversion", project.minecraft.version

    // replace stuff in mcmod.info, nothing else
    from(sourceSets.main.resources.srcDirs) {
        include 'mcmod.info'
                
        // replace version and mcversion
        expand 'version':project.version, 'mcversion':project.minecraft.version
    }
        
    // copy everything else, thats not the mcmod.info
    from(sourceSets.main.resources.srcDirs) {
        exclude 'mcmod.info'
    }
}

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • ddddddddddddddddd
    • Temu Coupon Code $100 Off [acu729640] First-Time User  Looking for unbeatable savings on your first Temu purchase? You’re in the right place. The Temu Coupon Code $100 Off [acu729640] is the perfect way to start shopping smart. Whether you’re buying trendy fashion, home essentials, or tech gadgets, this offer ensures you save big from day one.   Why Use the Temu Coupon Code (acu729640)? Instant $100 Discount – Slash $100 off your first order with no hidden requirements.   Extra 40% Off on Select Items – Combine your coupon with existing offers for maximum savings.   Free Gifts for New Users – Many first-time buyers receive bonus items at checkout.   $100 Coupon Bundle – Enjoy more savings on future purchases as both new and existing customers can access this deal.   How to Redeem Your $100 Off Coupon Code Visit Temu’s Official Website or App – Access the latest product catalog.   Browse and Add to Cart – Select items you want and place them in your shopping cart.   Proceed to Checkout – Click on the cart icon to review your order.   Enter Coupon Code – In the “Coupon Code” field, type acu729640.   Apply and Save – Watch your total instantly drop by $100.   Complete Your Purchase – Enter your shipping details and payment method to finalize the deal.   Exclusive August 2025 Promotions USA-Only Offer – First-time buyers in the United States get an exclusive $100 off with code acu729640.   Special New User Coupons – Additional promotional codes may be available this month for extra savings.   Pro Tips to Maximize Your Temu Savings Subscribe to the Newsletter – Receive alerts on flash sales, seasonal discounts, and exclusive codes.   Use Smart Filters – Quickly find the best deals on exactly what you’re looking for.   Check Daily Deals – Grab high-demand products at heavily discounted prices.   Read Reviews Before Buying – Learn from other customers to make confident purchase decisions.   Final Takeaway The Temu Coupon Code $100 Off [acu729640] is more than just a discount—it’s your ticket to premium shopping at budget-friendly prices. Combine it with ongoing promotions, explore the daily deals section, and enjoy free gifts as a first-time buyer. From fashion to home décor, Temu delivers exceptional value on every purchase. Start saving today — visit Temu and use your $100 off code before the offer expires.
    • Giriş E-ticaret platformlarında indirim kodları kullanmak, alışveriş deneyimini daha uygun hale getiriyor. Temu Kupon Kodu "(acr639380)" 100TL kapalı kampanyası, özellikle 2025 yılında, tüm kullanıcıları için inanılmaz bir fırsat sunuyor. Bu fırsat sayesinde, özellikle "(acr639380)" kodunu kullanarak maksimum fayda sağlayabilirsiniz. Bu kod, hem yeni hem de mevcut müşteriler için büyük bir avantaj. 2025 yılında "Temu Kupon Kodu" (acr639380) ile "Temu 100TL indirim kuponu" kazancınızı en üst seviyeye çıkarabilirsiniz. Bu yazıda, bu fırsatların detaylarını inceleyeceğiz. Temu Kupon Kodu "(acr639380)" 100TL İndirim Nedir? Hem yeni hem de mevcut müşteriler için özel olarak tasarlanan "Temu kuponu "(acr639380)" 100TL indirim", her alışverişte ciddi tasarruflar sağlama imkânı sunuyor. Şu avantajlardan faydalanabilirsiniz: "(acr639380)" kodu ile yeni kullanıcılara 100TL indirim. Mevcut müşterilere "(acr639380)" kodu ile 100TL indirim. Birden fazla kullanım için 100TL kupon paketi. Yeni müşterilere 100TL ekstra indirim. "(acr639380)" koduyla, "100TL indirim Temu kuponu" kullanarak özel promosyonlar. Temu Kupon Kodu "(acr639380)" Yeni Kullanıcılar için 100TL İndirim Yeni kullanıcılar, Temu platformunda ilk siparişlerinde büyük avantajlar elde edebilirler. "Mevcut kullanıcılar için 100TL indirim kuponu" ve diğer fırsatları da "(acr639380)" kodu ile yakalayabilirsiniz: Yeni kullanıcılara "(acr639380)" kodu ile 100TL indirim. Yeni müşterilere özel 100TL kupon paketi. Birden fazla kullanım için "(acr639380)" ile 100TL kupon avantajı. "Türkiye'ye üretsiz kargo" ile özel teslimat. İlk kez kullananlara herhangi bir alışverişte ekstra 100TL indirim. Temu 100TL İndirim Kupon Kodu "(acr639380)" Yeni Müşteriler için Nasıl Kullanılır? "Temu 100TL indirim" kuponunu kullanmak oldukça kolay ve hızlıdır. Aşağıdaki adımları takip ederek bu fırsattan hemen yararlanabilirsiniz: Temu uygulamasını veya web sitesini açın. Üye kaydı oluşturun veya mevcut hesabınıza giriş yapın. Alışveriş sepetinizi oluşturun. "(acr639380)" kodunu ödeme sayfasında girin. "Temu 100TL kupon kodu" ile anında indirim kazandınız! Temu Kupon Kodu "(acr639380)" Mevcut Kullanıcılar için 100TL İndirim "Mevcut müşteriler için Temu 100TL kupon kodu", sadık kullanıcılarımız için harika bir şekilde tasarlandı. Şu avantajlardan faydalanabilirsiniz: "(acr639380)" kodu ile mevcut Temu kullanıcılarına 100TL ekstra indirim. Birden fazla alışveriş için 100TL kupon paketi. Türkiye’nin her yerine ekspres kargo ile üretsiz hediye. "(acr639380)" kodu ile ekstra 100TL indirim. Mevcut indirimlere ek olarak %70’e varan tasarruf fırsatları. Mevcut Müşteriler için Temu Kupon Kodu "(acr639380)" 100TL İndirim Nasıl Kullanılır? "Mevcut kullanıcılar için Temu Kupon Kodu 100TL" şu adımlarla kullanılabilir: Temu hesabınıza giriş yapın. Alışverişinize özel ürünleri seçin. "(acr639380)" kodunu ödeme ekranında uygulayın. "Mevcut kullanıcılar için Temu indirim kodu" ile tasarrufun tadını çıkarın. Temu Kupon Kodu "(acr639380)" 100TL İndirim Nasıl Bulunur? Doğrulanmış ve çalışan kupon kodlarını bulmanın birkaç yolu vardır: Temu’nun resmi bültenine kaydolun ve "İlk siparişten 100TL indirimli Temu Kupon Kodu" fırsatlarını kaçırAugustın. Sosyal medya sayfalarından en son "100TL indirimli Temu kuponları" hakkında bilgi edinin. Güvenilir kupon sitelerini ziyaret ederek "(acr639380)" kodunu kolayca bulun. 100TL İndirim Kuponları Nasıl Çalışır? "Temu Kupon Kodu" (acr639380)" özellikle "İlk kez kullananlara 100TL indirim" sağlamak için tasarlanmıştır. Kod, alışveriş toplamınızdan otomatik olarak 100TL indirir ve anında tasarruf sağlar. Temu'da Yeni Müşteri Olarak 100TL İndirim Kuponu Nasıl Kazanılır? "Temu Kupon Kodu" (acr639380)" 100TL kapalı fırsatından faydalanmak için Temu’ya kaydolup, kodu ödeme ekranında kullanabilirsiniz. Bu kod, herhangi bir alışveriş için uygundur ve ekstra tasarruf sağlar. Temu 100TL İndirim Kuponlarını Kullanmanın Avantajları Nelerdir? "Temu 100TL kapalı Kupa Kodu" (acr639380)" ile şu avantajlardan yararlanabilirsiniz: İlk siparişte 100TL indirim. Birden fazla kullanım için 100TL kupon paketi. Popüler ürünlerde %70 indirim. Yeni kullanıcılara üretsiz hediye. Türkiye'ye üretsiz teslimat. Son Not Temu Kupon Kodu "(acr639380)" 100TL kapalı fırsatı, hem yeni hem de mevcut kullanıcılar için kaçırılmaz bir şans. Bu kampanya, alışveriş deneyiminizi daha uygun hale getirmek için tasarlandı. Temu 100TL indirim kuponu "(acr639380)", 2025 yılında düzenli olarak kullanabileceğiniz bir fırsattır. Detayları kaçırmadan bu fırsatı değerlendirin!
    • Giriş T e m u Kupon Kodu 3000TL kapalı, 2025 yılında tasarruflarınızı maksimize etmek için en iyi fırsatları sunuyor. Bu çekici kampanya, online alışverişte önemli bir avantaj sağlamaktadır. T e m u Kupon Kodu (acr639380), "Türkiye'deki insanlar için maksimum fayda" taahhüt eder. Yeni ve mevcut müşteriler bu kodu kullanarak çok çeşitli indirimlerden yararlanabilirler. T e m u Kupon Kodu "(acr639380)" mevcut müşteriler için 2025 kampanyası, herkese çarpıcı indirimler sunuyor. T e m u 3000TL indirim kuponu, "Türkiye" çapında özel tekliflerle doludur. T e m u Kupon Kodu "(acr639380)" 3000TL İndirim Nedir? Yeni ve mevcut müşteriler için T e m u Kuponu 3000TL indirim harika bir fırsat sunuyor. Bu kod, 3000TL indirim T e m u Kuponu sayesinde alışverişi daha uygun hale getiriyor. Avantajlar: Yeni kullanıcılar için (acr639380) koduyla 3000TL indirim. Mevcut kullanıcılar için (acr639380) ile ekstra 3000TL indirim. Çoklu kullanımlar için (acr639380) koduyla 3000TL kupon paketi. Yeni müşteriler için ilk siparişte (acr639380) ile ekstra 3000TL indirim. "Türkiye" için özel, (acr639380) ile bedava gönderim. T e m u Kupon Kodu "(acr639380)" 2025 Bu kupon kodunu kullanarak maksimum tasarruf elde edebilirsiniz. T e m u Kupon Kodu 3000TL [(acr639380)] - İndirim Kodu 2025 tekliflerinden yararlanın. Avantajlar: Yeni kullanıcılar için (acr639380) koduyla 3000TL kupon paketi. Birden fazla alışverişte (acr639380) ile 3000TL'ye kadar tasarruf. "Türkiye" için özel (acr639380) ile bedava gönderim. Tüm yeni müşteriler için ekstra 3000TL indirim. Herhangi bir üründe 3000TL'ye kadar tasarruf. T e m u 3000TL İndirim Kuponu "(acr639380)" Nasıl Kullanılır? T e m u 3000TL indirim kuponunu kullanmak kolaydır. İşte basit bir rehber: T e m u uygulamasını veya web sitesini ziyaret edin. Hesabınıza giriş yapın veya yeni bir hesap oluşturun. Alışverişinizi yapın ve sepetinizi oluşturun. "Kupon Kodu" alanına (acr639380) yazın. İndirim otomatik olarak uygulanacaktır. T e m u Kupon Kodu "(acr639380)" Mevcut Kullanıcılar için 3000TL İndirim Mevcut kullanıcılar da bu kupondan faydalanabilir. Mevcut müşteriler için T e m u 3000TL Kupon Kodu, "Türkiye" genelinde cazip indirimler sunuyor. Avantajlar: (acr639380) ile mevcut müşterilere ekstra 3000TL indirim. Birden fazla alışveriş için (acr639380) kupon paketi. "Türkiye" genelinde bedava kargo. Ekstra promosyonlarla tasarrufu maksimize edin. T e m u Kupon Kodu "(acr639380)" 3000TL İndirim Nasıl Bulunur? Doğrulanmış ve test edilmiş T e m u Kupon Kodu bulmak için: T e m u bültenine kaydolun. Sosyal medya sayfalarını takip edin. Güvenilir kupon sitelerini ziyaret edin. T e m u 3000TL İndirim Kuponları Nasıl Çalışır? T e m u Kupon Kodu "(acr639380)" ilk kez kullanana 3000TL indirim sağlar. Kod, sepetinizde otomatik olarak uygulanır. T e m u 3000TL İndirim Kuponlarını Kullanmanın Avantajları Nelerdir? Avantajlar: İlk siparişte 3000TL indirim. Birden fazla alışverişte 3000TL kupon paketi. Popüler ürünlerde %70'e varan indirim. Mevcut müşterilere ekstra 3000TL indirim. "Türkiye" genelinde özel bedava gönderim. Son Not T e m u Kupon Kodu "(acr639380)" 3000TL kapalı, 2025 yılında alışverişte büyük tasarruf sağlama şansı sunuyor. Kodunuzu kullanın ve alışverişinizi daha hesaplı hale getirin. T e m u 3000TL indirim kuponu (acr639380), hem yeni hem de mevcut kullanıcılar için idealdir. Hemen faydalanın!
    • Unlocking incredible savings on your favorite finds just got easier with the Temu coupon code (acr639380)! Whether you're a new or existing customer, this code, along with (acr639380), opens doors to amazing discounts. Let's dive into how you can maximize your savings and discover the fantastic world of Temu. Temu has quickly become a go-to destination for savvy shoppers seeking a vast selection of trendy products at unbeatable prices. From fashion and home goods to electronics and beauty essentials, Temu offers a huge collection of trending items. And with fast delivery and free shipping available in 67 countries, shopping from Temu is not only convenient but also budget-friendly. I'm excited to share how you can save even more with these exclusive Temu coupon codes. (acr639380): A flat 30% off for new users, making your first Temu purchase even more rewarding. (acr639380): Existing users can also enjoy 30% off, showing Temu's appreciation for loyal customers. (acr639380): Get up to 30% extra off on selected items, stacking your savings potential. (acr639380): New users can receive a free gift with their first purchase, adding a delightful surprise to your order. (acr639380): A 30% off coupon bundle for both new and existing users, providing a comprehensive discount solution. These Temu coupon codes offer a range of benefits, ensuring every shopper can find a way to save. Whether you're a first-time buyer eager to explore Temu's offerings or a returning customer looking for the best deals, these codes have you covered. I've found that using coupon codes is a great way to stretch my budget further and get more of what I love. Temu's commitment to providing value extends beyond just discounts. They frequently introduce new offers, making it easy to stay on top of the latest deals. I'm always impressed by the variety of products and the competitive pricing. It's like a treasure hunt finding amazing deals! Temu coupon code 30% off for USA (acr639380) Temu coupon code 30% off for Canada (acr639380) Temu coupon code 30% off for UK (acr639380) Temu coupon code 30% off for Japan (acr639380) Temu coupon code 30% off for Mexico (acr639380) Temu coupon code 30% off for Brazil (acr639380) These codes are valid in various regions, allowing shoppers worldwide to experience the Temu savings. Remember to check the terms and conditions for each code to ensure it applies to your specific location and purchase. I always make sure to double-check before I check out! Temu is constantly evolving, with new products and promotions regularly added. Keep an eye out for Temu new offers in 2025 and take advantage of the Temu promo code for 2025 and Temu discount code for 2025 as they become available. These opportunities to save make shopping even more enjoyable. Here are some additional tips for maximizing your savings on Temu: Combine coupon codes with sale items: Look for products already on sale and apply your Temu coupon code for an even greater discount. Take advantage of free shipping: Temu offers free shipping to many countries, so be sure to meet the minimum purchase requirement to save on shipping costs. Check for bundle deals: Sometimes, Temu offers bundle deals where you can purchase multiple items at a discounted price. These can be a great way to save if you need several items. Sign up for the Temu newsletter: Stay informed about the latest promotions and exclusive coupon codes by subscribing to the Temu newsletter. I've found that by combining these strategies, I can save a significant amount of money on my Temu purchases. It's like getting rewarded for being a smart shopper! Temu also offers a Temu coupon Bundle, which can include a variety of discounts and offers. This can be a great option for both new and existing users, providing a comprehensive way to save. I'm a big fan of these bundles as they often include discounts on items I frequently purchase. For new users, there's often a Temu first time user coupon available, providing an extra incentive to try Temu. This Temu new user coupon, along with the Temu coupon codes for new users, makes it an ideal time to explore the platform and discover its offerings. I remember how excited I was to use my first Temu coupon! Existing users are not forgotten! Temu also provides Temu coupon codes for existing users, ensuring that loyal customers can continue to enjoy savings. The Temu coupon code 30% off is a popular choice for both new and existing users. I encourage you to explore Temu and discover the wide array of products available. With the Temu coupon code (acr639380) , along with other available coupon codes, you can make your shopping experience even more rewarding. Remember to check for the Temu coupon for 2025, Temu discount code for 2025, and Temu promo code for 2025 as the year progresses. Remember to keep an eye out for the latest Temu new offers in 2025. Temu is always updating its product selection and offering new ways to save. I'm constantly amazed by the new and innovative products I find on Temu. Using the Temu coupon code (acr639380) is a simple yet effective way to maximize your savings. Whether you're looking for a Temu coupon code, Temu coupon code 30% off, Temu coupon code 30% off, Temu 30% coupon bundle, Temu coupons for new users, Temu coupons for existing users, Temu promo code, or Temu discount code, you're sure to find a way to save on your next Temu purchase. I hope this information helps you save big on your Temu shopping spree. Happy shopping!  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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