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.

gurujive

Forge Modder
  • Joined

  • Last visited

Everything posted by gurujive

  1. I have an entity that has a main class similar to entity throwable, I have adjust the eye height that it gets (which I shouldn't have to when not specifying onImpact of PlayerEntity) + 0.2000000149011612D instead of - 0.10000000149011612D which entitythrowable has. I have also changed the getGravityVelocity to 0.0 Main Class: Entity that extends main class: previously this worked without having to adjust eye height level. specifying the player such as: Not too certain if this is a bug or not, so I figured I'd post it here. When I right click, potion effects are applied to my player even though it is spawned in above his head and onImpact EntityPlayer is not specified. When I hold shift and right click the entity is spawned in and no potion effects are applied. It just sits there in the air then goes to setdead. edit: ....this has got to be either a bug or something being worked on or something.... as this does not work: if (result.entityHit instanceof !EntityPlayer) { i = 0; ((!EntityPlayer)result.entityHit).addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 200, 1)); ((!EntityPlayer)result.entityHit).addPotionEffect(new PotionEffect(MobEffects.INSTANT_HEALTH, 10, 3)); ((!EntityPlayer)result.entityHit).addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 200, 5)); ((!EntityPlayer)result.entityHit).addPotionEffect(new PotionEffect(MobEffects.JUMP_BOOST, 200, 7)); ((!EntityPlayer)result.entityHit).addPotionEffect(new PotionEffect(MobEffects.SPEED, 200, 2)); }
  2. This is what I needed to know: private static final ResourceLocation entitySphere = new ResourceLocation(Reference.MOD_ID, "EntitySphere"); public static void registerEntities() { EntityRegistry.registerModEntity(entitySphere, EntitySphere.class, entitySphere.toString(), id++, Exampled.getInstance(), 128, 214, true); } I was so friggin' close.... that rsrcl thing really screwed me up though. 5 days - non stop. >.< lmao... laughing at myself now.
  3. Absolutely beautiful. Works like a charm. Thank you so much man, I've been at this for 5 days straight pretty much turned my brain into moosh.... Now, I need to look at why and how. edit: ....man, thanks, now I can breathe.
  4. Ok, I saw what I did wrong there and corrected it, now when thrown they go off in a random direction still but show up in the command console: package guru.tbe; import net.minecraft.client.resources.Language; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.common.registry.EntityRegistry; import net.minecraftforge.fml.common.registry.GameRegistry; import guru.tbe.entity.EntityAetherOrb; import guru.tbe.entity.EntityAetherOrb2; import guru.tbe.entity.EntityAirOrb; import guru.tbe.entity.EntityCreativeOrb; import guru.tbe.entity.EntityEarthOrb; import guru.tbe.entity.EntityFireOrb; import guru.tbe.entity.EntityInvisibleOrb; import guru.tbe.entity.EntityLeapingFireOrb; import guru.tbe.entity.EntityNetherOrb; import guru.tbe.entity.EntityWaterOrb; import guru.tbe.init.GuruEntities; import guru.tbe.init.GuruItems; import guru.tbe.proxy.CommonProxy; @Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.MOD_VERSION) public class Guru { @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS) public static CommonProxy proxy; @Instance(Reference.MOD_ID) private static Guru instance; private static int id = 0; @EventHandler public void preInit(FMLPreInitializationEvent event) { ModCreativeTabs.load(); proxy.preInit(); GuruItems.init(); GuruItems.register(); initRecipes(); } @EventHandler public void init(FMLInitializationEvent event) { ResourceLocation resourceLocation = new ResourceLocation(Reference.MOD_ID, "aether_orb"); EntityRegistry.registerModEntity(resourceLocation, EntityAetherOrb.class, resourceLocation.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation1 = new ResourceLocation(Reference.MOD_ID, "aether_orb2"); EntityRegistry.registerModEntity(resourceLocation1, EntityAetherOrb2.class, resourceLocation1.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation2 = new ResourceLocation(Reference.MOD_ID, "air_orb"); EntityRegistry.registerModEntity(resourceLocation2, EntityAirOrb.class, resourceLocation2.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation3 = new ResourceLocation(Reference.MOD_ID, "creative_orb"); EntityRegistry.registerModEntity(resourceLocation3, EntityCreativeOrb.class, resourceLocation3.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation4 = new ResourceLocation(Reference.MOD_ID, "earth_orb"); EntityRegistry.registerModEntity(resourceLocation4, EntityEarthOrb.class, resourceLocation4.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation5 = new ResourceLocation(Reference.MOD_ID, "fire_orb"); EntityRegistry.registerModEntity(resourceLocation5, EntityFireOrb.class, resourceLocation5.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation6 = new ResourceLocation(Reference.MOD_ID, "invisible_orb"); EntityRegistry.registerModEntity(resourceLocation6, EntityInvisibleOrb.class, resourceLocation6.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation7 = new ResourceLocation(Reference.MOD_ID, "leaping_fire_orb"); EntityRegistry.registerModEntity(resourceLocation7, EntityLeapingFireOrb.class, resourceLocation7.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation8 = new ResourceLocation(Reference.MOD_ID, "nether_orb"); EntityRegistry.registerModEntity(resourceLocation8, EntityNetherOrb.class, resourceLocation8.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation9 = new ResourceLocation(Reference.MOD_ID, "water_orb"); EntityRegistry.registerModEntity(resourceLocation9, EntityWaterOrb.class, resourceLocation9.toString(), id++, Guru.instance, 128, 214, true); proxy.registerRenders(); proxy.registerKeybindings(); NetworkRegistry.INSTANCE.registerGuiHandler(getInstance(), proxy); } public static void initRecipes() { GameRegistry.addRecipe(new ItemStack(GuruItems.AIR_ORB), new Object[] {" X ", "X X", " X ", 'X', Items.FEATHER}); GameRegistry.addRecipe(new ItemStack(GuruItems.WATER_ORB), new Object[] {" X ", "X X", " X ", 'X', Items.WATER_BUCKET}); GameRegistry.addRecipe(new ItemStack(GuruItems.EARTH_ORB), new Object[] {" X ", "X X", " X ", 'X', Item.getItemFromBlock(Blocks.DIRT)}); GameRegistry.addRecipe(new ItemStack(GuruItems.FIRE_ORB), new Object[] {" X ", "X X", " X ", 'X', Items.LAVA_BUCKET}); GameRegistry.addRecipe(new ItemStack(GuruItems.NETHER_ORB), new Object[] {" X ", "X X", " X ", 'X', Item.getItemFromBlock(Blocks.OBSIDIAN)}); GameRegistry.addRecipe(new ItemStack(GuruItems.AETHER_ORB), new Object[] {" X ", "X X", " X ", 'X', Item.getItemFromBlock(Blocks.GLOWSTONE)}); } public static Guru getInstance() { return instance; } }
  5. I can see the orbs in game, they render differently with summon having different effects. When right clicked they throw off into a random direction. I don't know if I'm doing something wrong here, but I don't necessarily believe I am, I would like to know if I am doing something wrong. package guru.tbe; import net.minecraft.client.resources.Language; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.common.registry.EntityRegistry; import net.minecraftforge.fml.common.registry.GameRegistry; import guru.tbe.entity.EntityAetherOrb; import guru.tbe.entity.EntityAetherOrb2; import guru.tbe.entity.EntityAirOrb; import guru.tbe.entity.EntityCreativeOrb; import guru.tbe.entity.EntityEarthOrb; import guru.tbe.entity.EntityFireOrb; import guru.tbe.entity.EntityInvisibleOrb; import guru.tbe.entity.EntityLeapingFireOrb; import guru.tbe.entity.EntityNetherOrb; import guru.tbe.entity.EntityWaterOrb; import guru.tbe.init.GuruEntities; import guru.tbe.init.GuruItems; import guru.tbe.proxy.CommonProxy; @Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.MOD_VERSION) public class Guru { @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS) public static CommonProxy proxy; @Instance(Reference.MOD_ID) private static Guru instance; private static int id = 0; @EventHandler public void preInit(FMLPreInitializationEvent event) { ModCreativeTabs.load(); proxy.preInit(); GuruItems.init(); GuruItems.register(); initRecipes(); } @EventHandler public void init(FMLInitializationEvent event) { ResourceLocation resourceLocation = new ResourceLocation(Reference.MOD_ID, "aether_orb"); EntityRegistry.registerModEntity(resourceLocation, EntityAetherOrb.class, resourceLocation.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation1 = new ResourceLocation(Reference.MOD_ID, "aether_orb2"); EntityRegistry.registerModEntity(resourceLocation1, EntityAetherOrb2.class, resourceLocation1.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation2 = new ResourceLocation(Reference.MOD_ID, "air_orb"); EntityRegistry.registerModEntity(resourceLocation2, EntityAirOrb.class, resourceLocation2.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation3 = new ResourceLocation(Reference.MOD_ID, "creative_orb"); EntityRegistry.registerModEntity(resourceLocation2, EntityCreativeOrb.class, resourceLocation3.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation4 = new ResourceLocation(Reference.MOD_ID, "earth_orb"); EntityRegistry.registerModEntity(resourceLocation2, EntityEarthOrb.class, resourceLocation4.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation5 = new ResourceLocation(Reference.MOD_ID, "fire_orb"); EntityRegistry.registerModEntity(resourceLocation5, EntityFireOrb.class, resourceLocation5.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation6 = new ResourceLocation(Reference.MOD_ID, "invisible_orb"); EntityRegistry.registerModEntity(resourceLocation5, EntityInvisibleOrb.class, resourceLocation6.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation7 = new ResourceLocation(Reference.MOD_ID, "leaping_fire_orb"); EntityRegistry.registerModEntity(resourceLocation5, EntityLeapingFireOrb.class, resourceLocation7.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation8 = new ResourceLocation(Reference.MOD_ID, "nether_orb"); EntityRegistry.registerModEntity(resourceLocation5, EntityNetherOrb.class, resourceLocation7.toString(), id++, Guru.instance, 128, 214, true); ResourceLocation resourceLocation9 = new ResourceLocation(Reference.MOD_ID, "water_orb"); EntityRegistry.registerModEntity(resourceLocation5, EntityWaterOrb.class, resourceLocation9.toString(), id++, Guru.instance, 128, 214, true); proxy.registerRenders(); proxy.registerKeybindings(); NetworkRegistry.INSTANCE.registerGuiHandler(getInstance(), proxy); } public static void initRecipes() { GameRegistry.addRecipe(new ItemStack(GuruItems.AIR_ORB), new Object[] {" X ", "X X", " X ", 'X', Items.FEATHER}); GameRegistry.addRecipe(new ItemStack(GuruItems.WATER_ORB), new Object[] {" X ", "X X", " X ", 'X', Items.WATER_BUCKET}); GameRegistry.addRecipe(new ItemStack(GuruItems.EARTH_ORB), new Object[] {" X ", "X X", " X ", 'X', Item.getItemFromBlock(Blocks.DIRT)}); GameRegistry.addRecipe(new ItemStack(GuruItems.FIRE_ORB), new Object[] {" X ", "X X", " X ", 'X', Items.LAVA_BUCKET}); GameRegistry.addRecipe(new ItemStack(GuruItems.NETHER_ORB), new Object[] {" X ", "X X", " X ", 'X', Item.getItemFromBlock(Blocks.OBSIDIAN)}); GameRegistry.addRecipe(new ItemStack(GuruItems.AETHER_ORB), new Object[] {" X ", "X X", " X ", 'X', Item.getItemFromBlock(Blocks.GLOWSTONE)}); } public static Guru getInstance() { return instance; } }
  6. And go learn basic programming. You're literally flailing about at random and don't know what anything does. yeah, that's the only support I've got from you short of being called several indignant names. So wtf ever dude.
  7. y'all are so easy to talk crap and provide no solution, I'm just hitting this from every angle I can.
  8. i need to just stop.... and step away. I know I'm totally messing up.... I just need to stop.
  9. DANNNNGGGG ITTTTTTTTT still getting crash man. public class ExampledEntities { private static int id = 0; public static void registerEntities(ResourceLocation rsrcl) { register(rsrcl, EntitySphere.class, "entity_sphere"); register(rsrcl, EntitySphere2.class, "entity_sphere2"); rsrcl = new ResourceLocation("entity_sphere"); rsrcl = new ResourceLocation("entity_sphere2"); } public static void register(ResourceLocation rsrcl, Class cls, String name) { // TODO Auto-generated method stub EntityRegistry.registerModEntity(rsrcl, cls, name, id++, Exampled.getInstance(), 128, 214, true); } }
  10. Dragons man... dragons...
  11. lol.. comas are underlined, what a trip this is... public class ExampledEntities { private static int id = 0; public static void registerEntities(ResourceLocation rsrcl) { register(rsrcl), EntitySphere.class, "entity_sphere"); register(rsrcl), EntitySphere2.class, "entity_sphere2"); } public static void register(ResourceLocation rsrcl, Class cls, String name) { // TODO Auto-generated method stub EntityRegistry.registerModEntity(rsrcl, cls, name, id++, Exampled.getInstance(), 128, 214, true); } }
  12. https://www.dropbox.com/s/1air23nqw5xjcke/renamemesrc.zip?dl=0
  13. sure thing.... I just got here without any errors.... but I get a crash like so. Main: entityclass: crash-log: I'll get that zip though. Ok.... maybe i need to rebuild forge or something... something wierds going on... >.> woops wrong log, Still drinkin' coffee. updated
  14. Look up the snowball there is a basic onImpact method there. entity.projectile.
  15. this is what I ended up with but obviously it is wrong because both rsrcl are underlined "rsrcl = new" package exampled.modinfo.init; import exampled.modinfo.Exampled; import exampled.modinfo.Reference; import exampled.modinfo.entity.EntityOrb; import exampled.modinfo.entity.EntitySphere; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.EntityRegistry; public class ExampledEntities { static int id = 0; public static void register(ResourceLocation rsrcl) { ResourceLocation rsrcl = new ResourceLocation(Reference.MOD_ID, "EntitySphere"); ResourceLocation rsrcl = new ResourceLocation(Reference.MOD_ID, "EntitySphere2"); } public static void registerEntities(ResourceLocation rsrcl) { // TODO Auto-generated method stub EntityRegistry.registerModEntity(rsrcl, EntitySphere.class, rsrcl.toString(), id++, Exampled.getInstance(), 128, 214, true); } } I'm so wrong... and I know it.
  16. I'm going to check it out again when I wake up. For now I'm going to catch some z's...
  17. Well.... I managed to register my stuff, problem is when I got done, all my spells were combined into one.... >.> So now I'm sitting here looking at this seeing if I can find some way to register 2 entities and not one... *sigh* for some reason its making me change rsrl to rsrl1.... I don't know *sigh* import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.EntityRegistry; public class ExampledEntities { private static ResourceLocation rscrl = new ResourceLocation(Reference.MOD_ID, "EntitySphere"); private static ResourceLocation rscrl1 = new ResourceLocation(Reference.MOD_ID, "EntitySphere2"); public static void registerEntities(ResourceLocation rsrcl) { // TODO Auto-generated method stub EntityRegistry.registerModEntity(rscrl, EntitySphere.class, rscrl.toString(), 0, Exampled.getInstance(), 128, 214, true); } public static void registerEntities1(ResourceLocation rsrcl1) { // TODO Auto-generated method stub EntityRegistry.registerModEntity(rscrl1, EntitySphere.class, rscrl1.toString(), 0, Exampled.getInstance(), 128, 214, true); } } *braces self for brutal agonizing ridiculously intense insult*
  18. You may be on to something man......... Really its just I have so much going on. Thanks, I can't believe I missed that.... wow.... where's that face palm photo at.... >.< .... geeeez what's wrong with me.... getchyurselftogetherman { public ActionResult<ItemStack> onItemRightClick(World itemStackIn, EntityPlayer worldIn, EnumHand playerIn) { ItemStack itemstack = worldIn.getHeldItem(playerIn); if (!worldIn.capabilities.isCreativeMode) { itemstack.func_190918_g(1); } itemStackIn.playSound((EntityPlayer)null, worldIn.posX, worldIn.posY, worldIn.posZ, SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); if (!itemStackIn.isRemote && !worldIn.isSneaking()) { if (!itemStackIn.isRemote) { EntityAirOrb entitythrowable = new EntityAirOrb(itemStackIn, worldIn); entitythrowable.setHeadingFromThrower(worldIn, worldIn.rotationPitch, worldIn.rotationYaw, 0.0F, 1.5F, 1.0F); itemStackIn.spawnEntityInWorld(entitythrowable); } } if (!itemStackIn.isRemote && worldIn.isSneaking()) { EntityAirOrb entitythrowable = new EntityAirOrb(itemStackIn, worldIn); entitythrowable.setHeadingFromThrower(worldIn, worldIn.rotationPitch, worldIn.rotationYaw, 0.0F, 1.5F, 1.0F); entitythrowable.addVelocity(0.0, 0.27, 0.0); itemStackIn.spawnEntityInWorld(entitythrowable); } worldIn.addStat(StatList.getObjectUseStats(this)); return new ActionResult(EnumActionResult.SUCCESS, itemstack); } }
  19. This one works: but I need this for my magic spells so when I hold shift and right click it lobs one in the air and comes back down and hits me: Its driving me insane!!!!!!!!! asdfhiowehf I did quite a bit of studying in the past year, sometimes it works, sometimes it doesn't to be honest... I just do what I can. I could be like Albert Einstein. Speaking of whom, I found two peter max posters sticking out of a dumpster taking out the trash today. Nearly mint condition, one of them the Albert Einstein apollo 11 #1 1969. I also saw a pair of wooden water skiis, they were in mint condition too so I grabbed them as well. I can't imagine who would leave 2 1000$ paper posters and a pair of awesome water skii's in a dumpster... but man, I'm so gladddd I have these posters I know I could never afford one. It was an awesome find. - glad I went to see what was inside the vague paper scrolls. edit: -so next summer I'll go water skiing too. which is super awesome, haven't done that before.
  20. For some reason I'm having an issue here with some && on my item here... Here's what I got goin' in 1.11, underlined where its in the red: Is there any idea as to what's going on here? In 1.10.2 this worked amazingly:
  21. lmfao, don't tell me you didn't laugh man. I worked hard on that.
  22. It was either 1.5.2 or 1.6.4 it was added to handle faulty textures in texture packs.

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.