Jump to content

Recommended Posts

Posted

For some reason I'm having an issue here with some && on my item here...

 

Here's what I got goin' in 1.11, underlined where its in the red:

 

package guru.tbe.item;

import guru.tbe.entity.EntityAirOrb;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.util.SoundCategory;
import net.minecraft.world.World;

public class ItemAirOrb extends Item
{
    public ActionResult<ItemStack> onItemRightClick(World itemStackIn, EntityPlayer worldIn, EnumHand playerIn)
    {
        ItemStack itemstack = worldIn.getHeldItem(playerIn);

        if (!worldIn.capabilities.isCreativeMode)
        {
            itemstack.func_190918_g(1);
        }

        itemStackIn.playSound((EntityPlayer)null, worldIn.posX, worldIn.posY, worldIn.posZ, SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));

        if ([u]!itemStackIn[/u] && !worldIn.isSneaking())
        {
             if (!itemStackIn.isRemote)
        {
            EntityAirOrb entitythrowable = new EntityAirOrb(itemStackIn, worldIn);
            entitythrowable.setHeadingFromThrower(worldIn, worldIn.rotationPitch, worldIn.rotationYaw, 0.0F, 1.5F, 1.0F);
            itemStackIn.spawnEntityInWorld(entitythrowable);
        }
        }
        if ([u]!itemStackIn[/u] && worldIn.isSneaking())
        {
            EntityAirOrb entitythrowable = new EntityAirOrb(itemStackIn, worldIn);
            entitythrowable.setHeadingFromThrower(worldIn, worldIn.rotationPitch, worldIn.rotationYaw, 0.0F, 1.5F, 1.0F);
            entitythrowable.addVelocity(0.0, 0.27, 0.0);
            itemStackIn.spawnEntityInWorld(entitythrowable);
        }
        worldIn.addStat(StatList.getObjectUseStats(this));
        return new ActionResult(EnumActionResult.SUCCESS, itemstack);
    }
}

 

 

Is there any idea as to what's going on here?

 

In 1.10.2 this worked amazingly:

 

package guru.tbe.item;

import guru.tbe.entity.EntityAirOrb;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.util.SoundCategory;
import net.minecraft.world.World;

public class ItemAirOrb extends Item
{
    public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand)
    {
        if (!playerIn.capabilities.isCreativeMode)
        {
            --itemStackIn.stackSize;
        }
        worldIn.playSound((EntityPlayer)null, playerIn.posX, playerIn.posY, playerIn.posZ, SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.4F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
        if (!worldIn.isRemote && !playerIn.isSneaking())
        {
            EntityAirOrb entitythrowable = new EntityAirOrb(worldIn, playerIn);
            entitythrowable.func_184538_a(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F);
            worldIn.spawnEntityInWorld(entitythrowable);
        }
        if (!worldIn.isRemote && playerIn.isSneaking())
        {
            EntityAirOrb entitythrowable = new EntityAirOrb(worldIn, playerIn);
            entitythrowable.func_184538_a(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 0.001F, 0.0F);
            entitythrowable.addVelocity(0.0, 0.27, 0.0);
            worldIn.spawnEntityInWorld(entitythrowable);
        }
        playerIn.addStat(StatList.getObjectUseStats(this));
        return new ActionResult(EnumActionResult.SUCCESS, itemStackIn);
    }
}

 

 

Posted

1.10:

if (!worldIn.isRemote && !playerIn.isSneaking())

1.11:

if (!itemStackIn && !worldIn.isSneaking())

 

Are you actually an idiot or are you just pretending?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

This one works:

 

public class ItemAetherOrb extends Item
{
    public ActionResult<ItemStack> onItemRightClick(World itemStackIn, EntityPlayer worldIn, EnumHand playerIn)
    {
        ItemStack itemstack = worldIn.getHeldItem(playerIn);

        if (!worldIn.capabilities.isCreativeMode)
        {
            itemstack.func_190918_g(1);
        }

        itemStackIn.playSound((EntityPlayer)null, worldIn.posX, worldIn.posY, worldIn.posZ, SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));

        if (!itemStackIn.isRemote)
        {
            EntityAetherOrb entitythrowable = new EntityAetherOrb(itemStackIn, worldIn);
            entitythrowable.setHeadingFromThrower(worldIn, worldIn.rotationPitch, worldIn.rotationYaw, 0.0F, 1.5F, 1.0F);
            itemStackIn.spawnEntityInWorld(entitythrowable);
        }
        worldIn.addStat(StatList.getObjectUseStats(this));
        return new ActionResult(EnumActionResult.SUCCESS, itemstack);
    }
}

 

 

 

but I need this for my magic spells so when I hold shift and right click it lobs one in the air and comes back down and hits me:

 

public class ItemAirOrb extends Item
{
    public ActionResult<ItemStack> onItemRightClick(World itemStackIn, EntityPlayer worldIn, EnumHand playerIn)
    {
        ItemStack itemstack = worldIn.getHeldItem(playerIn);

        if (!worldIn.capabilities.isCreativeMode)
        {
            itemstack.func_190918_g(1);
        }

        itemStackIn.playSound((EntityPlayer)null, worldIn.posX, worldIn.posY, worldIn.posZ, SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));

        if (!itemStackIn && !worldIn.isSneaking())
        {
             if (!itemStackIn.isRemote)
        {
            EntityAirOrb entitythrowable = new EntityAirOrb(itemStackIn, worldIn);
            entitythrowable.setHeadingFromThrower(worldIn, worldIn.rotationPitch, worldIn.rotationYaw, 0.0F, 1.5F, 1.0F);
            itemStackIn.spawnEntityInWorld(entitythrowable);
        }
        }
        if (!itemStackIn && worldIn.isSneaking())
        {
            EntityAirOrb entitythrowable = new EntityAirOrb(itemStackIn, worldIn);
            entitythrowable.setHeadingFromThrower(worldIn, worldIn.rotationPitch, worldIn.rotationYaw, 0.0F, 1.5F, 1.0F);
            entitythrowable.addVelocity(0.0, 0.27, 0.0);
            itemStackIn.spawnEntityInWorld(entitythrowable);
        }
        worldIn.addStat(StatList.getObjectUseStats(this));
        return new ActionResult(EnumActionResult.SUCCESS, itemstack);
    }
}

 

 

Its driving me insane!!!!!!!!! asdfhiowehf

 

Are you actually an idiot or are you just pretending?

 

I did quite a bit of studying in the past year, sometimes it works, sometimes it doesn't to be honest... I just do what I can. I could be like Albert Einstein. Speaking of whom, I found two peter max posters sticking out of a dumpster taking out the trash today. Nearly mint condition, one of them the Albert Einstein apollo 11 #1 1969. I also saw a pair of wooden water skiis, they were in mint condition too so I grabbed them as well.

 

I can't imagine who would leave 2 1000$ paper posters and a pair of awesome water skii's in a dumpster... but man, I'm so gladddd I have these posters :) I know I could never afford one. It was an awesome find. - glad I went to see what was inside the vague paper scrolls.

 

edit:

-so next summer I'll go water skiing too. which is super awesome, haven't done that before.

Posted

Are you actually an idiot or are you just pretending?

 

You may be on to something man......... Really its just I have so much going on.

 

Thanks, I can't believe I missed that.... wow.... where's that face palm photo at.... >.< .... geeeez what's wrong with me.... getchyurselftogetherman

 

{
    public ActionResult<ItemStack> onItemRightClick(World itemStackIn, EntityPlayer worldIn, EnumHand playerIn)
    {
        ItemStack itemstack = worldIn.getHeldItem(playerIn);

        if (!worldIn.capabilities.isCreativeMode)
        {
            itemstack.func_190918_g(1);
        }

        itemStackIn.playSound((EntityPlayer)null, worldIn.posX, worldIn.posY, worldIn.posZ, SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));

        if (!itemStackIn.isRemote && !worldIn.isSneaking())
        {
             if (!itemStackIn.isRemote)
        {
            EntityAirOrb entitythrowable = new EntityAirOrb(itemStackIn, worldIn);
            entitythrowable.setHeadingFromThrower(worldIn, worldIn.rotationPitch, worldIn.rotationYaw, 0.0F, 1.5F, 1.0F);
            itemStackIn.spawnEntityInWorld(entitythrowable);
        }
        }
        if (!itemStackIn.isRemote && worldIn.isSneaking())
        {
            EntityAirOrb entitythrowable = new EntityAirOrb(itemStackIn, worldIn);
            entitythrowable.setHeadingFromThrower(worldIn, worldIn.rotationPitch, worldIn.rotationYaw, 0.0F, 1.5F, 1.0F);
            entitythrowable.addVelocity(0.0, 0.27, 0.0);
            itemStackIn.spawnEntityInWorld(entitythrowable);
        }
        worldIn.addStat(StatList.getObjectUseStats(this));
        return new ActionResult(EnumActionResult.SUCCESS, itemstack);
    }
}

Posted

For fuck's sake.

 

Rename your fucking variables.

 

What is this shit?

 

(World itemStackIn, EntityPlayer worldIn, EnumHand playerIn)

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Well.... I managed to register my stuff, problem is when I got done, all my spells were combined into one.... >.>

 

So now I'm sitting here looking at this seeing if I can find some way to register 2 entities and not one... *sigh*

 

 

package exampled.modinfo;

import exampled.modinfo.entity.EntityOrb;
import exampled.modinfo.entity.EntitySphere;
import exampled.modinfo.init.ExampledEntities;
import exampled.modinfo.init.ExampledItems;
import exampled.modinfo.proxy.CommonProxy;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.registry.EntityRegistry;
import net.minecraftforge.fml.common.registry.GameRegistry;

@Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.MOD_VERSION)
public class Exampled
{
@SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS)
public static CommonProxy proxy;
@Instance(Reference.MOD_ID)
private static Exampled instance;
private static ResourceLocation rsrcl;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
	ModCreativeTabs.load();
	proxy.preInit();
	ExampledItems.init();
	ExampledItems.register();
	ExampledEntities.registerEntities(getResourceLocation());
	initRecipes();
}
    @EventHandler
    public void init(FMLInitializationEvent event)
    { 
    	
	proxy.registerRenders();
        proxy.registerKeybindings();
        NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);
    }	
private static void initRecipes()
{
	GameRegistry.addRecipe(new ItemStack(ExampledItems.SPHERE), new Object[] {" X ",  "X X", " X ", 'X', Item.getItemFromBlock(Blocks.DIRT)});
}
public static Exampled getInstance()
{
	return instance;
}
public static ResourceLocation getResourceLocation()
{
	return rsrcl;
}
}

 

 

for some reason its making me change rsrl to rsrl1.... I don't know *sigh*

import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.EntityRegistry;

public class ExampledEntities
{	
private static ResourceLocation rscrl = new ResourceLocation(Reference.MOD_ID, "EntitySphere");
private static ResourceLocation rscrl1 = new ResourceLocation(Reference.MOD_ID, "EntitySphere2");
public static void registerEntities(ResourceLocation rsrcl) {
	// TODO Auto-generated method stub
	EntityRegistry.registerModEntity(rscrl, EntitySphere.class, rscrl.toString(), 0, Exampled.getInstance(), 128, 214, true);
}
public static void registerEntities1(ResourceLocation rsrcl1) {
	// TODO Auto-generated method stub
	EntityRegistry.registerModEntity(rscrl1, EntitySphere.class, rscrl1.toString(), 0, Exampled.getInstance(), 128, 214, true);
}
}

 

*braces self for brutal agonizing ridiculously intense insult*

 

Posted
*braces self for brutal agonizing ridiculously intense insult*

before that happens, You register them with the same id of 0, I personally prefer to use this method for ID's that I don't need to remember

 

int id = 0;

 

EntityRegistry.registerModEntity(rscrl, EntitySphere.class, rscrl.toString(), id++, Exampled.getInstance(), 128, 214, true);

 

