For this tutorial you need Puddlehund's Dimension API which can be found here.
Your mod_ file
package net.minecraft.src;
public class mod_Tutorial extends BaseMod{
public static final Item tutorial = new ItemTutorial(250, 0).setItemName("Derp");
public mod_Tutorial() {
DimensionAPI.registerDimension(new WorldProviderTutorial());
}
public String getVersion() {
return "Spaces Tutorials!";
}
public void load() {
ModLoader.addName(tutorial,"Tutorial Portal");
ModLoader.addRecipe(new ItemStack(tutorial, 1), new Object[] {"#", Character.valueOf('#'), Block.dirt});
}
}
Your WorldProvider file
package net.minecraft.src;
public class WorldProviderTutorial extends WorldProviderBase
{
public int getDimensionID()
{
return 3;
}
public boolean renderClouds()
{
return true;
}
public boolean renderVoidFog()
{
return false;
}
public float setSunSize()
{
return 0.5F;
}
public float setMoonSize()
{
return 0.5F;
}
public boolean renderStars()
{
return true;
}
public boolean darkenSkyDuringRain()
{
return false;
}
public String getRespawnMessage()
{
return "Your a derp.";
}
public void registerWorldChunkManager()
{
worldChunkMgr = new WorldChunkManagerTutorial(worldObj);
}
public IChunkProvider getChunkProvider()
{
return new ChunkProviderTutorial(worldObj, worldObj.getSeed(), hasNoSky);
}
}
Your ChunkManager file
package net.minecraft.src;
import java.util.List;
import java.util.Random;
public class ChunkProviderTutorial implements IChunkProvider
{
private World worldObj;
private Random random;
private final boolean useStructures;
private MapGenVillage villageGen;
public ChunkProviderTutorial(World par1World, long par2, boolean par4)
{
villageGen = new MapGenVillage(1);
worldObj = par1World;
useStructures = par4;
random = new Random(par2);
}
private void generate(byte par1ArrayOfByte[])
{
int i = par1ArrayOfByte.length / 256;
for (int j = 0; j < 16; j++)
{
for (int k = 0; k < 16; k++)
{
for (int l = 0; l < i; l++)
{
int i1 = 0;
if (l == 0)
{
i1 = Block.bedrock.blockID;
}
else if (l <= 2)
{
i1 = Block.dirt.blockID;
}
else if (l == 3)
{
i1 = Block.grass.blockID;
}
par1ArrayOfByte[j << 11 | k << 7 | l] = (byte)i1;
}
}
}
}
/**
* Creates an empty chunk ready to put data from the server in
*/
public Chunk loadChunk(int par1, int par2)
{
return provideChunk(par1, par2);
}
/**
* Will return back a chunk, if it doesn't exist and its not a MP client it will generates all the blocks for the
* specified chunk from the map seed and chunk seed
*/
public Chunk provideChunk(int par1, int par2)
{
byte abyte0[] = new byte[32768];
generate(abyte0);
Chunk chunk = new Chunk(worldObj, abyte0, par1, par2);
if (useStructures)
{
villageGen.generate(this, worldObj, par1, par2, abyte0);
}
chunk.generateSkylightMap();
return chunk;
}
/**
* Checks to see if a chunk exists at x, y
*/
public boolean chunkExists(int par1, int par2)
{
return true;
}
/**
* Populates chunk with ores etc etc
*/
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
random.setSeed(worldObj.getSeed());
long l = (random.nextLong() / 2L) * 2L + 1L;
long l1 = (random.nextLong() / 2L) * 2L + 1L;
random.setSeed((long)par2 * l + (long)par3 * l1 ^ worldObj.getSeed());
if (useStructures)
{
villageGen.generateStructuresInChunk(worldObj, random, par2, par3);
}
}
/**
* Two modes of operation: if passed true, save all Chunks in one go. If passed false, save up to two chunks.
* Return true if all chunks have been saved.
*/
public boolean saveChunks(boolean par1, IProgressUpdate par2IProgressUpdate)
{
return true;
}
/**
* Unloads the 100 oldest chunks from memory, due to a bug with chunkSet.add() never being called it thinks the list
* is always empty and will not remove any chunks.
*/
public boolean unload100OldestChunks()
{
return false;
}
/**
* Returns if the IChunkProvider supports saving.
*/
public boolean canSave()
{
return true;
}
/**
* Converts the instance data to a readable string.
*/
public String makeString()
{
return "FlatLevelSource";
}
/**
* Returns a list of creatures of the specified type that can spawn at the given location.
*/
public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4)
{
BiomeGenBase biomegenbase = worldObj.func_48454_a(par2, par4);
if (biomegenbase == null)
{
return null;
}
else
{
return biomegenbase.getSpawnableList(par1EnumCreatureType);
}
}
/**
* Returns the location of the closest structure of the specified type. If not found returns null.
*/
public ChunkPosition findClosestStructure(World par1World, String par2Str, int par3, int i, int j)
{
return null;
}
}
Your WorldChunkManager file
package net.minecraft.src;
import java.util.*;
public class WorldChunkManagerTutorial extends WorldChunkManager
{
private GenLayer genBiomes;
/** A GenLayer containing the indices into BiomeGenBase.biomeList[] */
private GenLayer biomeIndexLayer;
/** The BiomeCache object for this world. */
private BiomeCache biomeCache;
/** A list of biomes that the player can spawn in. */
private List biomesToSpawnIn;
protected WorldChunkManagerTutorial()
{
biomeCache = new BiomeCache(this);
biomesToSpawnIn = new ArrayList();
biomesToSpawnIn.add(BiomeGenBase.forest);
biomesToSpawnIn.add(BiomeGenBase.plains);
biomesToSpawnIn.add(BiomeGenBase.taiga);
biomesToSpawnIn.add(BiomeGenBase.taigaHills);
biomesToSpawnIn.add(BiomeGenBase.forestHills);
biomesToSpawnIn.add(BiomeGenBase.field_48416_w);
biomesToSpawnIn.add(BiomeGenBase.field_48417_x);
biomesToSpawnIn.add(BiomeGenBase.virus);
}
public WorldChunkManagerTutorial(long par1, WorldType par3WorldType)
{
this();
GenLayer agenlayer[] = GenLayer.func_48425_a(par1, par3WorldType);
genBiomes = agenlayer[0];
biomeIndexLayer = agenlayer[1];
}
public WorldChunkManagerTutorial(World par1World)
{
this(par1World.getSeed(), par1World.getWorldInfo().getTerrainType());
}
/**
* Gets the list of valid biomes for the player to spawn in.
*/
public List getBiomesToSpawnIn()
{
return biomesToSpawnIn;
}
/**
* Returns the BiomeGenBase related to the x, z position on the world.
*/
public BiomeGenBase getBiomeGenAt(int par1, int par2)
{
return biomeCache.getBiomeGenAt(par1, par2);
}
/**
* Returns a list of rainfall values for the specified blocks. Args: listToReuse, x, z, width, length.
*/
public float[] getRainfall(float par1ArrayOfFloat[], int par2, int par3, int par4, int par5)
{
IntCache.resetIntCache();
if (par1ArrayOfFloat == null || par1ArrayOfFloat.length < par4 * par5)
{
par1ArrayOfFloat = new float[par4 * par5];
}
int ai[] = biomeIndexLayer.getInts(par2, par3, par4, par5);
for (int i = 0; i < par4 * par5; i++)
{
float f = (float)BiomeGenBase.biomeList[ai[i]].getIntRainfall() / 65536F;
if (f > 1.0F)
{
f = 1.0F;
}
par1ArrayOfFloat[i] = f;
}
return par1ArrayOfFloat;
}
/**
* Return an adjusted version of a given temperature based on the y height
*/
public float getTemperatureAtHeight(float par1, int par2)
{
return par1;
}
/**
* Returns a list of temperatures to use for the specified blocks. Args: listToReuse, x, y, width, length
*/
public float[] getTemperatures(float par1ArrayOfFloat[], int par2, int par3, int par4, int par5)
{
IntCache.resetIntCache();
if (par1ArrayOfFloat == null || par1ArrayOfFloat.length < par4 * par5)
{
par1ArrayOfFloat = new float[par4 * par5];
}
int ai[] = biomeIndexLayer.getInts(par2, par3, par4, par5);
for (int i = 0; i < par4 * par5; i++)
{
float f = (float)BiomeGenBase.biomeList[ai[i]].getIntTemperature() / 65536F;
if (f > 1.0F)
{
f = 1.0F;
}
par1ArrayOfFloat[i] = f;
}
return par1ArrayOfFloat;
}
/**
* Returns an array of biomes for the location input.
*/
public BiomeGenBase[] getBiomesForGeneration(BiomeGenBase par1ArrayOfBiomeGenBase[], int par2, int par3, int par4, int par5)
{
IntCache.resetIntCache();
if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5)
{
par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
}
int ai[] = genBiomes.getInts(par2, par3, par4, par5);
for (int i = 0; i < par4 * par5; i++)
{
par1ArrayOfBiomeGenBase[i] = BiomeGenBase.biomeList[ai[i]];
}
return par1ArrayOfBiomeGenBase;
}
/**
* Returns biomes to use for the blocks and loads the other data like temperature and humidity onto the
* WorldChunkManager Args: oldBiomeList, x, z, width, depth
*/
public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase par1ArrayOfBiomeGenBase[], int par2, int par3, int par4, int par5)
{
return getBiomeGenAt(par1ArrayOfBiomeGenBase, par2, par3, par4, par5, true);
}
/**
* Return a list of biomes for the specified blocks. Args: listToReuse, x, y, width, length, cacheFlag (if false,
* don't check biomeCache to avoid infinite loop in BiomeCacheBlock)
*/
public BiomeGenBase[] getBiomeGenAt(BiomeGenBase par1ArrayOfBiomeGenBase[], int par2, int par3, int par4, int par5, boolean par6)
{
IntCache.resetIntCache();
if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5)
{
par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
}
if (par6 && par4 == 16 && par5 == 16 && (par2 & 0xf) == 0 && (par3 & 0xf) == 0)
{
BiomeGenBase abiomegenbase[] = biomeCache.getCachedBiomes(par2, par3);
System.arraycopy(abiomegenbase, 0, par1ArrayOfBiomeGenBase, 0, par4 * par5);
return par1ArrayOfBiomeGenBase;
}
int ai[] = biomeIndexLayer.getInts(par2, par3, par4, par5);
for (int i = 0; i < par4 * par5; i++)
{
par1ArrayOfBiomeGenBase[i] = BiomeGenBase.biomeList[ai[i]];
}
return par1ArrayOfBiomeGenBase;
}
/**
* checks given Chunk's Biomes against List of allowed ones
*/
public boolean areBiomesViable(int par1, int par2, int par3, List par4List)
{
int i = par1 - par3 >> 2;
int j = par2 - par3 >> 2;
int k = par1 + par3 >> 2;
int l = par2 + par3 >> 2;
int i1 = (k - i) + 1;
int j1 = (l - j) + 1;
int ai[] = genBiomes.getInts(i, j, i1, j1);
for (int k1 = 0; k1 < i1 * j1; k1++)
{
BiomeGenBase biomegenbase = BiomeGenBase.biomeList[ai[k1]];
if (!par4List.contains(biomegenbase))
{
return false;
}
}
return true;
}
/**
* Finds a valid position within a range, that is once of the listed biomes.
*/
public ChunkPosition findBiomePosition(int par1, int par2, int par3, List par4List, Random par5Random)
{
int i = par1 - par3 >> 2;
int j = par2 - par3 >> 2;
int k = par1 + par3 >> 2;
int l = par2 + par3 >> 2;
int i1 = (k - i) + 1;
int j1 = (l - j) + 1;
int ai[] = genBiomes.getInts(i, j, i1, j1);
ChunkPosition chunkposition = null;
int k1 = 0;
for (int l1 = 0; l1 < ai.length; l1++)
{
int i2 = i + l1 % i1 << 2;
int j2 = j + l1 / i1 << 2;
BiomeGenBase biomegenbase = BiomeGenBase.biomeList[ai[l1]];
if (par4List.contains(biomegenbase) && (chunkposition == null || par5Random.nextInt(k1 + 1) == 0))
{
chunkposition = new ChunkPosition(i2, 0, j2);
k1++;
}
}
return chunkposition;
}
/**
* Calls the WorldChunkManager's biomeCache.cleanupCache()
*/
public void cleanupCache()
{
biomeCache.cleanupCache();
}
}
Your Teleporter file
package net.minecraft.src;
public class TeleporterTutorial extends Teleporter{}
Your Item file
package net.minecraft.src;
import java.util.ArrayList;
import java.util.List;
public class ItemTutorial extends ItemTeleporterBase
{
public ItemTutorial(int i, int j)
{
super(i);
}
public WorldProviderBase getDimension()
{
return new WorldProviderTutorial();
}
public TeleporterTutorial getTeleporter()
{
return new TeleporterTutorial();
}
public String getEnteringMessage()
{
return "Entering the Tutorial Dimension";
}
public String getLeavingMessage()
{
return "Leaving the Tutorial Dimension";
}
public boolean isPortalImmediate()
{
return true;
}
public boolean displayPortalAnimation()
{
return true;
}
public int returnsPlayerToDimension()
{
return 0;
}
public double getDistanceRatio()
{
return 0.2D;
}
public int getPortalDelay()
{
return 150;
}
}
I edited Puddlehund's ItemTeleporterBase to make this work so here it is
package net.minecraft.src;
import java.util.ArrayList;
import java.util.List;
public abstract class ItemTeleporterBase extends Item
implements ISpecialTeleportation
{
public ItemTeleporterBase(int i)
{
super(i);
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
if (!world.isRemote)
{
DimensionAPI.setInPortal(getDimension(), ModLoader.getMinecraftInstance(), (EntityPlayerSP)entityplayer, this, null);
}
if (displayPortalOverlay())
{
GuiIngame.currentPortal = this;
entityplayer.setInPortal();
if(entityplayer.timeInPortal >= 0.9F)
{
entityplayer.timeInPortal = 0.0F;
GuiIngame.currentPortal = null;
}
}
return itemstack;
}
public abstract WorldProviderBase getDimension();
public abstract TeleporterTutorial getTeleporter();
public abstract String getEnteringMessage();
public abstract String getLeavingMessage();
public boolean isPortalImmediate()
{
return true;
}
public boolean displayPortalOverlay()
{
return false;
}
public int getOverlayTexture()
{
return Block.portal.blockIndexInTexture;
}
public List canTeleportFromDimension()
{
ArrayList arraylist = new ArrayList();
arraylist.add(Integer.valueOf(0));
return arraylist;
}
public int returnsPlayerToDimension()
{
return 0;
}
public double getDistanceRatio()
{
return 1.0D;
}
public int getPortalDelay()
{
return 0;
}
public Achievement triggerAchievement()
{
return null;
}
}
[size=large]Explanation[/size]
[size=medium]
[/size]
Im not really going to explain anything because this is some advanced stuff and Puddlehund's Dimension API makes it alot more easier.
this did not work for me what are you meant to decompile the minecraft.jar with?
like what mods as in do you use modloadermp as well?
Spaces. Thank you for all these tutorials! I plan on using them wisely! One question, how to I add a way to craft the gun? It was not explained earlier (Or I'm just stupid and didn't see it.)
Hi
I'm making my second mod and I was hoping you could help
I have spent about 1 hour trying to figure this out, but i cant
I want to make a mod that if you put a pumpkin on your head you will immediately die.
Also I need it to be able to read a config file so I can save settings of the mod
Thanks.
This is the code i tried:
In SlotArmor.java line 27 - 32:
im running 1.2.5 and your mod works great, but im trying to do something a bit different with it and am wondering if you could help me with it, how would you add zoom to a gun? i have a code that uses GL11 here
package net.minecraft.src;
import org.lwjgl.opengl.GL11;
import java.util.*;
import org.lwjgl.input.Mouse;
import net.minecraft.client.Minecraft;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
public class ItemGun extends Item
{
// private KeyBinding Zoom = new KeyBinding("Zoom", mod_ToolingTable.ZoomKeyID);
public ItemGun(int par1)
{
super(par1);
this.maxStackSize = 1;
}
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
boolean var5 = par3EntityPlayer.capabilities.isCreativeMode;
if((Mouse.isButtonDown(0)))
{
GL11.glPushMatrix();
GL11.glTranslatef(1.0F, 1.0F, 1.0F);
GL11.glPopMatrix();
}else
if (!par3EntityPlayer.capabilities.isCreativeMode)
{
if (var5 || par3EntityPlayer.inventory.hasItem(mod_ToolingTable.bullet.shiftedIndex))
{
if (!var5)
{
par3EntityPlayer.inventory.consumeInventoryItem(mod_ToolingTable.bullet.shiftedIndex);
if (!par2World.isRemote)
{
par2World.spawnEntityInWorld(new EntityBullet(par2World, par3EntityPlayer));
}
par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
}
}
}
return par1ItemStack;
}
}
how the actual bow does it is with a enum and itemrenderer with the same GL code, ive been trying for a while now and cant figure this out
So i followed your dimensions tutorial and I got a major error, my worlds wont load, it loads forever, when i check the .bat it says that the server was stopped. Fortunatley the crash was saved.
10/12 5:22 PM
Description: Exception in server tick loop
java.lang.NullPointerException
at net.minecraft.src.WorldChunkManagerFuture.<init>(WorldChunkManagerFuture.java:36)
at net.minecraft.src.WorldChunkManagerFuture.<init>(WorldChunkManagerFuture.java:42)
at net.minecraft.src.WorldProviderFuture.registerWorldChunkManager(WorldProviderFuture.java:47)
at net.minecraft.src.WorldProvider.registerWorld(WorldProvider.java:38)
at net.minecraft.src.World.<init>(World.java:202)
at net.minecraft.src.WorldServer.<init>(WorldServer.java:53)
at net.minecraft.src.WorldServerMulti.<init>(WorldServerMulti.java:9)
at net.minecraft.src.IntegratedServer.loadAllDimensions(IntegratedServer.java:81)
at net.minecraft.src.IntegratedServer.startServer(IntegratedServer.java:126)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:429)
at net.minecraft.src.ThreadServerApplication.run(ThreadServerApplication.java:17)
Relevant Details:
- Minecraft Version: 1.3.2
- Operating System: Windows XP (x86) version 5.1
- Java Version: 1.7.0_06, Oracle Corporation
- Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
- Memory: 1030638736 bytes (982 MB) / 1067057152 bytes (1017 MB) up to 1067057152 bytes (1017 MB)
- JVM Flags: 3 total; -Xincgc -Xms1024M -Xmx1024M
- ModLoader: Mods loaded: 2
ModLoader 1.3.2
mod_walle Wall-E Mod for 1.3.2
- Is Modded: Very likely
- Profiler Position: N/A (disabled)
- Player Count: 0 / 8; []
- World Test Entities: 0 total; []
- World Test Players: 0 total; []
- World Test Chunk Stats: ServerChunkCache: 0 Drop: 0
- Type: Integrated Server
I copied all your code for the gun tutorial and renamed the code to fit mine and everything works fine except that the bullet is invisible. I am using 1.3.2 so i don't know if this is a problem but the rest works fine so i'll assume it's fine.
Hi
I'm making my second mod and I was hoping you could help
I have spent about 1 hour trying to figure this out, but i cant
I want to make a mod that if you put a pumpkin on your head you will immediately die.
Also I need it to be able to read a config file so I can save settings of the mod
Thanks.
This is the code i tried:
In SlotArmor.java line 27 - 32:
uhh have you tried so thta when you put the pumpkin on you get a buffer such as: instant harming 20 or something? havent been coding to long. hope i could help
Ok so ive got this idea in my mind for a long time now, but i just started modding and i basicly got no idea of how i am going to do this.
So the idea was to make some sort of a slingshot with ''bullets'' made out of cobblestone, could anyone help me please =)
add me on skype if you would rather talk there: Thomas.Herfoss.Tveit
So basically all this tutorial really is creating a new throwable entity.
Your mod_ class
package net.minecraft.src;
public class mod_Tutorial extends BaseMod{
public static Item gun = new ItemGun(3000).setMaxStackSize(1).setItemName("Gun");
public static Item bullet = new Item(3001).setItemName("Bullet");
@Override
public String getVersion() {
return "Spaces Tutorials!";
}
@Override
public void load() {
ModLoader.addName(gun , "Gun");
ModLoader.addName(bullet, "bullet");
gun.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mods/Picture.png");
bullet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mods/Picture.png");
ModLoader.addShapelessRecipe(new ItemStack(bullet, 64), new Object[]{
Block.dirt
});
ModLoader.addShapelessRecipe(new ItemStack(gun, 1), new Object[]{
Block.dirt, Block.dirt
});
}
}
ItemGun class
package net.minecraft.src;
public class BItemBlackRevolver extends Item
{
public BItemBlackRevolver(int par1)
{
super(par1);
this.maxStackSize = 1;
}
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
boolean var5 = par3EntityPlayer.capabilities.depleteBuckets;
if (!par3EntityPlayer.capabilities.depleteBuckets)
{
if (var5 || par3EntityPlayer.inventory.hasItem(mod_Tutorial.bullet.shiftedIndex))
{
if (!var5)
{
par3EntityPlayer.inventory.consumeInventoryItem(mod_Tutorial.bullet.shiftedIndex);
if (!par2World.isRemote)
{
par2World.spawnEntityInWorld(new EntityBullet(par2World, par3EntityPlayer));
}
par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
}
}
}
return par1ItemStack;
}
}
EntityBullet
package net.minecraft.src;
public class EntityBullet extends EntityThrowable
{
public EntityBullet(World par1World)
{
super(par1World);
}
public EntityBullet(World par1World, EntityLiving par2EntityLiving)
{
super(par1World, par2EntityLiving);
}
public EntityBullet(World par1World, double par2, double par4, double par6)
{
super(par1World, par2, par4, par6);
}
protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
{
if (par1MovingObjectPosition.entityHit != null)
{
/**The damage is this variable
* \/ **/
byte var2 = 5;
if (par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.thrower), var2))
{
;
}
}
for (int var3 = 0; var3 < 8; ++var3)
{
this.worldObj.spawnParticle("snowballpoof", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
}
if (!this.worldObj.isRemote)
{
this.setEntityDead();
}
}
}
Explanation
For the mod_Tutorial file:
You should know how to make a basic item with modloader. For the gun item makes a new ItemGun because there are specific things we need to do inside that class for make the gun to work and the bullet item is just a plain old Item because its just not going to do anything all its going to help us with is checking if the player has the item in their inventory.
For the ItemGun file:
So this file is specifically important because if you look at the onRightClick method and inside of it the deplete buckets statement it checks if the specific item is in the Player's inventory and if it is it will take the item on right click and it will spawn an entitybullet into the world.
For the EntityBullet file:
Basically all this is just the EntitySnowball file with renamed methods and if you see where I left a comment saying this is the damage variable just make that how ever much you like and it goes by half hearts so to kill a player on bullet hit it has to be 20.
My bullet is invisible when i fire it; at first i didn't even think it was firing (probably because i had sound off). How do i give it a texture, like an arrow entity?
this did not work for me what are you meant to decompile the minecraft.jar with?
like what mods as in do you use modloadermp as well?
I cant say the direct answer but i know this much,
if (itemstack.getItem().shiftedIndex == Block.pumpkin.blockID)
shiftedIndex is for Items, not Blocks
my code is same as yours only changed to fit mod
mod_VksWeaponsPack.java
ItemL115A3AWM.java
EntityL115A3AWMAmmo.java
So the idea was to make some sort of a slingshot with ''bullets'' made out of cobblestone, could anyone help me please =)
add me on skype if you would rather talk there: Thomas.Herfoss.Tveit
My bullet is invisible when i fire it; at first i didn't even think it was firing (probably because i had sound off). How do i give it a texture, like an arrow entity?