In my opinion, only use proxy classes for client rendering, registering renderers, registering entities, and other things as well. When creating and items/blocks, don't use a proxy class - it's own class/method works perfectly fine too.
When I created my tools to be faster and stronger than diamond the only thing that is different between them and diamond tools is the damage and their durability.
The speed at which they mine is very slow regardless of what value I put for the efficiency.
Also, is the damage that I set supposed to apply to every tool created or just the sword?
When I created my tools to be faster and stronger than diamond the only thing that is different between them and diamond tools is the damage and their durability.
The speed at which they mine is very slow regardless of what value I put for the efficiency.
Also, is the damage that I set supposed to apply to every tool created or just the sword?
You should have an instance variable in your main class. For example, if my main class is MainClass, you would put MainClass.instance instead of what you have.
The Meaning of Life, the Universe, and Everything.
Location:
The End
Join Date:
5/27/2014
Posts:
105
Minecraft:
DoomDwarf_347
Member Details
How would I make a crafting recipe where I put an item into the crafting grid and it turns into a stack of multiple items? (e.g., iron block into 9 iron ingots) The crafting recipes tutorial doesn't seem to tell how to do that.
How would I make a crafting recipe where I put an item into the crafting grid and it turns into a stack of multiple items? (e.g., iron block into 9 iron ingots) The crafting recipes tutorial doesn't seem to tell how to do that.
GameRegistry.addShapelessRecipe(new ItemStack(Items.iron_ingot, 9), new ItemStack(Blocks.iron_block));
I'm new to all of these Java things, so I was copy-pasting all of your java boxes into Eclipse. I was midway through tutorial #5 for 1.8 when I realized I had a whopping 21 errors sitting there. All of them seem to be that Item, Level, and Block can not be resolved to a Type. Also, My Minecraft crashes every time I try to load it, and the crash report states I had somewhere around 70-80 errors. (I'd put them here, but I can't make the spoiler button work.) Anyways, what should I do?
I'm new to all of these Java things, so I was copy-pasting all of your java boxes into Eclipse. I was midway through tutorial #5 for 1.8 when I realized I had a whopping 21 errors sitting there. All of them seem to be that Item, Level, and Block can not be resolved to a Type. Also, My Minecraft crashes every time I try to load it, and the crash report states I had somewhere around 70-80 errors. (I'd put them here, but I can't make the spoiler button work.) Anyways, what should I do?
It's also generally a bad idea to copy and paste directly into code. There are often hidden characters that will mess things up. Even if you will be using it word for word, it is better to type it in yourself to avoid those problems.
It's a lot easier to see a typo that you made rather than an invisible return character.
Rollback Post to RevisionRollBack
"If It Is To Be It Is Up To Me" simple quote and I don't know where it comes from but I enjoy it.
Current Mod: Armerger | Light Drafter
Ok, I have learned some Java and rewrote the Code, but I have hit a problem and would like some advice on what to do. On my launcher's crash report I have Identified this line as the cause of the crashing:
that's just the lines tells you which mod is causing the problem, which is useful for modpacks but not so much for developing.
you want to post something that looks more like this:
Time: 8/11/15 7:55 AM
Description: Ticking entity
java.lang.NullPointerException: Ticking entity
at effects.DamageEnhancement.entityAttacked(DamageEnhancement.java:33)
at cpw.mods.fml.common.eventhandler.ASMEventHandler_7_DamageEnhancement_entityAttacked_LivingAttackEvent.invoke(.dynamic)
at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
at net.minecraftforge.common.ForgeHooks.onLivingAttack(ForgeHooks.java:294)
at net.minecraft.entity.EntityLivingBase.attackEntityFrom(EntityLivingBase.java:822)
at net.minecraft.entity.passive.EntityBat.attackEntityFrom(EntityBat.java:234)
at net.minecraft.entity.EntityLivingBase.onEntityUpdate(EntityLivingBase.java:241)
at net.minecraft.entity.EntityLiving.onEntityUpdate(EntityLiving.java:192)
at net.minecraft.entity.Entity.onUpdate(Entity.java:386)
at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1766)
at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:250)
at net.minecraft.entity.passive.EntityBat.onUpdate(EntityBat.java:122)
at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2298)
at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:684)
at net.minecraft.world.World.updateEntity(World.java:2258)
at net.minecraft.world.World.updateEntities(World.java:2108)
at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
Rollback Post to RevisionRollBack
"If It Is To Be It Is Up To Me" simple quote and I don't know where it comes from but I enjoy it.
Current Mod: Armerger | Light Drafter
I would, but at the bottom of the Crash report it says:
... and 10 more
<More errors>
... and 38 more
So I can't even give the full crash report. Also, I believe that part of my problem is the version number (a4.2.283c) as I copied that number from his tutorial.
Also, I'm not certain where to put the lines of things like
public class ItemMushrooms1 extends Item
So if you could fill me in there as well, it would be a huge help.
This whole thing is a learning experience for me.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
In my opinion, only use proxy classes for client rendering, registering renderers, registering entities, and other things as well. When creating and items/blocks, don't use a proxy class - it's own class/method works perfectly fine too.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYes it works, but then you miss out on the point of using proxys.
ClientProxy holds all the rendering, keyInput stuff, and some of the packet handle
CommonProxy holds everything else
all you do in your main class is call proxy.preInit()/ others, and forge will take care of making sure the right ones are used.
If you only use it for Client side stuff then you might as well not use the proxy and just have some if tests.
Current Mod: Armerger | Light Drafter
Works either way. I've just personally done it in the way I'm used to, and is my preference. Do whatever you feel most comfortable with is my advice.
When I created my tools to be faster and stronger than diamond the only thing that is different between them and diamond tools is the damage and their durability.
The speed at which they mine is very slow regardless of what value I put for the efficiency.
Also, is the damage that I set supposed to apply to every tool created or just the sword?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThat's really odd.
Yes, except here's what happens:
Damage you entered is 2F
Sword damage is 6
Pickaxe is 4
Shovel is 3
Axe is 5
That's something stupid I did, I copied and pasted classes and had refactored the names, but didn't change what each class was supposed to extend.
In tutorial 15 the code for registering ModProjectile and ModEntity says the symbol can't be resolved for "instance".
What do I do?
I kind of feel like this is a stupid question though.
EntityRegistry.registerModEntity(entityClass, name, ++startEntityID,void.instance, 80, 3, false);
[/pre]
You should have an instance variable in your main class. For example, if my main class is MainClass, you would put MainClass.instance instead of what you have.
Is this what I need to do?
public class MyClass {
public static Object entityVar;
}
EntityRegistry.registerModEntity(entityClass, name, ++startEntityID,MyClass.entityVar, 64, 10, true);[/pre]
Looks like I was completely wrong.
I figured out what I was doing wrong.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI hope me helping you made you feel less stressed. I have one suggestion for the main post of the mod.
Add this playlist as a recommended Java tutorial. It's amazing for beginners.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumHow would I make a crafting recipe where I put an item into the crafting grid and it turns into a stack of multiple items? (e.g., iron block into 9 iron ingots) The crafting recipes tutorial doesn't seem to tell how to do that.
Thanks dude! I appreciate this alot.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumGameRegistry.addShapelessRecipe(new ItemStack(Items.iron_ingot, 9), new ItemStack(Blocks.iron_block));
I'm new to all of these Java things, so I was copy-pasting all of your java boxes into Eclipse. I was midway through tutorial #5 for 1.8 when I realized I had a whopping 21 errors sitting there. All of them seem to be that Item, Level, and Block can not be resolved to a Type. Also, My Minecraft crashes every time I try to load it, and the crash report states I had somewhere around 70-80 errors. (I'd put them here, but I can't make the spoiler button work.) Anyways, what should I do?
Thanks
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumhttps://www.youtube.com/playlist?list=PLFE2CE09D83EE3E28&feature=plcp
You shouldn't jump into modding without any knowledge of Java whatsoever.
If you don't want to learn programming, just use MCreator.
Don't complain here if you're just copying and pasting.
Also, import.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumIt's also generally a bad idea to copy and paste directly into code. There are often hidden characters that will mess things up. Even if you will be using it word for word, it is better to type it in yourself to avoid those problems.
It's a lot easier to see a typo that you made rather than an invisible return character.
Current Mod: Armerger | Light Drafter
Ok, I have learned some Java and rewrote the Code, but I have hit a problem and would like some advice on what to do. On my launcher's crash report I have Identified this line as the cause of the crashing:
mushrooms1{a4.2.283c} [Mushrooms1] (Mod1) Unloaded->Errored
What do I do to fix this? (I think it probably has something to do with that first number)
If more information is needed, let me know
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumthat's just the lines tells you which mod is causing the problem, which is useful for modpacks but not so much for developing.
you want to post something that looks more like this:
Time: 8/11/15 7:55 AM
Description: Ticking entity
java.lang.NullPointerException: Ticking entity
at effects.DamageEnhancement.entityAttacked(DamageEnhancement.java:33)
at cpw.mods.fml.common.eventhandler.ASMEventHandler_7_DamageEnhancement_entityAttacked_LivingAttackEvent.invoke(.dynamic)
at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)
at net.minecraftforge.common.ForgeHooks.onLivingAttack(ForgeHooks.java:294)
at net.minecraft.entity.EntityLivingBase.attackEntityFrom(EntityLivingBase.java:822)
at net.minecraft.entity.passive.EntityBat.attackEntityFrom(EntityBat.java:234)
at net.minecraft.entity.EntityLivingBase.onEntityUpdate(EntityLivingBase.java:241)
at net.minecraft.entity.EntityLiving.onEntityUpdate(EntityLiving.java:192)
at net.minecraft.entity.Entity.onUpdate(Entity.java:386)
at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1766)
at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:250)
at net.minecraft.entity.passive.EntityBat.onUpdate(EntityBat.java:122)
at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2298)
at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:684)
at net.minecraft.world.World.updateEntity(World.java:2258)
at net.minecraft.world.World.updateEntities(World.java:2108)
at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
Current Mod: Armerger | Light Drafter
I would, but at the bottom of the Crash report it says:
... and 10 more
<More errors>
... and 38 more
So I can't even give the full crash report. Also, I believe that part of my problem is the version number (a4.2.283c) as I copied that number from his tutorial.
Also, I'm not certain where to put the lines of things like
public class ItemMushrooms1 extends Item
So if you could fill me in there as well, it would be a huge help.
This whole thing is a learning experience for me.