Just a question, I don't want to modify any base files and it may sound stupid, but I prefer doing it that instead of regretting later. So, is it possible to add something (explained later) to a base Entity file without modifying it directly? I want to add the part of the code that makes it interact with the player when right clicking with a specific item, and I know how to do that, but is there a way where I don't have to do everything in the Entity.class? If you no know what I'm talking about I thought of something like sheep's getting wool or from cows milk. If I have to modify them directly, will they overwrite any other file with the same name and delete the previous file or just adding my bit of code?
Are you trying to make an entity that you made do something when you right click it?
Or are you trying to make one of the vanilla mobs do it? If it is the first, then you don't need to edit a base class, but if it is the second then I think that you will have to edit the mobs file (and therefor a base class)
Edit: actually, I think that there may be a way to do something like what you want without editing a base class, it is something I heard that forge had, you may want to look into it
Sorry about all my questions, but just had one regarding the spawn rate.
Would the rates you put in the tutorial 12, 14, and 18, be considered high, low or medium? Just curious.
Also, thanks for all the help. IMO, these are best tutorials I've seen. It isn't just "copy and paste this", you explain it which really helps me actually understand what the code means rather than typing up what otherwise would seem to be a bunch of gibberish.
Do you know how to make a mob fly? And also is it possible to make a mob peaceful at day time and then at night change it's model to a ferocious beast that attacks any and all? And is it possible to generate a structure form the resources file like with fossil archaeology mod and there are schematics for the structures in the resources file which generate?also how do you open the example gui?
(sorry if it makes no sense with the second to last question )
I have started making a mod, and I have been getting an error every time that I try to craft my "Strong Glass" block. It is a shapeless recipe with a cobble and a glass, but MC crashes every time.
Here's the error log:
java.lang.NullPointerException
at net.minecraft.src.ItemStack.getIconIndex(ItemStack.java:105)
at net.minecraft.src.RenderItem.renderItemIntoGUI(RenderItem.java:270)
at net.minecraft.src.GuiContainer.drawSlotInventory(GuiContainer.java:228)
at net.minecraft.src.GuiContainer.drawScreen(GuiContainer.java:74)
at net.minecraft.src.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1008)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:20)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:922)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Thread.java:722)
Nevermind, I didnt register the block. I thought you only had to do that if your block had it's own individual class. I figured it out!
Hi. I want to change all of the stone in my custom dimension to a custom block I have created. How do I do that?
Mass changing a block would be done with worldedit, MCEdit, or some other program. This wouldn't traditionally be accomplished with new coding, though, you probably could do something about it. I'm still new, so I don't really know.
I seem to be having a problem, its just one and it seems small but I don't know how to fix it so...
Error:
== ERRORS FOUND ==
src/minecraft/net/src/mod_Magic.java:16: error: cannot find symbol
public void addRenderer(Map map)
^
symbol: class Map
location: class mod_Magic
1 error
=============
Sorry about how messed up that looks, I couldn't figure out how to copy from the console thing ^^' the arrow is suppose to pointing at the capital M in Map
Code:
package net.minecraft.src;
public class mod_Magic extends BaseMod
{
public static final BiomeGenBase Nature = (new BiomeGenNature(25)).setColor(0xfa9418).setBiomeName("Nature");
public void load()
{
ModLoader.addBiome(Nature);
}
{
ModLoader.registerEntityID(EntityWisp.class, "Wisp", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityWisp.class, 12, 14, 18, EnumCreatureType.creature);
}
public void addRenderer(Map map)
{
map.put(EntityWisp.class, new RenderBiped(new ModelBiped(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
Can anyone give me the code i'd need to make a block only breakable by it owner or admin?p.s. this should be obvious but in case it isn't, it's a forge mod.
I seem to be having a problem, its just one and it seems small but I don't know how to fix it so...
Error:
== ERRORS FOUND ==
src/minecraft/net/src/mod_Magic.java:16: error: cannot find symbol
public void addRenderer(Map map)
^
symbol: class Map
location: class mod_Magic
1 error
=============
Sorry about how messed up that looks, I couldn't figure out how to copy from the console thing ^^' the arrow is suppose to pointing at the capital M in Map
Code:
package net.minecraft.src;
public class mod_Magic extends BaseMod
{
public static final BiomeGenBase Nature = (new BiomeGenNature(25)).setColor(0xfa9418).setBiomeName("Nature");
public void load()
{
ModLoader.addBiome(Nature);
}
{
ModLoader.registerEntityID(EntityWisp.class, "Wisp", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityWisp.class, 12, 14, 18, EnumCreatureType.creature);
}
public void addRenderer(Map map)
{
map.put(EntityWisp.class, new RenderBiped(new ModelBiped(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
Could someone help?
Also how do I make it so a custom mob spawns in a custom biome?
I'm not Techguy, but I can help you anyway...
What you have to do is, instead of typing '.setHardness(#F)', type 'setBlockUnbreakable()'.
.setHardness(10F) (i think that's what obsidian is set to, haven't looked it up)also make sure resistence is set high too... that will now that i think about it affect whether or not you can punch it with your hand.(50F) is bedrock i think.set your resistance around 6,000, that's the same for obsidian as well.
Rollback Post to RevisionRollBack
Yes I am the Graphic Artist for Mystcraft
To post a comment, please login or register a new account.
One: to have a section of the thread have mods that were made with your tutorials.
Second: Have a section that gives links to other people's tutorials that have tutorials that you refuse/don't want/don't know how to do.You are missing these { }
package net.minecraft.src; public class mod_bettersky extends BaseMod { public static final Block Skystone = new BlockSkystone(145, 0).setBlockName("skyStone").setHardness(3F).setResistance(4F); public void load() { Skystone.blockIndexInTexture = ModLoader.addOverride("/bettersky/skystone.png"); ModLoader.registerBlock(Skystone); ModLoader.addName(Skystone, "Sky Stone"); } public String getVersion() { return "1.2.5"; } }<code>package net.minecraft.src;The addOveride bit is giving me an error. Can anyone tell me why?
EDIT: I have found my fatal flaw. Sorry for derping.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumAre you trying to make an entity that you made do something when you right click it?
Or are you trying to make one of the vanilla mobs do it? If it is the first, then you don't need to edit a base class, but if it is the second then I think that you will have to edit the mobs file (and therefor a base class)
Edit: actually, I think that there may be a way to do something like what you want without editing a base class, it is something I heard that forge had, you may want to look into it
Would the rates you put in the tutorial 12, 14, and 18, be considered high, low or medium? Just curious.
Also, thanks for all the help. IMO, these are best tutorials I've seen. It isn't just "copy and paste this", you explain it which really helps me actually understand what the code means rather than typing up what otherwise would seem to be a bunch of gibberish.
(sorry if it makes no sense with the second to last question
It would be greatly appreciated
never mind i figured it out. (there were a few things wrong i fixed.)
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumHere's the error log:
Nevermind, I didnt register the block. I thought you only had to do that if your block had it's own individual class. I figured it out!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumMass changing a block would be done with worldedit, MCEdit, or some other program. This wouldn't traditionally be accomplished with new coding, though, you probably could do something about it. I'm still new, so I don't really know.
So i should do that? It wouldn't uninstall anything, right? Thanks, by the way, for your help.
Error:
Sorry about how messed up that looks, I couldn't figure out how to copy from the console thing ^^' the arrow is suppose to pointing at the capital M in Map
Code:
package net.minecraft.src; public class mod_Magic extends BaseMod { public static final BiomeGenBase Nature = (new BiomeGenNature(25)).setColor(0xfa9418).setBiomeName("Nature"); public void load() { ModLoader.addBiome(Nature); } { ModLoader.registerEntityID(EntityWisp.class, "Wisp", ModLoader.getUniqueEntityId()); ModLoader.addSpawn(EntityWisp.class, 12, 14, 18, EnumCreatureType.creature); } public void addRenderer(Map map) { map.put(EntityWisp.class, new RenderBiped(new ModelBiped(), 0.5F)); } public String getVersion() { return "1.2.5"; } }PS:Awesome post!
-
View User Profile
-
View Posts
-
Send Message
Retired Staffi got an idea for one mod but i need to ask one thing:
how can we do a mod block be unmineable by hand?
-
View User Profile
-
View Posts
-
Send Message
Retired StaffsetHardness(#F) <--- that's for tools .setResistance(#F) <--- thats for booooooommmmsssss lol
-
View User Profile
-
View Posts
-
Send Message
Retired StaffBump
I'm not Techguy, but I can help you anyway...
What you have to do is, instead of typing '.setHardness(#F)', type 'setBlockUnbreakable()'.
Could someone help?
Also how do I make it so a custom mob spawns in a custom biome?
-
View User Profile
-
View Posts
-
Send Message
Retired Staff.setHardness(10F) (i think that's what obsidian is set to, haven't looked it up)also make sure resistence is set high too... that will now that i think about it affect whether or not you can punch it with your hand.(50F) is bedrock i think.set your resistance around 6,000, that's the same for obsidian as well.