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.

GotoLink

Members
  • Joined

  • Last visited

Everything posted by GotoLink

  1. Huh... packets. Most of them are vanilla.
  2. Entity ent = dmgSource.getEntity(); EntityPlayer player = (EntityPlayer) ent; ItemStack weapon = player.getCurrentEquippedItem(); if (!(ent instanceof EntityPlayer)) {return;} if (event.source.getDamageType().equals("player")) Again, you are casting to EntityPlayer before checking it is safe to do. And the last check seems useless.
  3. 1. It depends on what you want to do. Entity has less implemented methods (so they can't spawn "naturally" like mobs) but it can be enough for a lot of things. Boats and Minecarts are entities for example. There is EntityLivingBase now too. 2. Look at the SharedMonsterAttributes, this is where the data is dealt with. 3. Look at the mob tutorial, it is up to date. 4. I don't know. You can render "moving blocks" without entities, with a custom block renderer.
  4. There is a persistent NBT tag for players You could also use WorldSaveData and set the player data at spawn event.
  5. GotoLink replied to ss7's topic in Modder Support
    It is a rendering class, all the same.
  6. Extend pressure plate. Find the trigger method, override it with if(entitytrigger instanceof SomeEntity) super.foo(...);
  7. I think the MCP team shipped a tool within the pack. Can't remember the name, it is like updatemcp or the like. This tool would submit unofbufscated names that you introduced directly in the decompiled code. You can surely find more help about this on #mcp.
  8. GotoLink replied to ss7's topic in Modder Support
    So, no Container means you send your own packets. Before opening the GUI would be a good starting point i think.
  9. There is a custom letter in you folder path which isn't supported. "á" -> change it
  10. Forestry isn't part of Forge, so I don't know. Maybe the Squeezer holds a Map with block to fluid id ?
  11. GotoLink replied to ss7's topic in Modder Support
    world.markBlockForUpdate(x,y,z); would also send the description packet automatically.
  12. if (!this.worldObj.isRemote) { this.setDead(); if(!hasImpacted) { //Spawn new damaged spear in world ItemStack newSpear = new ItemStack(RecipeExpansionPack.spearIron,1,spearDurability); //newSpear.damageItem(384 - (spearDurability - 1), this.getThrower()); Entity entity = new EntityItem(worldObj, par1MovingObjectPosition.blockX, par1MovingObjectPosition.blockY, par1MovingObjectPosition.blockZ, newSpear); worldObj.spawnEntityInWorld(entity); hasImpacted = true; } } Would be better.
  13. public final static Block plutoniumBlock = new PlutoniumBlock(BlockIds.PLUTONIUMBLOCK_ID, Material.iron); public final static Block plutoniumOre = new PlutoniumOre(BlockIds.PLUTONIUMORE_ID, Material.rock); You will never use the correct id with this. Set the blocks after loading the config file.
  14. http://www.minecraftforge.net/wiki/Packet_Handling
  15. http://www.minecraftforge.net/wiki/Using_Access_Transformers
  16. You called your ScheduleUpdate in your Gui class, which is client side only. You'd better send a packet to the server, which will then call the SheduleUpdate and perform changes.
  17. private boolean isWearingGravitite; is never set to false. But you can do without that variable anyway.
  18. Use config.getItem and config.getBlock for those. Your package isn't lowercase.
  19. Maybe there are better ways with Forge than editing the base class.
  20. GotoLink replied to Suese's topic in Modder Support
    1. Look at the options file. (guiScale/overrideHeight/overrideWidth) Resolution is directly proportional to the screen size. 2. RenderGlobal ? Question is too vague.
  21. @Override public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); isLoaded=compound.getBoolean("loaded"); fuse=compound.getInteger("fuse"); blockMetadata=compound.getInteger("meta"); } Would be better this way.
  22. EntityItem holds the ItemStack. Damage it before spawn in world. Most likely, the method you are overriding doesn't exist any more.
  23. Hardcoded in Minecraft class. for (i = 0; i < 9; ++i) { if (Keyboard.getEventKey() == 2 + i) { this.thePlayer.inventory.currentItem = i; } } This means you can't change it.
  24. Make your fuel item damageable.

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.