Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MultiMote

Forge Modder
  • Joined

  • Last visited

Everything posted by MultiMote

  1. TextureMap.locationItemsTexture
  2. You should create your own primed tnt entity and replace time there. And replace vanilla entity with your entity in EntityJoinWorldEvent.
  3. I'm using MouseEvent and packets.
  4. *wavefront Model must have triangle faces. Blender: up42.ru/u/p/___________________2014-08-15_17_41_06.png
  5. And http://www.minecraftforge.net/forum/index.php/topic,23417.0.html
  6. I tested it and it works. Recheck your code.
  7. You can return null container for server, but you can't return null gui for client.
  8. getPosition is clientside. .posX can't cause NoSuchMethodError
  9. 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; }
  10. Store Item links (Mymod.someitem etc.) in your array. NOT ItemStacks. Create new ItemStacks from items in your loop.
  11. Use two blocks. Like door.
  12. This function is not intended for this case.
  13. abs is module of the number. abs(-10) -> 10 abs(10) -> 10
  14. 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); }
  15. @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.
  16. @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; }
  17. 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.
  18. world.createExplosion(exploderEntity, x, y, z, radius, spawnParticles);

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.