Search the Community
Showing results for tags 'weapons'.
-
Hi! I’m looking to commission a custom Minecraft mod for version 1.19.2 on Forge. I want to have a balanced Copper tools and armor mod that snugly fits the copper tier between the Stone/ Chainmail and Iron Tiers. Here are the stats I have planned: - Copper Helmet: 2 Armor Points, 121 Durability - Copper Chestplate: 5 Armor Points, 2 Armor Toughness, 177 Durability - Copper Leggings: 4 Armor Points, 2 Armor Toughness, 165 Durability - Copper Boots: 2 Armor Points, 143 Durability - Copper Tools: Same Efficiency, but 0.5 less damage than Iron Tier, and 181 Durability for each tool. I only want to add the basic tools such as a sword, pickaxe, axe, shovel, and hoe. Please let me know of any balancing changes you would make and where I could go right now to commission such a mod.
-
I made a basic homing arrow, which I am going to refine further, but as of now I have the problem of the Arrow not rendering properly. It works fine on the server side, but on the client it always appears as if the arrow was flying normally, until it synchs and teleports around. [https://gemoo.com/tools/upload-video/share/661346070437036032?codeId=MpmzxaW0pBpE1&card=661346066800603136&origin=videolinkgenerator] the white particles are created by the entity every tick on the server side and represent its actual flying path. My best guess is that this behaviour is caused, because minecraft appears to try to predict the projectiles path on the client side instead of constantly synching (perhaps something to do with it implementing the TracableEntity interface??). I am thinking I need help with either 1. Getting the client to use my custom Tick function in its path prediction, or 2. (the less elegant solution) getting the game to synch up the direction, position and movement etc. every tick. Note that my custom arrow class extends AbstractArrow. everything important it does: private static final EntityDataAccessor<Integer> TARGET_ENTITY = SynchedEntityData.defineId(ReachArrow.class, EntityDataSerializers.INT); @Override public void addAdditionalSaveData(CompoundTag pCompound) { super.addAdditionalSaveData(pCompound); pCompound.putInt("TargetEntity", this.getTargetEntity()); } @Override public void readAdditionalSaveData(CompoundTag pCompound) { super.readAdditionalSaveData(pCompound); this.setTargetEntity(pCompound.getInt("TargetEntity")); } @Override protected void defineSynchedData() { super.defineSynchedData(); this.entityData.define(TARGET_ENTITY, -1); } @Override public void shootFromRotation(Entity pShooter, float pX, float pY, float pZ, float pVelocity, float pInaccuracy) { LivingEntity target = ReachArrow.findNearestTarget(this.level(),(LivingEntity) pShooter,50d); if(pShooter instanceof LivingEntity && target !=null){ //pShooter.sendSystemMessage(Component.literal("setting id "+target.getId()+" as target")); setTargetEntity(target.getId()); //pShooter.sendSystemMessage(Component.literal("target set")); } super.shootFromRotation(pShooter, pX, pY, pZ, pVelocity, pInaccuracy); } public static LivingEntity findNearestTarget(Level world, LivingEntity shooter, double range) { AABB searchBox = shooter.getBoundingBox().inflate(range); List<LivingEntity> potentialTargets = world.getEntitiesOfClass(LivingEntity.class, searchBox, EntitySelector.NO_SPECTATORS); LivingEntity nearestTarget = null; double closestDistance = Double.MAX_VALUE; for (LivingEntity potentialTarget : potentialTargets) { if (potentialTarget != shooter && potentialTarget.isAlive()) { double distance = shooter.distanceToSqr(potentialTarget); if (distance < closestDistance) { closestDistance = distance; nearestTarget = potentialTarget; } } } return nearestTarget; } I tried fixing the problem by storing the Target using SynchedEntityData, which not only didn't fix the problem, but also added unwanted, blue particles to the arrow (like on tipped arrow) Thank you in advance for any help or hints, I am quite new at this so you could probably help me a lot. :)
-
(Note: I am reiterating what I said in my previous post to reach a broader amount of people and hopefully find a solution quicker). I have been trying to add a weapon to the game though I am finding it difficult as the code I have followed from the tutorial uses a recipe, among other things. I am not wanting to use these as I want the weapon to be found in structures. public static final Tier DAMAGED_WAR_AXE = TierSortingRegistry.registerTier( new ForgeTier(1, 175, 5f, 4.0F, 1.5F, ModTags.Blocks.NEEDS_X_TOOL, () -> Ingredient.of(ModItems.X.get())), new ResourceLocation(DroidsAncientRelics.MOD_ID, "x"), List.of(Tiers.X), List.of()); This is what the code looks like, I have used X's to replace what may/may not be needed or what is yet to be used. I am looking for some advice or/and fixed code.
-
I am wanting to add an axe to my mod though I do not want it to have a recipe, the reason for this being that I want you to only be able to find it in a structure. I have looked on both here and elsewhere on the internet and have found nothing... How would this be done? (Video for reference.)
-
this little sword like bar i dont know how is called i need to get the value of how much full it is i made some code to increase the horizontal range of mi melee weapons so you don't have to precisely left click on the mob but just close enough to damage it increasing the hitbox of mobs when i attack like 1.5 grow but it has a trouble mi code works regardless of the sword state so you can smacks as fast as your finger allows kinda old minecrafts style i dont want that i want it to work in synchrony whit the sword behave-our in this video i need like 3 hits to kill a zombie whit the vanilla iron sword mi steel sword does the same damage than iron but if i fast click i can damage the zombie like 8 times in the same amount of time the sword only swing like two times to fix this i want to check the state of that sword-like bar way may code only hits if the bar its over 50% or something // ########## ########## ########## ########## @Override public boolean onEntitySwing(ItemStack stack, LivingEntity le) { //System.out.println("onEntitySwing"); if( swordlikebar > 50% ) { searchAndDamageSurroundingEntities(); } return false; }
-
Topic for making tags
-
- 1.10.2
- 1.11.2
-
(and 81 more)
Tagged with:
- 1.10.2
- 1.11.2
- 1.12.2
- 1.13.2
- 1.14.4
- 1.15.2
- 1.16.5
- 1.17.1
- 1.18.2
- 1.19.0
- 1.19.1
- 1.19.2
- 1.19.3
- 1.19.4
- 1.2.5
- 1.20.0
- 1.3.2
- 1.4.7
- 1.5.2
- 1.6.4
- 1.7.10
- 1.8.9
- 1.9.4
- armour
- bad jvm args
- biomes
- blocks
- broken mod
- bug
- capabilities
- client
- client-only mods on server
- codecs
- commands
- dimensions
- effects
- enchantments
- entities
- events
- feature request
- fluids
- food
- gradle
- groovy
- guis
- ide
- installer
- items
- java
- kotlin
- launcher
- libraries
- loot
- metadata
- missing jar association
- missing java
- missing mods
- mixin
- needs more info
- networking
- news
- optifine
- ores
- out of memory
- outdated drivers
- particles
- performance
- porting
- potions
- recipes
- registries
- rendering
- scala
- server
- solved
- sounds
- textures
- tools
- tutorial
- weapons
- worldgen
- wrong java version
- wrong mod version
-
Hello, I am trying to make a spear item that can be thrown like a trident. Everything works except while the spear is in your hand, it appears as regular item and not a model like the trident. How would I fix this? (I am coding in 1.19.4)