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.

Godis_apan

Members
  • Joined

  • Last visited

Everything posted by Godis_apan

  1. It doesn't like you to this.spawnableMonsterList.clear(); my suggestion is that you find another way to clear the mobs from spawning, look if there's any pre-made methods for it.
  2. if (getStackInSlot(0) != null) { if (getStackInSlot(0).getItem() == myItem) { //do something! } }
  3. That is the priority the generation is being called. If you need something to be generated very early in the game the number should be higher. If you want it to generate at the very end of all the other generation it should be low. Hope that helped!
  4. Can't you use the ItemCraftedEvent?
  5. It's an abstract class, you can't use abstract classes as objects. Remove the public abstract class To: public class
  6. TGG, i know that, it's just that majesticmadman98, no offence, hasn't really got my point here. I my first or second message I explaind it all, just missed to add the little after the icons. But here's a finished code exaktly like you should have it: public static final String[] TOP = {"Palm_Wood_Log_Top"}; public static final String[] SIDE = {"Palm_Wood_Log_Side"}; private IIcon[] topIcon; private IIcon[] sideIcon; public void registerBlockIcons(IIconRegister iIconRegister) { topIcon = new IIcon[this.TOP.length]; sideIcon = new IIcon[this.SIDE.length]; for (int i = 0; i < TOP.lenngth; i++) { topIcon[i] = iIconRegister.registerIcon(HAT.MODID + ":" + this.TOP); sideIcon[i] = iIconRegister.registerIcon(HAT.MODID + ":" + this.SIDE) } } @SideOnly(Side.CLIENT) @Override protected IIcon getSideIcon(int metadata) { return sideIcon[metadata]; } @SideOnly(Side.CLIENT) @Override protected IIcon getTopIcon(int metadata) { return topIcon[metadata]; } You shouldm't have to change anything
  7. In your renderer. Make a private static MyModel model; object. In the costructor add model = new MyModel(); And in the rendetTileEntityAt you add model.render(0.0625F);
  8. should be topIcon = iIconRegister.registerIcon(HAT.MODID + ":Palm_Wood_Log" + "_Top") Exactly like that.
  9. In your tileentity
  10. @Override public Packet getDescriptionPacket() { NBTTagCompound tag = new NBTTagCompound(); writeToNBT(tag); return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) { readFromNBT(packet.func_148857_g()); }
  11. Yes but you can remove all this: @SideOnly(Side.CLIENT) protected IIcon[] field_150167_a; @SideOnly(Side.CLIENT) protected IIcon[] field_150166_b; private static final String __OBFID = "CL_00000266"; And they should return 0, like this: @SideOnly(Side.CLIENT) @Override protected IIcon getSideIcon(int metadata) { return sideIcon[0]; } @SideOnly(Side.CLIENT) @Override protected IIcon getTopIcon(int metadata) { return topIcon[0]; }
  12. Because they're out of the players sight? Like it disappears slightly before the entity reaches out of the players view?
  13. To use the setIcons() you will have to give it an already made IIcon object, where can we find that? In your fluid block class. setIcons(myFluidBlock.getBlockTextureFromSide(side) A good way to do this is in the TextureStitchEvent. @SubscribeEvent @SideOnly(Side.CLIENT) public void textureHook(TextureStitchEvent.Post event) { if (event.map.getTextureType() == 0) { myFluid.setIcons(myFluidBlock.getBlockTextureFromSide(1), myFluidBlock.getBlockTextureFromSide(2)); } } In your preInit: MinecraftForge.EVENT_BUS.register(this); //use the instance of your mod here!
  14. It should be: controllerid = var1.getInteger("controllerid");
  15. Yes that the class, but if you look at the parameter name you will see that it's called iIconRegister, as when you write code in java the common way to name variables is to uncap the first word.
  16. Just do topIcon = iIconRegister and sideIcon = iIconRegister
  17. What do you want to do? Make a new entity spawn when another one dies?
  18. http://www.minecraftforum.net/topic/1412300-147forgeblaueseichoerns-gui-tutorial/ Under the spoiler gui there should be an itemstack tutorial.
  19. Ok like this: public static final String[] TOP = {"topIcon1Name", "topIcon2Name", "topIcon3Name", and so on..}; public static final String[] SIDE = {"sideIcon1Name", "sideIcon2Name", "sideIcon3Name", and so on..}; private IIcon topIcon[]; private IIcon sideIcon[]; public void registerBlockIcons(IIconRegister iIconRegister) { topIcon = new IIcon[TOP.length]; sideIcon = new IIcon[sIDE.length]; for (int i = 0; i < TOP.lenngth; i++) { topIcon = iIconRegister.registerIcon("modid" + ":" + TOP); sideIcon = iIconRegister.registerIcon("modid" + ":" + SIDE) } } @SideOnly(Side.CLIENT) @Override protected IIcon getSideIcon(int metadata) { return sideIcon[metadata]; } @SideOnly(Side.CLIENT) @Override protected IIcon getTopIcon(int metadata) { return topIcon[metadata]; } That should do it! Fairy straight forward code.
  20. @SideOnly(Side.CLIENT) @Override protected IIcon getSideIcon(int metadata) { return mySideIcon; } @SideOnly(Side.CLIENT) @Override protected IIcon getTopIcon(int metadata) { return myTopIcon; } If you have more metadata wood just return: myIcon[metadata]
  21. You can check all strings in: net.minecraftforge.oredict.OreDictionary Or here: http://www.minecraftforge.net/wiki/Common_Oredict_names
  22. Ohh, if you want to add loot too a dungeon chest/ mineshaft then use the ChestGenHooks.addDungeonlLoot(); The params should be fairly straight forward. I hope that helps.
  23. MinecraftForge.addGrassSeed(new ItemStack(myItem), weight); (weight is how often it should be dropped) VillagerRegistry.addEmeraldSellRecipe(); you'll have to add some parameters try to figure it out.
  24. Check the ForgeDirection the power comes from, and make it so that i can't send it back through that direction. Therefor you can prevent back and front bouncing
  25. That's smart, when the teleport happens just make a three for loops increasing the x, y, z like this. for (int i = player.posX - 5; i < player.posX + 5; i++) { for (int j = player.posY - 5; j < player.posX + 5; j++) { for (int k = player.posZ - 5; k < player.posX + 5; k++) { if (world.getBlock(i, j k) == Blocks.obsidian || world.getBlock(i, j k) == Blocks.portal) { world.setBlockToAir(i, j, k); } } } } Something like that.

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.