Hi! Im trying to make the player translucent when they have a piece of armor equipped. This is what I have in my EventHandler class
@SubscribeEvent
public void PlayerPrerenderer(RenderPlayerEvent event) {
if(cancel == true){
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
}
if(cancel == false){
}
}
I don't know if the GL stuff is right but anything I do in there does not work. Thanks for the help!
Hi! Im trying to debug my mod on a server and it keeps giving me this error: (It wouldnt let me insert code)
"Attempted to load class net/minecraft/client/multiplayer/WorldClient for invalid side SERVER"
It tells me that the error was caused by a FML class but its probably one of my classes.
Is there somewhere else I should look to find the error?
Thanks for the help!
Hey everyone! I know Im just being stupid and not noticing whats wrong but I can't get my entity to spawn an entity when its being fed something. Heres my code:
@Override
public boolean interact(EntityPlayer player)
{
ItemStack itemstack = player.inventory.getCurrentItem();
if(this.worldObj.isRemote){
if (itemstack != null && itemstack.getItem() == ModItemsYE.SMeat)
{
this.setDead();
EntityBossSeaMonkey entity = new EntityBossSeaMonkey(worldObj);
worldObj.spawnEntityInWorld(entity);
return true;
}
}
return false;
}
I know Im missing something and its probably right in front of me! Please help if you can. Thanks!
Hello! I need help adding dependencies to my mod. In my PreInitialization Method I have:
ModMetadata m = event.getModMetadata();
and then I have stuff like m.name = name etc.
I just need help with the dependencies part. I want to add addons to my mod (like expansion packs) but those mods need the core mod to work. When I do
m.dependencies.add
It says that I need an ArtifactVersion thingie. How do I add the modid to an ArtifactVersion list/array? Thanks!
K I have that but how do I play the sound? I have:
world.playSoundAtEntity(player, "(sound)", 1, 1);
But (sound) is the name of the sound thats in my sounds.json.
Edit: The console says "Unable to play empty soundEvent:"
Nvm I got it. Heres the code if anyone wants it:
"GuiSkinChanger.Skin" is just the player's name you want to change the skin to.
http://pastebin.com/TVHXfMMm
Hi! I need help making a TileEntity take items from an entity's inventory and putting them in a chest adjacent to it. If anyone could help me that would be great!
Hello! I can't figure out how to load a player's skin as a resource location. I have it so the player types in a name and it will take that string and load that player's skin but that person has to be on the server for it to work. If anyone can help me out that would be great
- Mrhand3