Then you just need to add a class (in this case, MyTileEntity) that extends the TileEntity class. I may add a tutorial on all this later, been so busy with other things I haven't had any time for MC modding.
Hey, can I make a request ? Could you make a tutorial on Metadata Blocks, and how to add sided textures to them ?
Anyways, really cool tutorials, I really like them!
My current plan is to do another series of more advanced tutorials about how to make a block that changes colors. The first part should be on how to add block metadata and then things like packet handling, implementing a gui, and tile entities. Not sure how long it will be until I add that though, still working on my own mod.
The metadata stuff from 1.6 tutorials should be very close to what you need if you want to try those. I don't think much has changed in those areas except for the block ID stuff. For sided textures, you can use the tutorial I gave here, but modify it to use the second parameter of the getIcon() method to return the texture based upon metadata.
I understand what you're asking, and the last sentence says how to go about implementing it. You declare and register the extra textures as normal, then return different values via getIcon() depending upon the metadata. Here's an example:
@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon(int side, int metadata)
{
if (metadata == 1) {
if (side == 1) {
return metaIconTop;
} else {
return metaIcon;
}
}
if (side == 1) {
return blockIconTop;
} else {
return blockIcon;
}
}
So if the metadata equals 1, it returns metaIconTop for the top and metaIcon for the other sides. For all other cases, it returns blockIconTop for the top and blockIcon for the other sides.
For anyone just starting with this, I tracked my progress through this in git and added a tag at each step. (Well, most steps) I also annotated it with my thoughts as a programmer coming from a non-Java background, and on where I differed from the tutorial and why. (Note that my reasoning as written in there may not be correct...!) As an added bonus, you can even cajole github into showing you the diff between each tag! Although it'll look mostly like what's in the tutorial...
The biggest differences between my code there and Sea Bass' are:
making separate classes for the block with the same texture on all sides vs the block with a different texture on one side
making a separate class for the mob that uses the advanced AI
Could you do a tutorial on adding a crafting recipe? I suppose also smelting and stuff too, but I can't find an up-to-date crafting recipe code to learn from, thanks in advance :D.
Would you mind making a tutorial about how to make a custom block that can be set in any orientation. You have a sided block tutorial but of course that block can only be set bottom down. What about a custom block like a log or haystack that can take any orientation?
instead of having all of that code in all of your block classes, say you are making a bunch of ores. You can make an "OreHandler" Class and then put that code in there and just "extend" all of the ore classes to that handler class. here is some example code of the Handler class.
package com.whitenrdy.labcraft.blocks;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import com.whitenrdy.labcraft.LabCraft;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class OreHandler extends Block {
@SideOnly(Side.CLIENT)
protected IIcon blockIcon;
public OreHandler() {
super(Material.ground);
this.setCreativeTab(LabCraft.labCraft);
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister p_149651_1_)
{
blockIcon = p_149651_1_.registerIcon(LabCraft.MODID + ":" + this.getUnlocalizedName().substring(5));
}
@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon(int p_149691_1_, int p_149691_2_)
{
return blockIcon;
}
}
Here is some example code of the ore class
package com.whitenrdy.labcraft.blocks;
import com.whitenrdy.labcraft.LabCraft;
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.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.util.IIcon;
public class OreSilver extends OreHandler {
public OreSilver() {
super();
}
}
instead of having all of that code in all of your block classes, say you are making a bunch of ores. You can make an "OreHandler" Class and then put that code in there and just "extend" all of the ore classes to that handler class. here is some example code of the Handler class.
If you're making blocks that are that simple, there's not even any need to make any classes, just use Block and chain the methods you need off the end. Still, that's a pretty standard coding practice for many people, myself included (sometimes... xD), to make a base class that does the grunt work, not really something that is specific to Minecraft modding. I guess it doesn't hurt to demo stuff like this, though, since many people seem to be learning to code at the same time they are learning to mod.
Hello, I am having a problem with the proxy in the entity rendering section of the tutorial. The version of forge i am using is: 10.12.0.1052
Main class code (called viking)
package code.vkdrg.Viking;
import java.util.Random;
import Viking.proxy.CommonProxy;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityList;
import net.minecraft.item.Item;
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.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
@Mod(modid=Constants.MODINFO.MODID,
name=Constants.MODINFO.MODNAME,
version=Constants.MODINFO.MODVERSION)
public class Viking
{
//tells the game this existes
public static Block blockTest;
public static Item ItemTest;
//public static CreativeTabs tabMyMod = new CreativeTabsMyMod("MyMod");
@Instance(Constants.MODINFO.MODID)
public static Viking instance;
@SidedProxy(clientSide="Viking.proxy.ClientProxy", serverSide="Viking.proxy.CommonProxy")
public static CommonProxy proxy;
@EventHandler
public void Init(FMLPreInitializationEvent event)
{
//initalize the blocks/items
blockTest=new BlcokTest();
ItemTest=new ItemTest();
//register the blocks/items
GameRegistry.registerBlock(blockTest, blockTest.getUnlocalizedName().substring(5));
GameRegistry.registerItem(ItemTest, ItemTest.getUnlocalizedName().substring(5));
registerEntity(EntityTest.class,"entityTest");
proxy.registerRenderers();
}
@EventHandler
public void loadInit(FMLInitializationEvent event)
{
}
@SuppressWarnings("unchecked")
public static void registerEntity(Class entityClass, String name)
{
int entityID=EntityRegistry.findGlobalUniqueEntityId();
long seed=name.hashCode();
Random rand=new Random(seed);
int primaryColor=rand.nextInt()*16777215;
int secondaryColor=rand.nextInt()*16777215;
EntityRegistry.registerGlobalEntityID(entityClass, name, entityID);
EntityRegistry.registerModEntity(entityClass, name, entityID, instance, 64, 1, true);
EntityList.entityEggs.put(Integer.valueOf(entityID), new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor));
}
}
EntityTest class
package code.vkdrg.Viking;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.world.World;
public class EntityTest extends EntityMob
{
public EntityTest(World par1World)
{
super(par1World);
}
}
The render Class
package code.vkdrg.Viking;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.entity.RenderBiped;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
public class RenderTest extends RenderBiped
{
private static final ResourceLocation textureLocation =
new ResourceLocation(Constants.MODINFO.MODID+":"+"textures/models/entityTest.png");
public RenderTest(ModelBiped par1ModelBiped, float par2)
{
super(par1ModelBiped, par2);
}
@Override
protected ResourceLocation getEntityTexture(Entity par1Entity)
{
return textureLocation;
}
}
The client proxy
package Viking.proxy;
import net.minecraft.client.model.ModelBiped;
import code.vkdrg.Viking.EntityTest;
import code.vkdrg.Viking.RenderTest;
import cpw.mods.fml.client.registry.RenderingRegistry;
public class ClientProxy
{
public void registerRenderers()
{
RenderingRegistry.registerEntityRenderingHandler(EntityTest.class, new RenderTest(new ModelBiped(),0.5F));
}
}
the server proxy
package Viking.proxy;
public class CommonProxy {
public void registerRenderers() {
// Nothing here as the server doesn't render graphics or entities!
}
}
The Error Message i broke it up ito sections to make it easyer to read as oppose to a giant wall of text
[10:58:55] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[10:58:55] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[10:58:55] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[10:58:55] [main/INFO] [FML]: Forge Mod Loader version 7.2.137.1052 for Minecraft 1.7.2 loading
[10:58:55] [main/INFO] [FML]: Java is Java HotSpotâ„¢ 64-Bit Server VM, version 1.7.0_51, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7
[10:58:55] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[10:58:55] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[10:58:55] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[10:58:55] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[10:58:55] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[10:58:55] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[10:58:55] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[10:58:55] [main/ERROR] [FML]: The minecraft jar file:/C:/Users/CADCOMP/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.0.1052/forgeSrc-1.7.2-10.12.0.1052.jar!/net/minecraft/client/ClientBrandRetriever.class appears to be corrupt! There has been CRITICAL TAMPERING WITH MINECRAFT, it is highly unlikely minecraft will work! STOP NOW, get a clean copy and try again!
[10:58:55] [main/ERROR] [FML]: FML has been ordered to ignore the invalid or missing minecraft certificate. This is very likely to cause a problem!
[10:58:55] [main/ERROR] [FML]: Technical information: ClientBrandRetriever was at jar:file:/C:/Users/CADCOMP/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.0.1052/forgeSrc-1.7.2-10.12.0.1052.jar!/net/minecraft/client/ClientBrandRetriever.class, there were 0 certificates for it
[10:58:55] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[10:58:55] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[10:58:55] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
[10:58:56] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[10:58:57] [main/INFO]: Setting user: Player533
[10:58:57] [Client thread/INFO]: LWJGL Version: 2.9.0
[10:58:58] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
[10:58:58] [Client thread/INFO] [FML]: MinecraftForge v10.12.0.1052 Initialized
[10:58:58] [Client thread/INFO] [FML]: Replaced 141 ore recipies
[10:58:58] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
[10:58:58] [Client thread/INFO] [FML]: Searching C:\Users\CADCOMP\Desktop\MC Mod\Modding\Programs\forge\10.12.0.1052\mods for mods
[10:58:59] [Client thread/ERROR] [FML]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.FMLRenderAccessLibrary. This is generally a severe programming error. There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!
[10:59:00] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
[10:59:00] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Viking
[10:59:01] [Client thread/ERROR] [FML]: Attempted to load a proxy type Viking.proxy.ClientProxy into code.vkdrg.Viking.Viking.proxy, but the types don't match
[10:59:01] [Client thread/ERROR] [FML]: An error occured trying to load a proxy into {clientSide=Viking.proxy.ClientProxy, serverSide=Viking.proxy.CommonProxy}.code.vkdrg.Viking.Viking
cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:69) [ProxyInjector.class:?]
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:492) [FMLModContainer.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) [guava-15.0.jar:?]
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) [guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) [guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) [guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:267) [guava-15.0.jar:?]
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209) [LoadController.class:?]
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) [LoadController.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) [guava-15.0.jar:?]
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) [guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) [guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) [guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:267) [guava-15.0.jar:?]
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) [LoadController.class:?]
at cpw.mods.fml.common.Loader.loadMods(Loader.java:484) [Loader.class:?]
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:201) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:892) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Apr 09, 2014 10:59:01 AM com.google.common.eventbus.EventBus dispatch
SEVERE: Could not dispatch event: cpw.mods.fml.common.event.FMLConstructionEvent@4e422de7 to handler [wrapper public void cpw.mods.fml.common.FMLModContainer.constructMod(cpw.mods.fml.common.event.FMLConstructionEvent)]
java.lang.reflect.InvocationTargetException
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:484)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:201)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:892)
at net.minecraft.client.main.Main.main(Main.java:112)
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)
Caused by: cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:76)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:492)
... 32 more
Caused by: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:69)
... 33 more
[10:59:01] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from CONSTRUCTING to PREINITIALIZATION. Loading cannot continue
[10:59:01] [Client thread/ERROR] [FML]:
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML{7.2.137.1052} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1052.jar) Unloaded->Constructed
Forge{10.12.0.1052} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1052.jar) Unloaded->Constructed
vkdrg{0.0.1} [Viking] (bin) Unloaded->Errored
[10:59:01] [Client thread/ERROR] [FML]: The following problems were captured during this phase
[10:59:01] [Client thread/ERROR] [FML]: Caught exception from vkdrg
cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:76) ~[ProxyInjector.class:?]
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:492) ~[FMLModContainer.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) ~[guava-15.0.jar:?]
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:267) ~[guava-15.0.jar:?]
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209) ~[LoadController.class:?]
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) ~[LoadController.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) ~[guava-15.0.jar:?]
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:267) ~[guava-15.0.jar:?]
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) [LoadController.class:?]
at cpw.mods.fml.common.Loader.loadMods(Loader.java:484) [Loader.class:?]
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:201) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:892) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Caused by: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:69) ~[ProxyInjector.class:?]
... 33 more
---- Minecraft Crash Report ----
// You're mean.
Time: 4/9/14 10:59 AM
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:76)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:492)
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:484)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:201)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:892)
at net.minecraft.client.main.Main.main(Main.java:112)
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)
Caused by: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:69)
... 33 more
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_51, Oracle Corporation
Java VM Version: Java HotSpotâ„¢ 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 235810456 bytes (224 MB) / 359137280 bytes (342 MB) up to 2861563904 bytes (2729 MB)
JVM Flags: 0 total;
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.137.1052 Minecraft Forge 10.12.0.1052 4 mods loaded, 4 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML{7.2.137.1052} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1052.jar) Unloaded->Constructed
Forge{10.12.0.1052} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1052.jar) Unloaded->Constructed
vkdrg{0.0.1} [Viking] (bin) Unloaded->Errored
#@!@# Game crashed! Crash report saved to: #@!@# C:\Users\CADCOMP\Desktop\MC Mod\Modding\Programs\forge\10.12.0.1052\.\crash-reports\crash-2014-04-09_10.59.01-client.txt
Help me tutorial master your my only hope (please read in the princess leia voice)
After researching a fair bit and getting feedback from some known expert modders, I think using the globalID to register the entities in addition to the modEntityID registration is not correct. See the discussion here: http://www.minecraftforge.net/forum/index.php?topic=14600.0
I actually think the actual answer is that you should use one or the other method, but not both! GlobalID is easier for beginners because it comes with a spawn egg and /summon command, etc. but isn't really best practice because it has potential issue of running out of IDs if loaded with other mods.
The recommended expert method is to use registerModEntity only and create your own spawn egg item. I've done this recently and it isn't that hard, but it does take a little bit of work.
I think the way you show it actually double registers your entity and may cause some issue that is invisible but lurking in the system. I had a lot of trouble figuring this out because I used to do it the way you show and it does appear to work (you get a spawn egg, and have registered entities) so figured nothing was wrong.
Basically the idea is that there is a global entity list that is limited to 255 entries and needs a unique id across all mods, and there is a mod entity mapping that only is unique to the mod and isn't limited in number. The latter is obviously a more structured way of having mods exist together.
After researching a fair bit and getting feedback from some known expert modders, I think using the globalID to register the entities in addition to the modEntityID registration is not correct. See the discussion here: http://www.minecraft...p?topic=14600.0
I actually think the actual answer is that you should use one or the other method, but not both! GlobalID is easier for beginners because it comes with a spawn egg and /summon command, etc. but isn't really best practice because it has potential issue of running out of IDs if loaded with other mods.
The recommended expert method is to use registerModEntity only and create your own spawn egg item. I've done this recently and it isn't that hard, but it does take a little bit of work.
I think the way you show it actually double registers your entity and may cause some issue that is invisible but lurking in the system. I had a lot of trouble figuring this out because I used to do it the way you show and it does appear to work (you get a spawn egg, and have registered entities) so figured nothing was wrong.
Basically the idea is that there is a global entity list that is limited to 255 entries and needs a unique id across all mods, and there is a mod entity mapping that only is unique to the mod and isn't limited in number. The latter is obviously a more structured way of having mods exist together.
So how do you get entities working with spawn eggs and /summon without using registerGlobalEntityID()?
Howdy there. I got into a bit of snag that I'm struggling with.
I managed to get a block, with different textures on all sides, even made the block obey the players position. However, when I place the block in lets say north, the texture is fine, but if i place it is the south direction, the texture is flipped. How can I deal with this?
public void onBlockPlacedBy(World par1World, int x, int y, int z, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack)
{
int whichDirectionFacing = MathHelper.floor_double((double)(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F) + 2.5D) & 3;
par1World.setBlockMetadataWithNotify(x, y, z, whichDirectionFacing, 2);
}
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon faceIcon;
@SideOnly(Side.CLIENT)
private IIcon blockIcon;
public void registerBlockIcons(IIconRegister register){
topIcon = register.registerIcon(ModBase.ID + ":" + this.getUnlocalizedName().substring(5) + "Top");
faceIcon = register.registerIcon(ModBase.ID + ":" + this.getUnlocalizedName().substring(5) + "Face");
blockIcon = register.registerIcon(ModBase.ID + ":" + this.getUnlocalizedName().substring(5) + "Side");
}
@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon(int side, int metadata){
if (side == 1) return this.topIcon;
else if (side == 0) return this.topIcon;
else if (metadata == 2 && side == 2) return this.faceIcon;
else if (metadata == 3 && side == 5) return this.faceIcon;
else if (metadata == 0 && side == 3) return this.faceIcon;
else if (metadata == 1 && side == 4) return this.faceIcon;
else return this.blockIcon;
}
}
Thats what I got, using metadata to obey rotation, but it can't obey mirroring
Howdy there. I got into a bit of snag that I'm struggling with.
I managed to get a block, with different textures on all sides, even made the block obey the players position. However, when I place the block in lets say north, the texture is fine, but if i place it is the south direction, the texture is flipped. How can I deal with this?
Thats what I got, using metadata to obey rotation, but it can't obey mirroring
There may be a better way of doing it, but you could simply use a different texture that's a mirrored version.
In addition to the stuff I already mentioned, you need this line somewhere in your mod's PreInitialization to register a tile entity.
Then you just need to add a class (in this case, MyTileEntity) that extends the TileEntity class. I may add a tutorial on all this later, been so busy with other things I haven't had any time for MC modding.
Thanks coolAlias! Your posts here have helped me out immensely in understanding MC modding.
My current plan is to do another series of more advanced tutorials about how to make a block that changes colors. The first part should be on how to add block metadata and then things like packet handling, implementing a gui, and tile entities. Not sure how long it will be until I add that though, still working on my own mod.
The metadata stuff from 1.6 tutorials should be very close to what you need if you want to try those. I don't think much has changed in those areas except for the block ID stuff. For sided textures, you can use the tutorial I gave here, but modify it to use the second parameter of the getIcon() method to return the texture based upon metadata.
So if the metadata equals 1, it returns metaIconTop for the top and metaIcon for the other sides. For all other cases, it returns blockIconTop for the top and blockIcon for the other sides.
For anyone just starting with this, I tracked my progress through this in git and added a tag at each step. (Well, most steps) I also annotated it with my thoughts as a programmer coming from a non-Java background, and on where I differed from the tutorial and why. (Note that my reasoning as written in there may not be correct...!) As an added bonus, you can even cajole github into showing you the diff between each tag! Although it'll look mostly like what's in the tutorial...
The biggest differences between my code there and Sea Bass' are:
Thanks in advance!
Is this a response to my tutorials? I'm a little confused. That is the method I used to set item textures.
Here is some example code of the ore class
If you're making blocks that are that simple, there's not even any need to make any classes, just use Block and chain the methods you need off the end. Still, that's a pretty standard coding practice for many people, myself included (sometimes... xD), to make a base class that does the grunt work, not really something that is specific to Minecraft modding. I guess it doesn't hurt to demo stuff like this, though, since many people seem to be learning to code at the same time they are learning to mod.
Main class code (called viking)
EntityTest class
The render Class
The client proxy
the server proxy
The Error Message i broke it up ito sections to make it easyer to read as oppose to a giant wall of text
[10:58:55] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[10:58:55] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[10:58:55] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[10:58:55] [main/INFO] [FML]: Forge Mod Loader version 7.2.137.1052 for Minecraft 1.7.2 loading
[10:58:55] [main/INFO] [FML]: Java is Java HotSpotâ„¢ 64-Bit Server VM, version 1.7.0_51, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7
[10:58:55] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[10:58:55] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[10:58:55] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[10:58:55] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[10:58:55] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[10:58:55] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[10:58:55] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[10:58:55] [main/ERROR] [FML]: The minecraft jar file:/C:/Users/CADCOMP/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.0.1052/forgeSrc-1.7.2-10.12.0.1052.jar!/net/minecraft/client/ClientBrandRetriever.class appears to be corrupt! There has been CRITICAL TAMPERING WITH MINECRAFT, it is highly unlikely minecraft will work! STOP NOW, get a clean copy and try again!
[10:58:55] [main/ERROR] [FML]: FML has been ordered to ignore the invalid or missing minecraft certificate. This is very likely to cause a problem!
[10:58:55] [main/ERROR] [FML]: Technical information: ClientBrandRetriever was at jar:file:/C:/Users/CADCOMP/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.0.1052/forgeSrc-1.7.2-10.12.0.1052.jar!/net/minecraft/client/ClientBrandRetriever.class, there were 0 certificates for it
[10:58:55] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[10:58:55] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[10:58:55] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
[10:58:56] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[10:58:57] [main/INFO]: Setting user: Player533
[10:58:57] [Client thread/INFO]: LWJGL Version: 2.9.0
[10:58:58] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
[10:58:58] [Client thread/INFO] [FML]: MinecraftForge v10.12.0.1052 Initialized
[10:58:58] [Client thread/INFO] [FML]: Replaced 141 ore recipies
[10:58:58] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
[10:58:58] [Client thread/INFO] [FML]: Searching C:\Users\CADCOMP\Desktop\MC Mod\Modding\Programs\forge\10.12.0.1052\mods for mods
[10:58:59] [Client thread/ERROR] [FML]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.FMLRenderAccessLibrary. This is generally a severe programming error. There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!
[10:59:00] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
[10:59:00] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Viking
[10:59:01] [Client thread/ERROR] [FML]: Attempted to load a proxy type Viking.proxy.ClientProxy into code.vkdrg.Viking.Viking.proxy, but the types don't match
[10:59:01] [Client thread/ERROR] [FML]: An error occured trying to load a proxy into {clientSide=Viking.proxy.ClientProxy, serverSide=Viking.proxy.CommonProxy}.code.vkdrg.Viking.Viking
cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:69) [ProxyInjector.class:?]
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:492) [FMLModContainer.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) [guava-15.0.jar:?]
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) [guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) [guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) [guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:267) [guava-15.0.jar:?]
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209) [LoadController.class:?]
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) [LoadController.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) [guava-15.0.jar:?]
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) [guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) [guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) [guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:267) [guava-15.0.jar:?]
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) [LoadController.class:?]
at cpw.mods.fml.common.Loader.loadMods(Loader.java:484) [Loader.class:?]
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:201) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:892) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Apr 09, 2014 10:59:01 AM com.google.common.eventbus.EventBus dispatch
SEVERE: Could not dispatch event: cpw.mods.fml.common.event.FMLConstructionEvent@4e422de7 to handler [wrapper public void cpw.mods.fml.common.FMLModContainer.constructMod(cpw.mods.fml.common.event.FMLConstructionEvent)]
java.lang.reflect.InvocationTargetException
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:484)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:201)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:892)
at net.minecraft.client.main.Main.main(Main.java:112)
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)
Caused by: cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:76)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:492)
... 32 more
Caused by: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:69)
... 33 more
[10:59:01] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from CONSTRUCTING to PREINITIALIZATION. Loading cannot continue
[10:59:01] [Client thread/ERROR] [FML]:
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML{7.2.137.1052} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1052.jar) Unloaded->Constructed
Forge{10.12.0.1052} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1052.jar) Unloaded->Constructed
vkdrg{0.0.1} [Viking] (bin) Unloaded->Errored
[10:59:01] [Client thread/ERROR] [FML]: The following problems were captured during this phase
[10:59:01] [Client thread/ERROR] [FML]: Caught exception from vkdrg
cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:76) ~[ProxyInjector.class:?]
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:492) ~[FMLModContainer.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) ~[guava-15.0.jar:?]
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:267) ~[guava-15.0.jar:?]
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209) ~[LoadController.class:?]
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) ~[LoadController.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) ~[guava-15.0.jar:?]
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) ~[guava-15.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:267) ~[guava-15.0.jar:?]
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) [LoadController.class:?]
at cpw.mods.fml.common.Loader.loadMods(Loader.java:484) [Loader.class:?]
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:201) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:892) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Caused by: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:69) ~[ProxyInjector.class:?]
... 33 more
---- Minecraft Crash Report ----
// You're mean.
Time: 4/9/14 10:59 AM
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:76)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:492)
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:484)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:201)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:892)
at net.minecraft.client.main.Main.main(Main.java:112)
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)
Caused by: cpw.mods.fml.common.LoaderException
at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:69)
... 33 more
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_51, Oracle Corporation
Java VM Version: Java HotSpotâ„¢ 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 235810456 bytes (224 MB) / 359137280 bytes (342 MB) up to 2861563904 bytes (2729 MB)
JVM Flags: 0 total;
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.137.1052 Minecraft Forge 10.12.0.1052 4 mods loaded, 4 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML{7.2.137.1052} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1052.jar) Unloaded->Constructed
Forge{10.12.0.1052} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1052.jar) Unloaded->Constructed
vkdrg{0.0.1} [Viking] (bin) Unloaded->Errored
#@!@# Game crashed! Crash report saved to: #@!@# C:\Users\CADCOMP\Desktop\MC Mod\Modding\Programs\forge\10.12.0.1052\.\crash-reports\crash-2014-04-09_10.59.01-client.txt
Help me tutorial master your my only hope (please read in the princess leia voice)
I actually think the actual answer is that you should use one or the other method, but not both! GlobalID is easier for beginners because it comes with a spawn egg and /summon command, etc. but isn't really best practice because it has potential issue of running out of IDs if loaded with other mods.
The recommended expert method is to use registerModEntity only and create your own spawn egg item. I've done this recently and it isn't that hard, but it does take a little bit of work.
I think the way you show it actually double registers your entity and may cause some issue that is invisible but lurking in the system. I had a lot of trouble figuring this out because I used to do it the way you show and it does appear to work (you get a spawn egg, and have registered entities) so figured nothing was wrong.
Basically the idea is that there is a global entity list that is limited to 255 entries and needs a unique id across all mods, and there is a mod entity mapping that only is unique to the mod and isn't limited in number. The latter is obviously a more structured way of having mods exist together.
So how do you get entities working with spawn eggs and /summon without using registerGlobalEntityID()?
I haven't done world gen since 1.5, so I probably wont be doing any tutorials for that.
I managed to get a block, with different textures on all sides, even made the block obey the players position. However, when I place the block in lets say north, the texture is fine, but if i place it is the south direction, the texture is flipped. How can I deal with this?
Thats what I got, using metadata to obey rotation, but it can't obey mirroring
There may be a better way of doing it, but you could simply use a different texture that's a mirrored version.