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.

KriszDev

Members
  • Joined

  • Last visited

  1. So I have to check whether I'm on client or server side and only create in on server side?
  2. Hello everyone I've tried to create a basic tile entity which stores an array of values. This is not relevant because it works ,but when I place the block it created 2 tile Entities and when I get that tile entity there are two different one depending on when I get it. public class BlockOreFarm extends BlockContainer { public BlockOreFarm(Material materialIn, String name) { super(materialIn); setUnlocalizedName(name); setBlockUnbreakable(); setLightLevel(12); setCreativeTab(ModMicroTech.tab); } @Override public int getRenderType() { return 3; } @Override public TileEntity createNewTileEntity(World worldIn, int meta) { ModMicroTech.log.info("TILE ENTITY CREATED"); return new TileOreFarm().set(ApiFarm.get()); } } [09:02:19] [Client thread/INFO]: TILE ENTITY CREATED [09:02:19] [Client thread/INFO]: Constructed farm: ContainedWithin{Diamond, 496696/496696} ContainedWithin{Iron, 790747/790747} ContainedWithin{Emerald, 371361/371361} [09:02:20] [server thread/INFO]: TILE ENTITY CREATED [09:02:20] [server thread/INFO]: Constructed farm: ContainedWithin{Iron, 555640/555640} As you see there are two create call for each block placed in my world. What causes this? and what should I do now?
  3. Try implementing IRecipe. public class RecipeMySword implements IRecipe { @Override public boolean matches(InventoryCrafting inv, World worldIn) { //this function return whether the item can be //crafted in the current crafting grid (InventoryCrafting object) //and world (Word object) } @Override public ItemStack getCraftingResult(InventoryCrafting inv) { //the item stack the player receive after the crafting //true output of the crafting so calculate here what he will get } @Override public ItemStack[] getRemainingItems(InventoryCrafting inv) { //delete the items from the grid using InventoryCrafting object return new ItemStack[0]; } @Override public int getRecipeSize() { //i heard that this is only for sorting purposes return 2; } @Override public ItemStack getRecipeOutput() { //Theoretical output of the crafting return new ItemStack(youritem); } } Then simply register it: GameRegistry.addRecipe(new RecipeMySword()); Also maybe you'll find this useful: http://www.minecraftforge.net/forum/index.php/topic,23133.0.html
  4. Ok, thanks for the help guys I'll watch all of them.
  5. Hello everyone. I would like to answer which tutorials did you find useful when you were learning about multiblock structures and/or GUIs ,because I can't find any 1.8 compatible tutorials on them. Also I want to find and extensive TileEntity tutorial. Thanks for any help.
  6. Many many thanks. What does getRecipeSize() do? When do I have to change it if I have a shapeless recipe?
  7. Hello everyone. I have an item let's call it PowerDrill and I want to craft it with a battery item to charge it (change a specific field in NBT and give both back). I have the charge level stored in both item's NBT. How can I make it possible to change their NBT when they are placed in a crafting grid? Thanks for any reply.

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.