Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Somonestolemyusername

Members
  • Posts

    70
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Somonestolemyusername's Achievements

Stone Miner

Stone Miner (3/8)

0

Reputation

  1. I keep getting this Error "The game crashed whilst initializing game Error: java.lang.RuntimeException: One of more entry values did not copy to the correct id. Check log for details! Exit Code: -1" full crash report ---- Minecraft Crash Report ---- WARNING: coremods are present: LucraftCoreCoreMod (LucraftCore-1.12.2-2.4.16 (1).jar) Contact their authors BEFORE contacting forge // Don't do that. Time: 7/31/21 12:43 PM Description: Initializing game java.lang.RuntimeException: One of more entry values did not copy to the correct id. Check log for details! at net.minecraftforge.registries.ForgeRegistry.sync(ForgeRegistry.java:549) at net.minecraftforge.registries.GameData.loadRegistry(GameData.java:596) at net.minecraftforge.registries.GameData.freezeData(GameData.java:249) at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:758) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:535) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:378) at net.minecraft.client.main.Main.main(SourceFile:123) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace: at net.minecraftforge.registries.ForgeRegistry.sync(ForgeRegistry.java:549) at net.minecraftforge.registries.GameData.loadRegistry(GameData.java:596) at net.minecraftforge.registries.GameData.freezeData(GameData.java:249) at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:758) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:535) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:378) at net.minecraft.client.main.Main.main(SourceFile:123) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_51, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 365736056 bytes (348 MB) / 872415232 bytes (832 MB) up to 2147483648 bytes (2048 MB) JVM Flags: 8 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.42 Powered by Forge 14.23.5.2854 13 mods loaded, 13 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored | State | ID | Version | Source | Signature | |:------ |:---------------- |:------------- |:--------------------------------------- |:---------------------------------------- | | LCHIJA | minecraft | 1.12.2 | minecraft.jar | None | | LCHIJA | mcp | 9.42 | minecraft.jar | None | | LCHIJA | FML | 8.0.99.99 | forge-1.12.2-14.23.5.2854.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 | | LCHIJA | forge | 14.23.5.2854 | forge-1.12.2-14.23.5.2854.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 | | LCHIJA | fullbright | 1.2 | 1.12-Fullbright-1.2.1.jar | None | | LCHIJA | jei | 4.15.0.293 | jei_1.12.2-4.15.0.293.jar | None | | LCHIJA | ebwizardry | 4.3.4 | ElectroblobsWizardry-4.3.4-MC1.12.2.jar | None | | LCHIJA | speedsterheroes | 1.12.2-2.2.1 | that.jar | None | | LCHIJA | lucraftcore | 1.12.2-2.4.16 | LucraftCore-1.12.2-2.4.16 (1).jar | None | | LCHIJA | heroesexpansion | 1.12.2-1.3.5 | HeroesExpansion-1.12.2-1.3.5_1.jar | None | | LCHIJA | star-tech | 1.1.1 | star-tech-1.1.1.jar | None | | LCHIJA | the-fifth-world | 0.5 | the-fifth-world-0.5.1_1.jar | None | | LCHIJA | trollhuntercraft | 2.0.0 | Trollhunter_Mod_2.0.1_Bugfixes.jar | None | Loaded coremods (and transformers): LucraftCoreCoreMod (LucraftCore-1.12.2-2.4.16 (1).jar) lucraft.mods.lucraftcore.core.LCTransformer GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 441.37' Renderer: 'GeForce GTX 1660 Ti/PCIe/SSE2' Launched Version: 1.12.2-forge-14.23.5.2854 LWJGL: 2.9.4 OpenGL: GeForce GTX 1660 Ti/PCIe/SSE2 GL version 4.6.0 NVIDIA 441.37, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: Current Language: English (US) Profiler Position: N/A (disabled) CPU: 12x Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  2. I made a stormbreaker with blockbench and added it to my mod. I codded all the stuff but, I don't know how to make it shoot lightning to where the player is looking when a specific button such as I is pressed, and I don't know how to add animations to throw stormbreaker and make it come back and also make stormbreaker be shooted. and for the shooting it also should use a custom key such as x.
  3. I have something like that here is the similar code I wrote package com.vicken.mod3.items; import com.vicken.mod3.util.RegistryHandler; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.enchantment.Enchantments; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.projectile.AbstractArrowEntity; import net.minecraft.item.ArrowItem; import net.minecraft.item.BowItem; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.stats.Stats; import net.minecraft.tags.ItemTags; import net.minecraft.util.SoundCategory; import net.minecraft.util.SoundEvents; import net.minecraft.world.World; import java.util.function.Predicate; public class ModBow extends BowItem { public ModBow(Properties builder) { super(builder); } public void onPlayerStoppedUsing(ItemStack bowStack, World worldIn, LivingEntity entityLiving, int timeLeft) { if (entityLiving instanceof PlayerEntity) { PlayerEntity playerentity = (PlayerEntity)entityLiving; boolean hasInfinity = playerentity.abilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantments.INFINITY, bowStack) > 0; ItemStack ammoStack = playerentity.findAmmo(bowStack); int timeDrawn = this.getUseDuration(bowStack) - timeLeft; timeDrawn = net.minecraftforge.event.ForgeEventFactory.onArrowLoose(bowStack, worldIn, playerentity, timeDrawn, !ammoStack.isEmpty() || hasInfinity); if (timeDrawn < 0) return; if (!ammoStack.isEmpty() || hasInfinity) { boolean isTippedArrow = ammoStack.getItem() == RegistryHandler.BULLET.get() || ammoStack.getItem() == RegistryHandler.BULLET.get(); if (ammoStack.isEmpty()) { ammoStack = new ItemStack(RegistryHandler.BULLET.get()); } float velocity = getArrowVelocity(timeDrawn); if (!((double)velocity < 100.1D)) { if (!worldIn.isRemote) { AbstractArrowEntity arrowEntity = createArrow(worldIn, ammoStack, playerentity); arrowEntity.shoot(playerentity, playerentity.rotationPitch, playerentity.rotationYaw, 0.0F, velocity * 100.0F, 0.0F); if (velocity == 1000.0F) arrowEntity.setIsCritical(true); double damage = getArrowDamage(bowStack, arrowEntity); arrowEntity.setDamage(damage); int knockback = getArrowKnockback(bowStack, arrowEntity); arrowEntity.setKnockbackStrength(knockback); // apply flame enchant if (EnchantmentHelper.getEnchantmentLevel(Enchantments.FLAME, bowStack) > 0) { arrowEntity.setFire(100); } // reduce bow durability bowStack.damageItem(1, playerentity, (p_220009_1_) -> { p_220009_1_.sendBreakAnimation(playerentity.getActiveHand()); }); // set if arrow can be picked up from ground if (hasInfinity && !isTippedArrow) { arrowEntity.pickupStatus = AbstractArrowEntity.PickupStatus.DISALLOWED; } // actually make the arrow entity exist in the world worldIn.addEntity(arrowEntity); } // sound worldIn.playSound((PlayerEntity)null, playerentity.getPosX(), playerentity.getPosY(), playerentity.getPosZ(), SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.PLAYERS, 1.0F, 1.0F / (random.nextFloat() * 0.4F + 1.2F) + velocity * 100.5F); // use an arrow boolean shouldConsumeArrow = !hasInfinity || isTippedArrow; if (shouldConsumeArrow) { ammoStack.shrink(1); if (ammoStack.isEmpty()) { playerentity.inventory.deleteStack(ammoStack); } } playerentity.addStat(Stats.ITEM_USED.get(this)); } } } } // override to use a custom arrow entity protected AbstractArrowEntity createArrow(World worldIn, ItemStack ammoStack, PlayerEntity playerentity) { ArrowItem arrowitem = (ArrowItem)(ammoStack.getItem() instanceof ArrowItem ? ammoStack.getItem() : RegistryHandler.BULLET.get()); return arrowitem.createArrow(worldIn, ammoStack, playerentity); } protected double getArrowDamage(ItemStack bowStack, AbstractArrowEntity arrowEntity) { int powerLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.POWER, bowStack); if (powerLevel > 0) return arrowEntity.getDamage() + (double)powerLevel * 100.5D + 0.5D; else return arrowEntity.getDamage(); } protected int getArrowKnockback(ItemStack bowStack, AbstractArrowEntity arrowEntity) { return EnchantmentHelper.getEnchantmentLevel(Enchantments.PUNCH, bowStack); } // Override to change what it uses as ammo public Predicate<ItemStack> getInventoryAmmoPredicate() { return (ammoStack) -> { return ammoStack.getItem() == RegistryHandler.BULLET.get(); }; } @Override public Predicate<ItemStack> getAmmoPredicate() { return (ammoStack) -> { return ammoStack.getItem() == RegistryHandler.BULLET.get(); }; } public static float getArrowVelocity(int charge) { float f = (float)charge / 100.0F; f = (f * f + f * 100.0F) / 100.0F; if (f > 100.0F) { f = 100.0F; } return f; } } but for some reason its not shooting the bullets
  4. all i has in it is package com.vicken.mod3.entities.projectiles; import com.vicken.mod3.util.RegistryHandler; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.WallTorchBlock; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.projectile.ArrowEntity; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.potion.EffectInstance; import net.minecraft.potion.Effects; import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.World; public class Ak47ArrowEntity extends ArrowEntity { public Ak47ArrowEntity(World worldIn, LivingEntity shooter) { super(worldIn, shooter); RegistryHandler.BULLET.get(); } @Override protected void arrowHit(LivingEntity living) { super.arrowHit(living); living.setFire(15); } }
  5. ok can u help write the code? i started learning to mod a few weeks ago all i know is items armors block recipes and other stuff. also I already have a projectile class named Ak47ArrowEntity
  6. but if I use the snowball class it will be like im shooting snowballs not bullets. you know mr crayfishes gun mod? i want my gun to be somewhat like that also i figured out how to connect my registered object to the class
  7. oh I thought i just needed onUsingTick. also I looked over your code and I don't want my Gun/Bow shooting bullets like a snowball I want it to actually shoot like a real ak47 as i said before
  8. I tried using the onUsingTick but it made my game crashed even when i reduced the tick to 1
  9. here is the code for the gun i made and registered public static final RegistryObject<Item> AK47 = ITEMS.register("ak47", () -> new Ak47(new Item.Properties().group(ModItemGroup.instance).maxDamage(10000))); Ak47 class: package com.vicken.mod3.items; import com.vicken.mod3.entities.projectiles.Ak47ArrowEntity; import com.vicken.mod3.util.RegistryHandler; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.enchantment.Enchantments; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.projectile.AbstractArrowEntity; import net.minecraft.entity.projectile.ArrowEntity; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.world.World; import java.util.function.Predicate; public class Ak47 extends ModBow { public Ak47(Properties builder) { super(builder); } @Override protected AbstractArrowEntity createArrow(World worldIn, ItemStack ammoStack, PlayerEntity playerentity) { return new Ak47ArrowEntity(worldIn, playerentity); } @Override protected double getArrowDamage(ItemStack bowStack, AbstractArrowEntity arrowEntity) { int powerLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.POWER, bowStack); return (double)powerLevel * 100.5D + 100.5D; } @Override public Predicate<ItemStack> getInventoryAmmoPredicate() { return (ammoStack) -> { return ammoStack.getItem() == RegistryHandler.BULLET.get(); }; } } modBow class: package com.vicken.mod3.items; import com.vicken.mod3.util.RegistryHandler; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.enchantment.Enchantments; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.projectile.AbstractArrowEntity; import net.minecraft.item.ArrowItem; import net.minecraft.item.BowItem; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.stats.Stats; import net.minecraft.tags.ItemTags; import net.minecraft.util.SoundCategory; import net.minecraft.util.SoundEvents; import net.minecraft.world.World; import java.util.function.Predicate; public class ModBow extends BowItem { public ModBow(Properties builder) { super(builder); } public void onPlayerStoppedUsing(ItemStack bowStack, World worldIn, LivingEntity entityLiving, int timeLeft) { if (entityLiving instanceof PlayerEntity) { PlayerEntity playerentity = (PlayerEntity)entityLiving; boolean hasInfinity = playerentity.abilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantments.INFINITY, bowStack) > 0; ItemStack ammoStack = playerentity.findAmmo(bowStack); int timeDrawn = this.getUseDuration(bowStack) - timeLeft; timeDrawn = net.minecraftforge.event.ForgeEventFactory.onArrowLoose(bowStack, worldIn, playerentity, timeDrawn, !ammoStack.isEmpty() || hasInfinity); if (timeDrawn < 0) return; if (!ammoStack.isEmpty() || hasInfinity) { boolean isTippedArrow = ammoStack.getItem() == RegistryHandler.BULLET.get() || ammoStack.getItem() == RegistryHandler.BULLET.get(); if (ammoStack.isEmpty()) { ammoStack = new ItemStack(RegistryHandler.BULLET.get()); } float velocity = getArrowVelocity(timeDrawn); if (!((double)velocity < 100.1D)) { if (!worldIn.isRemote) { AbstractArrowEntity arrowEntity = createArrow(worldIn, ammoStack, playerentity); arrowEntity.shoot(playerentity, playerentity.rotationPitch, playerentity.rotationYaw, 0.0F, velocity * 100.0F, 1.0F); if (velocity == 1.0F) arrowEntity.setIsCritical(true); double damage = getArrowDamage(bowStack, arrowEntity); arrowEntity.setDamage(damage); int knockback = getArrowKnockback(bowStack, arrowEntity); arrowEntity.setKnockbackStrength(knockback); // apply flame enchant if (EnchantmentHelper.getEnchantmentLevel(Enchantments.FLAME, bowStack) > 0) { arrowEntity.setFire(100); } // reduce bow durability bowStack.damageItem(1, playerentity, (p_220009_1_) -> { p_220009_1_.sendBreakAnimation(playerentity.getActiveHand()); }); // set if arrow can be picked up from ground if (hasInfinity && !isTippedArrow) { arrowEntity.pickupStatus = AbstractArrowEntity.PickupStatus.DISALLOWED; } // actually make the arrow entity exist in the world worldIn.addEntity(arrowEntity); } // sound worldIn.playSound((PlayerEntity)null, playerentity.getPosX(), playerentity.getPosY(), playerentity.getPosZ(), SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.PLAYERS, 1.0F, 1.0F / (random.nextFloat() * 0.4F + 1.2F) + velocity * 100.5F); // use an arrow boolean shouldConsumeArrow = !hasInfinity || isTippedArrow; if (shouldConsumeArrow) { ammoStack.shrink(1); if (ammoStack.isEmpty()) { playerentity.inventory.deleteStack(ammoStack); } } playerentity.addStat(Stats.ITEM_USED.get(this)); } } } } // override to use a custom arrow entity protected AbstractArrowEntity createArrow(World worldIn, ItemStack ammoStack, PlayerEntity playerentity) { ArrowItem arrowitem = (ArrowItem)(ammoStack.getItem() instanceof ArrowItem ? ammoStack.getItem() : RegistryHandler.BULLET.get()); return arrowitem.createArrow(worldIn, ammoStack, playerentity); } protected double getArrowDamage(ItemStack bowStack, AbstractArrowEntity arrowEntity) { int powerLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.POWER, bowStack); if (powerLevel > 0) return arrowEntity.getDamage() + (double)powerLevel * 100.5D + 0.5D; else return arrowEntity.getDamage(); } protected int getArrowKnockback(ItemStack bowStack, AbstractArrowEntity arrowEntity) { return EnchantmentHelper.getEnchantmentLevel(Enchantments.PUNCH, bowStack); } // Override to change what it uses as ammo public Predicate<ItemStack> getInventoryAmmoPredicate() { return (ammoStack) -> { return ammoStack.getItem().isIn(ItemTags.ARROWS); }; } public static float getArrowVelocity(int charge) { float f = (float)charge / 100.0F; f = (f * f + f * 100.0F) / 100.0F; if (f > 100.0F) { f = 100.0F; } return f; } } but for some reason the bullet is not shooting and also idk how to make it shoot constantly so i don't have to wait for it to load like a real bow and so it can shoot like a real ak47 does
  10. I want to add my custom bow class because it makes it so that the ammo is bullets, and the speed of the throwing is velocity 100 and that it shoots constantly and not like a real bow but like a ak47 I was able to do this with mcreator but i cant seem to do it with java.
  11. I did that but I'm saying I made a separate mod class for it and I want to take the properties from there and put it into the bow while registering.
  12. hi. I am trying to make a custom gun/bow I got the properties ready but idk how to connect it to the object in the registry handler. can someone help?
  13. thx it worked, also my pickaxe texture isint working and the item texture for the armor
  14. Hello? noone has helped me for the last 20 hours and i think that other person stole my code
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.