Skip to content

Instantly share code, notes, and snippets.

@BlockAfterBlock
BlockAfterBlock / gist:1046765
Created June 25, 2011 18:47
Player Control
public boolean interact(EntityPlayer entityplayer)
{
if(getSaddled() && !worldObj.multiplayerWorld && (riddenByEntity == null || riddenByEntity == entityplayer))
{
entityplayer.mountEntity(this);
entityplayer.motionX = this.motionX;
entityplayer.motionY = this.motionY;
entityplayer.isJumping = this.isJumping;
return true;
} else
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
public void onStruckByLightning(EntityLightningBolt entitylightningbolt)
{
setEntityDead();
ModLoader.getMinecraftInstance().thePlayer.triggerAchievement(mod_Family.LightingStrike);
}
public boolean interact(EntityPlayer entityplayer)
{
ItemStack itemstack = entityplayer.inventory.getCurrentItem();
if(!isWife)
{
if(itemstack != null && itemstack.itemID == Item.stick.shiftedIndex)
{
itemstack.stackSize--;
showHeartsOrSmokeFX(true);
isWife = true;
package net.minecraft.src;
public class Family_iPixelisFemaleModel extends ModelBase
{
public ModelRenderer a;
public ModelRenderer b;
public ModelRenderer c;
public ModelRenderer d;
public ModelRenderer e;
public boolean interact(EntityPlayer entityplayer)
{
ItemStack itemstack = entityplayer.inventory.getCurrentItem();
if(!isChild)
{
if(itemstack != null && itemstack.itemID == Item.stick.shiftedIndex)
{
itemstack.stackSize--;
showHeartsOrSmokeFX(true);
isChild = true;
package net.minecraft.src;
import java.util.Map;
public class mod_Family extends BaseMod
{
public String Version()
{
return "v1";
package net.minecraft.src;
import java.util.List;
public class LMHEntityBase extends EntityMob
{
public LMHEntityBase(World world)
{
super(world);
// Example ModLoader Mod by BlockAfterBlock (for #mcp-modding irc)
// Shows adding a block, an item, custom textures, adding a recipe,
// adding a smelting recipe, AND ADDING AN ENTITY.
package net.minecraft.src;
public class mod_ExampleMod extends BaseMod
{
//This can be almost anything to my knowledge. I just put version of Minecraft.
public String Version()
package net.minecraft.src;
import java.util.List;
public class LMHNative1 extends LMHEntityBase
{
public LMHNative1(World world)
{
super(world);