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.

afiolmahon

Members
  • Joined

  • Last visited

  1. Thanks for the advice! I moved the block and item creation to load and everything is running smoothly.
  2. Moved config to PreInit, still getting crash. This is the main error I believe: java.lang.IllegalArgumentException: Slot 0 is already occupied by afiolmahon.altarcraft.BlockShimmeringStone@4ccca363 when adding afiolmahon.altarcraft.TileEntityAltarBlock@efadff9 Help is much appreciated
  3. I just Edited it into my original post, and I would Have done that except I am receiving the error The method getSuggestedConfigurationFile() is undefined for the type FMLInitializationEvent
  4. I just started setting up a config file so that the item and block IDs can be changed if they need to, but when running the code it just keeps crashing and I cant find any reason why. I think that the problem lies in the variable for the IDs Here is my main mod file Here is the Console Log
  5. Thanks, Those pages helped a bunch!
  6. I created a custom model for a block, and everything seems to be working well except I can't get the texture to load. I have tried looking at other forums for what people had done for mob entity textures and they didn't seem to work. Here is my code in the client proxy ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAltarBlockEntity.class, new TileEntityAltarBlockRenderer()); The renderer Block Itself Main Mod File
  7. I Recently started adding another item to my mod, which is based on the code for the egg, and when I wanted to apply my own texture to the projectile entity, I couldn't figure out how to do it. When I test this in game using the default egg code, no sprite shows up but the entity still exists, and I cant find a reference to the texture anywhere on the code. Any suggestions? Here is my code for the projectile entity that I want to apply a sprite to. package net.minecraft.entity.projectile; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.passive.EntityChicken; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; public class EntityEgg extends EntityThrowable { public EntityEgg(World par1World) { super(par1World); } public EntityEgg(World par1World, EntityLivingBase par2EntityLivingBase) { super(par1World, par2EntityLivingBase); } public EntityEgg(World par1World, double par2, double par4, double par6) { super(par1World, par2, par4, par6); } /** * Called when this EntityThrowable hits a block or entity. */ protected void onImpact(MovingObjectPosition par1MovingObjectPosition) { if (par1MovingObjectPosition.entityHit != null) { par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), 0.0F); } if (!this.worldObj.isRemote && this.rand.nextInt( == 0) { byte b0 = 1; if (this.rand.nextInt(32) == 0) { b0 = 4; } for (int i = 0; i < b0; ++i) { EntityChicken entitychicken = new EntityChicken(this.worldObj); entitychicken.setGrowingAge(-24000); entitychicken.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F); this.worldObj.spawnEntityInWorld(entitychicken); } } for (int j = 0; j < 8; ++j) { this.worldObj.spawnParticle("snowballpoof", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D); } if (!this.worldObj.isRemote) { this.setDead(); } } }

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.