Everything posted by MultiMote
-
[1.7.2] Get ResourceLocation of Items
TextureMap.locationItemsTexture
-
Waiting for Four Seconds
You should create your own primed tnt entity and replace time there. And replace vanilla entity with your entity in EntityJoinWorldEvent.
-
Re: Blaster Delay Between Firing
I'm using MouseEvent and packets.
-
[1.7.10] Waveform Incorrect Format?
*wavefront Model must have triangle faces. Blender: up42.ru/u/p/___________________2014-08-15_17_41_06.png
-
[1.7.10] Need a list of the Things To Do when breaking a block
world.func_147480_a(x, y, z, true);
-
[Solved!] [1.7.10] Player view distortion
How?
-
Why does a creative mode player not react to changes of the motion vars?
entity.addVelocity ?
-
Why does a creative mode player not react to changes of the motion vars?
Try entity.moveEntity params are motions
-
Help referencing the player server-side?
And http://www.minecraftforge.net/forum/index.php/topic,23417.0.html
-
[1.7.10] Give player random items
- [1.7.10] Give player random items
I tested it and it works. Recheck your code.- GUI opening
You can return null container for server, but you can't return null gui for client.- Getting a player's position
getPosition is clientside. .posX can't cause NoSuchMethodError- [1.7.10] Give player random items
public Item stack; @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player){ Random rand = new Random(); //itemRand for(int m = 0; m < 6; m++) //you said 5 { int r = rand.nextInt(Lootcube.pokelist.length - 1); //nextInt counts from 0 stack = Lootcube.pokelist[r]; player.inventory.addItemStackToInventory(new ItemStack(stack)); player.inventory.consumeInventoryItem(this); itemStack.stackSize--; } return new ItemStack(stack); //why? return itemStack; } public static Item[] pokelist = {Items.apple, Items.carrot, Items.potato, Items.slime_ball, Items.arrow, Items.beef, Items.shears}; @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player){ if(world.isRemote)return itemStack; //because ghost items List<Item> tempList = new ArrayList<Item>(); tempList.addAll(Arrays.asList(pokelist)); //because remove() causes UnsupportedOperationException for(int m = 0; m < 5; m++) { player.inventory.addItemStackToInventory(new ItemStack(tempList.remove(itemRand.nextInt(tempList.size())))); //because science itemStack.stackSize--; } return itemStack; }- [1.7.10] Give player random items
Store Item links (Mymod.someitem etc.) in your array. NOT ItemStacks. Create new ItemStacks from items in your loop.- [1.6.4] Hitbox Bug
Use two blocks. Like door.- [1.7.10]stop certain item from entering chest
If chest is custom - sure.- Displaying world time in a MM:HH format [SOLVED] [1.7.10]
This function is not intended for this case.- Displaying world time in a MM:HH format [SOLVED] [1.7.10]
abs is module of the number. abs(-10) -> 10 abs(10) -> 10- Displaying world time in a MM:HH format [SOLVED] [1.7.10]
public static int getWorldMinutes(World world) { int time = (int) Math.abs((world.getWorldTime() + 6000) % 24000); return (time % 1000) * 6 / 100; } public static int getWorldHours(World world) { int time = (int)Math.abs((world.getWorldTime()+ 6000) % 24000); return (int)((float)time / 1000F); }- [SOLVED] Trying to get a Item to right click/plant crops in a area.
@Override public boolean onItemUse(ItemStack is, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { ItemStack next = player.inventory.currentItem+1 < player.inventory.getSizeInventory() ? player.inventory.getStackInSlot(player.inventory.currentItem+1) : null; if(side!=1 || !(next!=null && next.getItem() instanceof IPlantable))return false; int radius = 3; for(int x2 = -radius; x2<=radius; x2++) for(int z2 = -radius; z2<=radius; z2++){ if(next.stackSize>0)next.getItem().onItemUse(next, player, world, x+x2, y, z+z2, side, hitX, hitY, hitZ); if(next.stackSize<=0)player.inventory.setInventorySlotContents(player.inventory.currentItem+1, null); } return true; } I think it works.- [SOLVED] Trying to get a Item to right click/plant crops in a area.
@Override public boolean onItemUse(ItemStack is, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { if(side!=1 || world.getBlock(x, y, z) != Blocks.farmland)return false; if(world.isRemote)return true; int radius = 3; for(int x2 = -radius; x2<=radius; x2++) for(int z2 = -radius; z2<=radius; z2++) if(player.canPlayerEdit(x+x2, y, z+z2, side, is) && world.getBlock(x+x2, y+1, z+z2).getMaterial().isReplaceable() && world.getBlock(x+x2, y, z+z2) == Blocks.farmland) world.setBlock(x+x2, y+1, z+z2, Blocks.wheat, 0, 3); return true; }- Minecraft armor model texture is white dyed leather textured
Use par3 which is not 0.- Bigger TNT Explosions
Sources can be located at /build/tmp/recompSrc. Or you can browse forge-1.7.10-*.jar lib in your IDE. In IDEA you can press Ctrl+N and enter EntityTNTPrimed.- Bigger TNT Explosions
world.createExplosion(exploderEntity, x, y, z, radius, spawnParticles); - [1.7.10] Give player random items
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.