Just a few more things: What do I do when I want to add more than one potion effect and where do I edit the properties of cake (Restored food, saturation, etc)?
Other than that, thanks so much for helping!
You would find the code for defining cake in Item.java and add
.setPotionEffect(Potion.hunger.id, 45, 0, 0.5F)
for example, 45 is the duration in seconds, 0 is the amplifier and 0.5F is the probability to get the effect, 1 is always and 0 is never
I'm having trouble recompiling. I do the steps you say to do for mac, but it says I need to decompile first. I though I did, though? So I go follow your error fix and I see that line 256 in my ChatMessageComponent.class is a single {. Is there a mistake or something?
I'm having trouble recompiling. I do the steps you say to do for mac, but it says I need to decompile first. I though I did, though? So I go follow your error fix and I see that line 256 in my ChatMessageComponent.class is a single {. Is there a mistake or something?
Try putting it inside the bracket (line 257) or replacing the bracket.
I think I've found a way to recompile it. By the way, is there any way I could add multiple layers of clouds? I tried messing with the cloud height in the WorldProvider class, but I didn't know how to make multiple layers, and I had no idea what to do with the renderclouds at the RenderGlobal class. I just want it so that clouds can spawn in any height between 128 and 256.
God, I feel like a asshead now for asking so much..., but what I meant was how do I add more than one Potion effect, because it doesn't seem to work if I just do it like this twice.
You would probably have to make a new class for your item, like in ItemAppleGold. You would probably make a class like this:
package net.minecraft.src;
import java.util.List;
public class YourFoodItem extends ItemFood{
public YourFoodItem(int par1, int par2, float par3, boolean par4){
super(par1, par2, par3, par4);
}
protected void onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer){
par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.regeneration.id, 600, 4));
par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.resistance.id, 6000, 0));
}
}
I think I've found a way to recompile it. By the way, is there any way I could add multiple layers of clouds? I tried messing with the cloud height in the WorldProvider class, but I didn't know how to make multiple layers, and I had no idea what to do with the renderclouds at the RenderGlobal class. I just want it so that clouds can spawn in any height between 128 and 256.
I don't think this is possible, maybe if you add another renderclouds function?
Is it possible to make it so that certain blocks won't show the breaking particle effects after they break? I know that paintings and item frames don't have a breaking effect, but those are entities. Any help?
Is it possible to make it so that certain blocks won't show the breaking particle effects after they break? I know that paintings and item frames don't have a breaking effect, but those are entities. Any help?
I guess you would use reobfuscate.bat and zip the files, then place the .zip in the mods folder.
I tried that, but it didn't work, and the inside of other mod zip folders look different. I can't tell how to organize them or if there is an easier way.
I tried that, but it didn't work, and the inside of other mod zip folders look different. I can't tell how to organize them or if there is an easier way.
It looks a bit like the configuration of a resource pack, I believe there is a program which makes the mod into a .zip, but I am not sure.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumAdding a 3D item is impossible, unless its an entity or a block.
Just saying.
You would find the code for defining cake in Item.java and add
for example, 45 is the duration in seconds, 0 is the amplifier and 0.5F is the probability to get the effect, 1 is always and 0 is never
Try putting it inside the bracket (line 257) or replacing the bracket.
The bracket is definitely needed, though. I'll try putting it inside.
EDIT: Should I mention that I do not have a mod_modname class? I instead have a tweak mod I want to recompile, and I only edited classes.
I doubt that it would affect the error, although it might cause other errors if you are adding something new instead of changing
You would probably have to make a new class for your item, like in ItemAppleGold. You would probably make a class like this:
package net.minecraft.src; import java.util.List; public class YourFoodItem extends ItemFood{ public YourFoodItem(int par1, int par2, float par3, boolean par4){ super(par1, par2, par3, par4); } protected void onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer){ par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.regeneration.id, 600, 4)); par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.resistance.id, 6000, 0)); } }I don't think this is possible, maybe if you add another renderclouds function?
You can make a giant spawn easily by doing something like this:
if (!world.isRemote){ EntityGiantZombie giant = new EntityGiantZombie(world); giant.setLocationAndAngles((double)par2 + 0.5D, (double)par3, (double)par4 + 0.5D, 0.0F, 0.0F); par1World.spawnEntityInWorld(giant); }You would add this code to an item, command or block so that when you use them the giant zombie would spawn
I try and update this when I get the time
Updated both codes
I don't think it's possible for certain blocks
Do you have any other errors apart from that? also do you have basemod.java?
I guess you would use reobfuscate.bat and zip the files, then place the .zip in the mods folder.
I tried that, but it didn't work, and the inside of other mod zip folders look different. I can't tell how to organize them or if there is an easier way.
It looks a bit like the configuration of a resource pack, I believe there is a program which makes the mod into a .zip, but I am not sure.