-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loot table now allows for enchanted items Storm status effect will now only spawn lightning if distance to player is more than 5 blocks. Storm radius increased by 5 blocks in all directions to compensate Rapier speed amplifier reduced to 1 from 3 The Watcher has had its attack speed reduced by .1 Brimstone Claymore has had its attack range increased
- Loading branch information
Showing
9 changed files
with
81 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
src/main/java/net/sweenus/simplyswords/item/custom/SafeLightning.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package net.sweenus.simplyswords.item.custom; | ||
|
||
import net.minecraft.entity.Entity; | ||
import net.minecraft.entity.EntityType; | ||
import net.minecraft.entity.LightningEntity; | ||
import net.minecraft.entity.damage.DamageSource; | ||
import net.minecraft.nbt.NbtCompound; | ||
import net.minecraft.network.Packet; | ||
import net.minecraft.server.world.ServerWorld; | ||
import net.minecraft.text.Text; | ||
import net.minecraft.world.World; | ||
import net.sweenus.simplyswords.item.ModItems; | ||
|
||
public class SafeLightning extends Entity { | ||
|
||
public SafeLightning(EntityType<?> type, World world) { | ||
super(type, world); | ||
} | ||
|
||
@Override | ||
protected void initDataTracker() { | ||
|
||
} | ||
|
||
@Override | ||
protected void readCustomDataFromNbt(NbtCompound nbt) { | ||
|
||
} | ||
|
||
@Override | ||
protected void writeCustomDataToNbt(NbtCompound nbt) { | ||
|
||
} | ||
|
||
@Override | ||
public void onStruckByLightning(ServerWorld world, LightningEntity lightning) { | ||
/*this.setFireTicks(this.fireTicks + 1); | ||
if (this.fireTicks == 0) { | ||
this.setOnFireFor(8); | ||
}*/ | ||
|
||
var equips = getItemsEquipped(); | ||
if (equips == ModItems.STORMS_EDGE) { | ||
this.damage(DamageSource.LIGHTNING_BOLT, 0.0F); | ||
this.sendMessage(Text.translatable("message.simplyswords.testlightning")); | ||
} | ||
} | ||
|
||
@Override | ||
public Packet<?> createSpawnPacket() { | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters