Jump to content

1.11 No Code errors, but crash on start up (thrownentity) (-slvd fix pg2)


Recommended Posts

Posted

Here are all the classes I have that are relative to the custom entity snowball, if someone would be nice enough to help me in this debacle it would be nice. I'm having a really hard time with this...

 

Main Class:

 

  Reveal hidden contents

 

 

ModCreativeTabs:

 

  Reveal hidden contents

 

 

ExampledCreativeTab:

 

  Reveal hidden contents

 

 

References:

 

  Reveal hidden contents

 

 

EntityOrb(basicallyentitythrowable):

 

  Reveal hidden contents

 

 

EntitySphere That extends EntityOrb (snowball):

 

  Reveal hidden contents

 

 

ModelOrb:

 

  Reveal hidden contents

 

 

ModelSphere:

 

  Reveal hidden contents

 

 

RenderSphere:

 

  Reveal hidden contents

 

 

ExampledEntities:

 

  Reveal hidden contents

 

 

ExampledItems:

 

  Reveal hidden contents

 

 

ItemSphere:

 

  Reveal hidden contents

 

 

ClientProxy:

 

  Reveal hidden contents

 

 

CommonProxy:

 

  Reveal hidden contents

 

 

 

I am unable to resolve this, I end up hitting an area where I get no red and it displays no errors and I get crashed... That's about as far as I've got :\. I got it to load one time but the entity was invisible and how I got that far escapes me now...

Posted
  On 11/20/2016 at 10:00 PM, diesieben07 said:

You forgot the most important part: the crash.

 

Ok, it did give me a crash report, I just had to find it:

---- Minecraft Crash Report ----
// Daisy, daisy...

