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.

RaTheBadger

Members
  • Joined

  • Last visited

Everything posted by RaTheBadger

  1. Using code from EntitySkeleton, I made my mob apply a potion effect on collision with the player; however, now it doesn't have the normal damaging effect caused by EntityAIAttackOnCollide. How should I go about fixing this? This is the attackEntityAsMob code in my Entity's file. public boolean attackEntityAsMob(Entity par1Entity) { ((EntityLiving)par1Entity).addPotionEffect(new PotionEffect(Potion.wither.id, 200)); return true; } Thanks
  2. Yes, it does generate in the new dimension- but it does so by adding the biome from my main mod file into it. Here's the code, for example: public void registerWorldChunkManager() { this.worldChunkMgr = new WorldChunkManagerHell(ModAdamant.WitherMountains, 0.8F, 0.1F); this.dimensionId = ModAdamant.dimWither; }
  3. Yes, I imagine that this is probably asked very often, but I legitimately could not find a solution here. How can I make my biome generate only in a specific dimension, and not the overworld? Thanks
  4. I need help with this issue as well.
  5. EDIT: It works! Now I'm supposed to lock the topic right?
  6. I'm very new to modding, how would I do this?
  7. Hello; I'm having a minor issue with my mod. There's an item in my mod, that when right clicked on a block will turn it into a different block. This works fine; however it also is set to spawn an item there. When it does this, it spawns both the actual item, and a sort of ghost entity of the item. How do I fix this? Here's all the code used to do this. public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { MovingObjectPosition var4 = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, true); if (var4 == null) { return par1ItemStack; } else { if (var4.typeOfHit == EnumMovingObjectType.TILE) { int var5 = var4.blockX; int var6 = var4.blockY; int var7 = var4.blockZ; if (!par2World.canMineBlock(par3EntityPlayer, var5, var6, var7)) { return par1ItemStack; } if (!par3EntityPlayer.canPlayerEdit(var5, var6, var7, var4.sideHit, par1ItemStack)) { return par1ItemStack; } if (par2World.getBlockId(var5, var6, var7) == ModAdamant.witherdirt.blockID) { par2World.setBlockWithNotify(var5, var6, var7, Block.dirt.blockID); par1ItemStack.damageItem(1, par3EntityPlayer); par2World.spawnEntityInWorld(new EntityItem(par2World, var5, var6, var7, new ItemStack(ModAdamant.withershard))); } } return par1ItemStack; } } Thanks for helping me

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.