EDIT:

 

just to be clear make sure if a "register" method has a param called "ID" or something that sounds like it needs to be "Unique" ensure that it is indeed unique.

 

EDIT2: I also included my method into one of your registers, and bolded it for easier detection

Posted

this is what I ended up with but obviously it is wrong because both rsrcl are underlined "rsrcl = new"

 

package exampled.modinfo.init;

import exampled.modinfo.Exampled;
import exampled.modinfo.Reference;
import exampled.modinfo.entity.EntityOrb;
import exampled.modinfo.entity.EntitySphere;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.EntityRegistry;

public class ExampledEntities
{	
static int id = 0;
public static void register(ResourceLocation rsrcl)
{
ResourceLocation rsrcl = new ResourceLocation(Reference.MOD_ID, "EntitySphere");
ResourceLocation rsrcl = new ResourceLocation(Reference.MOD_ID, "EntitySphere2");
}
public static void registerEntities(ResourceLocation rsrcl) {
	// TODO Auto-generated method stub
	EntityRegistry.registerModEntity(rsrcl, EntitySphere.class, rsrcl.toString(), id++, Exampled.getInstance(), 128, 214, true);
}
}

 

I'm so wrong... and I know it.

Posted

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

sure thing....

 

I just got here without any errors.... but I get a crash like so.

Main:

 

package exampled.modinfo;

import exampled.modinfo.init.ExampledEntities;
import exampled.modinfo.init.ExampledItems;
import exampled.modinfo.proxy.CommonProxy;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.registry.EntityRegistry;
import net.minecraftforge.fml.common.registry.GameRegistry;

@Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.MOD_VERSION)
public class Exampled
{
@SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS)
public static CommonProxy proxy;
@Instance(Reference.MOD_ID)
private static Exampled instance;
private static ResourceLocation rsrcl;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
	ModCreativeTabs.load();
	proxy.preInit();
	ExampledItems.init();
	ExampledItems.register();
	ExampledEntities.registerEntities(rsrcl);
	initRecipes();
}
@EventHandler
    public void init(FMLInitializationEvent event)
    { 
    	
	proxy.registerRenders();
        proxy.registerKeybindings();
        NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);
    }	
private static void initRecipes()
{
	GameRegistry.addRecipe(new ItemStack(ExampledItems.SPHERE), new Object[] {" X ",  "X X", " X ", 'X', Item.getItemFromBlock(Blocks.DIRT)});
}
public static Exampled getInstance()
{
	return instance;
}
public static ResourceLocation getResourceLocation()
{
	return rsrcl;
}

}

 

entityclass:

 

package exampled.modinfo.init;

import exampled.modinfo.Exampled;
import exampled.modinfo.Reference;
import exampled.modinfo.entity.EntityOrb;
import exampled.modinfo.entity.EntitySphere;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.EntityRegistry;

public class ExampledEntities
{	
static int id = 0;
private static void register(ResourceLocation rsrcl)
{
	rsrcl = new ResourceLocation(Reference.MOD_ID, "EntitySphere");
	rsrcl = new ResourceLocation(Reference.MOD_ID, "EntitySphere2");
}
public static void registerEntities(ResourceLocation rsrl) {
	// TODO Auto-generated method stub
	EntityRegistry.registerModEntity(rsrl, EntitySphere.class, rsrl.toString(), id++, Exampled.getInstance(), 128, 214, true);
}
}

 

 

crash-log:

 

---- Minecraft Crash Report ----
// Who set us up the TNT?

Time: 11/22/16 11:27 AM
Description: There was a severe problem during mod loading that has caused the game to fail

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from change_this_to_set_mod_name (exampled)
Caused by: java.lang.NullPointerException
at exampled.modinfo.init.ExampledEntities.registerEntities(ExampledEntities.java:20)
at exampled.modinfo.Exampled.preInit(Exampled.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:602)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:243)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:221)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:145)
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:614)
at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:263)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:476)
at net.minecraft.client.Minecraft.run(Minecraft.java:385)
at net.minecraft.client.main.Main.main(Main.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:26)


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