Time: 11/19/16 2:36 PM
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 net.minecraftforge.fml.common.registry.IForgeRegistryEntry$Impl.setRegistryName(IForgeRegistryEntry.java:90)
at net.minecraftforge.fml.common.registry.EntityRegistry.doModEntityRegistration(EntityRegistry.java:181)
at net.minecraftforge.fml.common.registry.EntityRegistry.registerModEntity(EntityRegistry.java:149)
at exampled.modinfo.init.ExampledEntities.register(ExampledEntities.java:19)
at exampled.modinfo.init.ExampledEntities.registerEntities(ExampledEntities.java:14)
at exampled.modinfo.Exampled.preInit(Exampled.java:36)
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: 744004848 bytes (709 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.2153 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.2153.jar) 
UCH	forge{13.19.0.2153} [Minecraft Forge] (forgeSrc-1.11-13.19.0.2153.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'

Posted
  On 11/20/2016 at 10:16 PM, diesieben07 said:

You never initialize the

Exampled.rsrcl

field, hence it's value is

null

. You then pass it on to

ExampledEntities.registerEntities

and

ExampledEntities.register

, where you pass it to

EntityRegistry.registerModEntity

. You cannot use

null

as the registry name for an entity, provide a useful registry name, like for items and blocks.

 

Can you give me an example of this, please?

initialize the

Exampled.rsrcl

 

:| I feel bad for asking :\

Posted
  On 11/20/2016 at 10:27 PM, gurujive said:

  Quote

You never initialize the

Exampled.rsrcl

field, hence it's value is

null

. You then pass it on to

ExampledEntities.registerEntities

and

ExampledEntities.register

, where you pass it to

EntityRegistry.registerModEntity

. You cannot use

null

as the registry name for an entity, provide a useful registry name, like for items and blocks.

 

Can you give me an example of this, please?

initialize the

Exampled.rsrcl

 

:| I feel bad for asking :\

rsrcl = new ResourceLocation(modid, name);

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

I almost hate this. (Ok, I do hate this.)

 

This sucks... and I still can't get it working.

 

{
private static int id = 0;

rsrcl = new ResourceLocation(ResourceLocation rsrcl, Class cls, String name);
{
	EntityRegistry.registerModEntity( rsrcl1, cls, name, id++, Exampled.getInstance(), 128, 214, true);
}

public static void registerEntities(ResourceLocation rsrcl) {
	// TODO Auto-generated method stub
	register( rsrcl, EntitySphere.class, "sphere");
}

}

 

 

Least now I know where its all screwed up.

Every time there's an update I get to start allll over again -.-

Posted
  On 11/20/2016 at 10:44 PM, diesieben07 said:

What in the heck are you doing? Just pass in a

ResourceLocation

. Don't put it in a static field or anything. Like with blocks. Or items.

 

I don't know how man!

 

"like for items and blocks."

 

I feel like bashing my head as hard as I can into this keyboard atm.

Posted
  On 11/20/2016 at 10:46 PM, gurujive said:

  Quote

What in the heck are you doing? Just pass in a

ResourceLocation

. Don't put it in a static field or anything. Like with blocks. Or items.

 

I don't know how man!

 

"like for items and blocks."

 

I feel like bashing my head as hard as I can into this keyboard atm.

register(new ResourceLocation(modid, name), EntitySphere.class, "sphere");

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 11/20/2016 at 11:00 PM, diesieben07 said:

Dude...

There is ONE new argument as opposed to before. You pass in a

ResourceLocation

there. Everything else stays the same. This is not hard. And if it is, you need to go learn programming.

 

Yeah, and I don't know how to use it, and it totally goes against everything I had before.

Posted

what is supposed to go into name here?

 

public static void registerEntities(ResourceLocation rsrcl) {

// TODO Auto-generated method stub

register(new ResourceLocation(id++, name), EntitySphere.class, "sphere");

}

Posted

Why on earth are you using id++ as your mod ID?!? Do you know what a ResourceLocation is? The first parameter should be your mod ID and the second parameter should be the name of your entity, which can be the same as the String you're passing to register for simplicity's sake.

Don't make mods if you don't know Java.

Check out my website: http://shadowfacts.net

Developer of many mods

Posted

I done said, I have no idea how to use resourcelocation at all.

 

I have not one ioda of a clue of what the flip I'm doin.

 

I'm just a normal guy, and I've managed to keep the project alive for a year. And I would like to keep it going.

Posted
  On 11/20/2016 at 11:16 PM, gurujive said:

I done said, I have no idea how to use resourcelocation at all.

 

I have not one ioda of a clue of what the flip I'm doin.

 

I'm just a normal guy, and I've managed to keep the project alive for a year. And I would like to keep it going.

Here is a hint if you do not know how to create an instance of a class: look at the classes constructor.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

ResourceLocation is used incredibly frequently in Minecraft/Forge/mods, it's used all over the place as a general mod ID + name identifier. If you can't look at the code for the class itself and the contexts in which it's used and understand it, you should probably spend some more time learning Java.

Don't make mods if you don't know Java.

Check out my website: http://shadowfacts.net

Developer of many mods

Posted
  On 11/20/2016 at 11:19 PM, Animefan8888 said:

  Quote

I done said, I have no idea how to use resourcelocation at all.

 

I have not one ioda of a clue of what the flip I'm doin.

 

I'm just a normal guy, and I've managed to keep the project alive for a year. And I would like to keep it going.

Here is a hint if you do not know how to create an instance of a class: look at the classes constructor.

 

as I did here:

private static ResourceLocation rsrcl;

I also did an instance for the creative tab.

 

or maybe not.... *sigh* I'm just going to go to bed and give up for now...

 

May be the end of the basic elements. dunno. I guess I'll find out every update.

Posted
  On 11/20/2016 at 11:24 PM, gurujive said:

as I did here:

private static ResourceLocation rsrcl;

I also did an instance for the creative tab.

 

That is not instantiation, that is field creation. Instantiation looks like this:

new ResourceLocation("minecraft:steak")

 

Oracle has a very good set of tutorials on the java basics. I've linked them below:

https://docs.oracle.com/javase/tutorial/java/concepts/

https://docs.oracle.com/javase/tutorial/java/nutsandbolts/

https://docs.oracle.com/javase/tutorial/java/javaOO/

Posted

I prefer calling it "declaration" as in "I declare that this variable exists" vs. "definition" as in "this is what this variable is."

Instantiation need not be part of a variable definition, but often is. (e.g. it can be passed as a method parameter instead, or ignored (cough, dead code, cough)).

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

Awake again and back at it. Would almost just pay someone 5-10$ for an example snowball mod...

 

 

I don't like this part of modding. I like to do artwork. This part is miserable... and terrible, every aspect of it.

 

No -entities can be registered now heads up.

No -here is an example entity.

No -here's what changed note.

 

There's not any documentation on any of this stuff and its raw.

since waddles and better than bunnies do things in the way they do them I really don't have any code example to work off of. So I'm stuck and I'm just not going to continue til I can find an unfrustrating way of doing this.

 

either way I'm tired of getting screwed every update, and having to rewrite everything. Its not fun.

 

I have spent weeks solid watching newbostons videos. and I have studied java tutorials on oracle.

The issue is not with knowing java. the issue is with minecraft and how everything is all tangled up.

Or the documentation of changes. How to apply these changes. and how to change accordingly with an example without someone claiming its wrong to share code with someone. (because that's bs)

 

You can't know if you don't know and can't see it. There is a complete lack of community cooperation. A house divided does not stand, the same as one that is concealed.

 

You can make a block out of void utils for example and it wont have a texture, nor does it give you hints as to how to set a texture, therefore it fails as a block example. It also leaves out a lang file example.

 

The end result is a no textured block with a funky name. This is what I am referring to mentioning concealed above.

but, "that's the right way to do it". <--- I completely disagree.

 

clientSideOnly = false,

serverSideOnly = false,

 

wtf is this? How about a block example that actually works and is functional? Or a public list of changes, with a small explanation of how to interpret them.

 

Its like going into a store and breaking something, then leaving without paying for it.

Posted
  On 11/21/2016 at 10:07 AM, gurujive said:

Awake again and back at it. Would almost just pay someone 5-10$ for an example snowball mod...

This isn't going to be enough for anyone.

 

  Quote

I don't like this part of modding. I like to do artwork. This part is miserable... and terrible, every aspect of it.

Then go make some art, or a ResourcePack or something. If you hate programming, modding isn't made for you.

 

  Quote

No -entities can be registered now heads up.

If you take a look at the Forge changelog every day, you should've noticed that.

 

  Quote

No -here is an example entity.

The vanilla code has enough example entity code.

 

  Quote

No -here's what changed note.

Again, in the Forge changelog are a lot of clues as to what has changed.

 

  Quote

There's not any documentation on any of this stuff and its raw.

mcforge.readthedocs.io

 

  Quote

I'm tired of getting screwed every update, and having to rewrite everything. Its not fun.

No it isn't. That's just the way it is when modding a game without an official API.

 

  Quote

I have spent weeks solid watching newbostons videos. and I have studied java tutorials on oracle.

 

Therein lies your issue. Just watching videos and reading stuff from the internet is not enough to learn Java good enough to make Minecraft mods. You should first try to make something in Java outside of Minecraft. This will actually learn you the basics of Java.

 

  Quote

The issue is not with knowing java. the issue is with minecraft and how everything is all tangled up.

No, the issue isn't Minecraft, it's your Java that's the issue. You showed you don't know how to work with objects (
ResourceLocation

), how to define them and how to instantiate them, what static means and how to use it. There's a lot more I can go over, but I'll spare you the details.

 

  Quote

with an example without someone claiming its wrong to share code with someone. (because that's bs)

This is because there are people that when someone asks for help, they give fully-working code, which they copy-paste in their own code and call it done. And then 2 days later we see a similar issue by the same user because the copy-pasted code isn't working, and he doesn't understand how it works.

 

  Quote

There is a complete lack of community cooperation

Then what is this forum for?

 

  Quote

You can make a block out of void utils for example and it wont have a texture, nor does it give you hints as to how to set a texture, therefore it fails as a block example. It also leaves out a lang file example.

There are hundreds if not thousands of threads on this forum that help other people with issues with textures, which you can take a look at. If they don't help, make a new thread here. Same applies for
.lang

files.

 

  Quote

but, "that's the right way to do it". <--- I completely disagree.

Please, if you do, state why.

 

  Quote

clientSideOnly = false,

serverSideOnly = false,

 

wtf is this?

From the @Mod documentation:

/**
     * If true, this mod will not be loaded on the Dedicated Server environment.
     * Will crash if both serverSideOnly and clientSideOnly are set to true.
     */
    boolean clientSideOnly() default false;

    /**
     * If true, this mod will not be loaded on the Client environment.
     * Will crash if both serverSideOnly and clientSideOnly are set to true.
     */
    boolean serverSideOnly() default false;

 

  Quote

How about a block example that actually works and is functional?

Vanilla has tons of them.

 

  Quote

Its like going into a store and breaking something, then leaving without paying for it.

Except the store is Mojang's store, and if they break it they don't have to pay for it, as it is their own.

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
  On 11/21/2016 at 12:42 PM, larsgerrits said:

  Quote

Awake again and back at it. Would almost just pay someone 5-10$ for an example snowball mod...

This isn't going to be enough for anyone.

-I shouldn't have to pay to know how to make a snowball anyways.

 

  Quote

I don't like this part of modding. I like to do artwork. This part is miserable... and terrible, every aspect of it.

Then go make some art, or a ResourcePack or something. If you hate programming, modding isn't made for you.

Well its not that my entities and models and eveything else is wrong, its only the way it is registered.

 

  Quote

No -entities can be registered now heads up.

If you take a look at the Forge changelog every day, you should've noticed that.

Yeah, on initial release of first draft you could not register entities.

 

  Quote

No -here is an example entity.

The vanilla code has enough example entity code.

I have plenty of working entities myeself.

 

  Quote

No -here's what changed note.

Again, in the Forge changelog are a lot of clues as to what has changed.

I'm talking about things more specifically like a note stating that itemstack will no longer work for things would have been nice on the first release of 1.11 forge.

 

  Quote

There's not any documentation on any of this stuff and its raw.

mcforge.readthedocs.io

have read it several times.

 

 

  Quote

I'm tired of getting screwed every update, and having to rewrite everything. Its not fun.

No it isn't. That's just the way it is when modding a game without an official API.

its extremely discouraging.

 

  Quote

I have spent weeks solid watching newbostons videos. and I have studied java tutorials on oracle.

 

Therein lies your issue. Just watching videos and reading stuff from the internet is not enough to learn Java good enough to make Minecraft mods. You should first try to make something in Java outside of Minecraft. This will actually learn you the basics of Java.

I learned java by playing minecraft and using forge, a year ago I knew absolutely nothing short of modifying black & white maps in notepad.

 

  Quote

The issue is not with knowing java. the issue is with minecraft and how everything is all tangled up.

No, the issue isn't Minecraft, it's your Java that's the issue. You showed you don't know how to work with objects (
ResourceLocation

), how to define them and how to instantiate them, what static means and how to use it. There's a lot more I can go over, but I'll spare you the details.

I know public static is that it can be seen by other files, and private static is so that it cannot be seen by other files. It is static because it can be seen in other places.

 

  Quote

with an example without someone claiming its wrong to share code with someone. (because that's bs)

This is because there are people that when someone asks for help, they give fully-working code, which they copy-paste in their own code and call it done. And then 2 days later we see a similar issue by the same user because the copy-pasted code isn't working, and he doesn't understand how it works.

 

  Quote

There is a complete lack of community cooperation

Then what is this forum for?

from what I've experienced scoffing or insulting people based on how ignorant you believe they are.

 

  Quote

You can make a block out of void utils for example and it wont have a texture, nor does it give you hints as to how to set a texture, therefore it fails as a block example. It also leaves out a lang file example.

There are hundreds if not thousands of threads on this forum that help other people with issues with textures, which you can take a look at. If they don't help, make a new thread here. Same applies for
.lang

files.

 

  Quote

but, "that's the right way to do it". <--- I completely disagree.

Please, if you do, state why.

This frustrates the end user in the creating of their first block and makes them miserable (least I felt a bit miserable after wasting hours of my life just to have a texturless ugly looking block that is generated by minecraft.)

 

  Quote

clientSideOnly = false,

serverSideOnly = false,

 

wtf is this?

From the @Mod documentation:

/**
     * If true, this mod will not be loaded on the Dedicated Server environment.
     * Will crash if both serverSideOnly and clientSideOnly are set to true.
     */
    boolean clientSideOnly() default false;

    /**
     * If true, this mod will not be loaded on the Client environment.
     * Will crash if both serverSideOnly and clientSideOnly are set to true.
     */
    boolean serverSideOnly() default false;

 

  Quote

How about a block example that actually works and is functional?

Vanilla has tons of them.

But the reality is, is that forge doesn't, there should be a working block example *at least in the documentation.

Instead of going, here's how your supposed to do it, but it doesn't work, HAHA. Then leaving you to the community to be insulted.

 

  Quote

Its like going into a store and breaking something, then leaving without paying for it.

Except the store is Mojang's store, and if they break it they don't have to pay for it, as it is their own.

Except I programmed a store, and I put things in my store, and someone come into my store and broke my stuff without giving me some super glue to fix it with.

Posted

This isn't going to be enough for anyone.

-I shouldn't have to pay to know how to make a snowball anyways.

 

Then go make some art, or a ResourcePack or something. If you hate programming, modding isn't made for you.

Well its not that my entities and models and eveything else is wrong, its only the way it is registered.

 

If you take a look at the Forge changelog every day, you should've noticed that.

Yeah, on initial release of first draft you could not register entities.

 

The vanilla code has enough example entity code.

I have plenty of working entities myeself.

 

Again, in the Forge changelog are a lot of clues as to what has changed.

I'm talking about things more specifically like a note stating that itemstack will no longer work for things would have been nice on the first release of 1.11 forge.

 

mcforge.readthedocs.io

Have read it several times. Does not show you how to use java 8 with forge and eclipse.

 

 

No it isn't. That's just the way it is when modding a game without an official API.

its extremely discouraging.

 

 

Therein lies your issue. Just watching videos and reading stuff from the internet is not enough to learn Java good enough to make Minecraft mods. You should first try to make something in Java outside of Minecraft. This will actually learn you the basics of Java.

I learned java by playing minecraft and using forge, a year ago I knew absolutely nothing short of modifying black & white maps in notepad. I did learn how to do hello world, and get it to copy and respond to me though.

 

No, the issue isn't Minecraft, it's your Java that's the issue. You showed you don't know how to work with objects (

ResourceLocation

), how to define them and how to instantiate them, what static means and how to use it. There's a lot more I can go over, but I'll spare you the details.

I know public static is that it can be seen by other files, and private static is so that it cannot be seen by other files. It is static because it can be seen in other places within the same file.

 

This is because there are people that when someone asks for help, they give fully-working code, which they copy-paste in their own code and call it done. And then 2 days later we see a similar issue by the same user because the copy-pasted code isn't working, and he doesn't understand how it works.

If copy and pasting gives someone the base to interpret how to make what their doing functional that's good.

Interpretation though, at least the possibility for such would be possible.

 

Then what is this forum for?

from what I've experienced scoffing or insulting people based on how ignorant you believe they are. Or giving people small bits of code to work with and laughing as they fail.

 

There are hundreds if not thousands of threads on this forum that help other people with issues with textures, which you can take a look at. If they don't help, make a new thread here. Same applies for

.lang

files.

This frustrates the end user in the creating of their first block and makes them miserable (least I felt a bit miserable after wasting hours of my life just to have a textureless ugly looking block that is *produced by minecraft itself*.) -makes things hard on end user. -the wrong way -the block would not exist if not for mojang because technically it is/isn't a block used to cover bad or missing textures in a resourcepack, in other words its vanilla and coremods are not supported here.

 

"Here's the right way to do it"

"Coremods are not supported here, thread locked"

 

From the @Mod documentation:

/**
     * If true, this mod will not be loaded on the Dedicated Server environment.
     * Will crash if both serverSideOnly and clientSideOnly are set to true.
     */
    boolean clientSideOnly() default false;

    /**
     * If true, this mod will not be loaded on the Client environment.
     * Will crash if both serverSideOnly and clientSideOnly are set to true.
     */
    boolean serverSideOnly() default false;

Vanilla has tons of them.

But the reality is, is that forge doesn't, there should be a working block example *at least in the documentation.

Instead of going, here's how your supposed to do it, but it doesn't work, HAHA. Then leaving you to the community to be insulted.

 

 

Except I programmed a store, and I put things in my store, and someone come into my store and broke my stuff without giving me some super glue to fix it with. actually its more like my store was broken and not the stuff inside -which is worse.

Posted
  On 11/21/2016 at 1:31 PM, gurujive said:

I know public static is that it can be seen by other files, and private static is so that it cannot be seen by other files. It is static because it can be seen in other places.

Then what is the difference between
public

and

public static

?

 

As said before,

registerModEntity

takes in a

ResourceLocation

now. A

ResourceLocation

takes 2 parameters: a modid and an identifier. The modid is self-explanatory, and the identifier is either a path to a file or just a name. In this case a name, so just put the

name

variable as the second parameter.

 

This should be all you need to know about the Minecraft part of it, now you should go learn the Java part of it.

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
  On 11/21/2016 at 1:47 PM, larsgerrits said:

[Then what is the difference between

public

and

public static

?

 

As said before,

registerModEntity

takes in a

ResourceLocation

now. A

ResourceLocation

takes 2 parameters: a modid and an identifier. The modid is self-explanatory, and the identifier is either a path to a file or just a name. In this case a name, so just put the

name

variable as the second parameter.

 

This should be all you need to know about the Minecraft part of it, now you should go learn the Java part of it.

 

referencing.

Posted

YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS I GOT IT IT TO WORK!!!!!

I FEEL SO AWESOME NOW!!!!

 

(I take back all that ugly stuff I said before.) (but seriously.... coremods are not supported here :P)

 

I can throw it! (haven't smoothed out the flight patterns or anything! but I can throw it! and it flies!)

YESSSSSSSSS, So elated!

 

Main class:

 

  Reveal hidden contents

 

 

ModEntitiesClass:

 

  Reveal hidden contents

 

 

Friggin a dude, thank goodness. Couldn't have done it without your comment about public and public static, applause and thanks goes to you sir larsgerrits. <---this guys awesome.

BOOOOM, smooth flyin' thrown entity right there!!!!! no jitter as far as the eye can see!!!!

 

(saved ya 10 bucks)

 

WOOOOOOOOOOOOOOOOOO!

 

Edit: cleaned up modentityclass.

Posted
  Quote
Since when do your entities work again?

 

 

Since now, and here's a 1.11 example thrown entity working src with a custom model and custom texture, since I don't feel like charging for it or keeping it to myself.

I'm not saying it couldn't be refined or anything. I just got it working. :);D:D:)

Renaming everything from example to make your own mod will show/teach you what to do. Its that simple.

 

https://www.dropbox.com/s/dlkuta8wakmr5rd/src.zip?dl=0

 

  Quote
Programming is not magic, if there is an error in your program there is no way to magically just make it work because gurujive doesn't feel like debugging.

My code didn't have any errors though xD

----> in progress of magic mod now :P

 

  Quote
This is bullshit. Nobody is "scoffing" or "insulting" you. But you have to live with the fact that if you don't know Java, we will tell you to go learn it elsewhere. If you walk into a car dealership they won't teach you how to drive.

I know, I'm just an innocent victim  ::)

 

  Quote
Not sure where you are going with this, but yes, coremods are not supported here.

void utils is a coremod.

 

 

 

But aside from that, I'd like to say thanks for y'alls help and that I'm really thankful for all the quick responses.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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