-- System Details --
Details:
Minecraft Version: 1.11
Operating System: Windows Vista (x86) version 6.0
Java Version: 1.8.0_111, Oracle Corporation
Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
Memory: 743231928 bytes (708 MB) / 1046937600 bytes (998 MB) up to 1046937600 bytes (998 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP 9.35 Powered by Forge 13.19.0.2154 4 mods loaded, 4 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCH	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
UCH	FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.11-13.19.0.2154.jar) 
UCH	forge{13.19.0.2154} [Minecraft Forge] (forgeSrc-1.11-13.19.0.2154.jar) 
UCE	exampled{1.0} [change_this_to_set_mod_name] (bin) 
Loaded coremods (and transformers): 
GL info: ' Vendor: 'ATI Technologies Inc.' Version: '3.3.11672 Compatibility Profile Context' Renderer: 'ATI Radeon HD 2400 PRO'

 

 

I'll get that zip though.

 

Ok.... maybe i need to rebuild forge or something... something wierds going on... >.>

 

woops wrong log, Still drinkin' coffee. updated

Posted

lol.. comas are underlined, what a trip this is...

 

public class ExampledEntities
{	
private static int id = 0;

public static void registerEntities(ResourceLocation rsrcl)
{
	register(rsrcl), EntitySphere.class, "entity_sphere");
	register(rsrcl), EntitySphere2.class, "entity_sphere2");
}
public static void register(ResourceLocation rsrcl, Class cls, String name) {
	// TODO Auto-generated method stub

	EntityRegistry.registerModEntity(rsrcl, cls, name, id++, Exampled.getInstance(), 128, 214, true);
}
}

 

 

Posted

For fuck's sake.

 

Rename your fucking variables.

 

What is this shit?

 

(World itemStackIn, EntityPlayer worldIn, EnumHand playerIn)

 

I know how it happened : he copy pasted the signature of the superclass method, which was deobfuscated using 1.10.2 mappings while on 1.11. A new parameter was added in the new version hence the "shift" in parameters name. It does not excuse the mistake, but it's an explanation.

@OP update your mappings. Newest ones are compatible with 1.11.

 

Also, your register entities is garbage. You use the same resource location for all entities, very stupid. Each entity needs its own.

 

Posted

DANNNNGGGG ITTTTTTTTT

 

still getting crash man.

 

public class ExampledEntities
{	
private static int id = 0;

public static void registerEntities(ResourceLocation rsrcl)
{
	register(rsrcl, EntitySphere.class, "entity_sphere");
	register(rsrcl, EntitySphere2.class, "entity_sphere2");
	rsrcl  = new ResourceLocation("entity_sphere");
	rsrcl  = new ResourceLocation("entity_sphere2");
}
public static void register(ResourceLocation rsrcl, Class cls, String name) {
	// TODO Auto-generated method stub

	EntityRegistry.registerModEntity(rsrcl, cls, name, id++, Exampled.getInstance(), 128, 214, true);
}
}

Posted

Writing code such as two variables in the same place with the same name, and trying to register two entities using the same resource location shows that you do not even begin to comprehend programming, let alone Java.

 

I say this in the friendliest possible way: It's time to phone a friend. Invite a more computer-savvy acquaintance over to sit at your keyboard and translate your concepts into computer language. You need more help than we can provide remotely.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

i need to just stop.... and step away. I know I'm totally messing up.... I just need to stop.

 

And go learn basic programming. You're literally flailing about at random and don't know what anything does.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

i need to just stop.... and step away. I know I'm totally messing up.... I just need to stop.

 

And go learn basic programming. You're literally flailing about at random and don't know what anything does.

 

yeah, that's the only support I've got from you short of being called several indignant names. So wtf ever dude.

Posted

-.- They are correct, you are making fundamental errors, and are obviously copy/pasting code without reading it.

Stop doing that, go through some Java 101 tutorials and your issues will be obvious to you.

This is not a Java school, you are expected to be a little be competent if you want people to help you.

Locking as this thread is going nowhere.

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

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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