-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ac0a96
commit 0ae4d64
Showing
14 changed files
with
140 additions
and
15 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
src/main/generated/.cache/89b86ab0e66f527166d98df92ddbcf5416ed58f6
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
// 1.19.2 2024-05-02T22:02:14.9304597 Language | ||
60fc1c17293eabeb679d8e91fb8244d3101fa2ec assets\the_origin_of_magic\lang\en_us.json | ||
// 1.19.2 2024-05-03T18:41:12.8419321 Language | ||
535557102a8725b94cf9f1e64baafcab703c53a0 assets\the_origin_of_magic\lang\en_us.json |
2 changes: 1 addition & 1 deletion
2
src/main/generated/.cache/dc1d6e7286e7569a79007c10f809d49635ea1c49
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
// 1.19.2 2024-05-02T22:02:14.9420947 Block Loot Tables | ||
// 1.19.2 2024-05-03T18:41:12.8434661 Block Loot Tables | ||
fe57f13449a11436bbede8c37e01bd0d1cd87191 data\the_origin_of_magic\loot_tables\blocks\magic_workbench.json |
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
6 changes: 6 additions & 0 deletions
6
src/main/generated/assets/the_origin_of_magic/models/item/magic_bubble.json
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,6 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "the_origin_of_magic:item/magic_bubble" | ||
} | ||
} |
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
14 changes: 14 additions & 0 deletions
14
src/main/java/com/ictye/the_origin_of_magic/Contents/AllParticle.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 |
---|---|---|
@@ -1,11 +1,25 @@ | ||
package com.ictye.the_origin_of_magic.Contents; | ||
|
||
import com.ictye.the_origin_of_magic.the_origin_of_magic; | ||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry; | ||
import net.fabricmc.fabric.api.particle.v1.FabricParticleTypes; | ||
import net.minecraft.client.particle.FlameParticle; | ||
import net.minecraft.particle.DefaultParticleType; | ||
|
||
public class AllParticle { | ||
public static final DefaultParticleType MAGIC_BULLET_PARTICLE = (DefaultParticleType) the_origin_of_magic.MOD_REGISTRATE.particleBuilder( | ||
"magic_bullet_particle", | ||
FabricParticleTypes.simple()); | ||
|
||
public static final DefaultParticleType MAGIC_BUBBLE_PARTICLE = (DefaultParticleType) the_origin_of_magic.MOD_REGISTRATE.particleBuilder( | ||
"magic_bubble_particle", | ||
FabricParticleTypes.simple()); | ||
|
||
@Environment(value= EnvType.CLIENT) | ||
public static void register() { | ||
ParticleFactoryRegistry.getInstance().register(AllParticle.MAGIC_BUBBLE_PARTICLE, FlameParticle.Factory::new); | ||
ParticleFactoryRegistry.getInstance().register(AllParticle.MAGIC_BULLET_PARTICLE, FlameParticle.Factory::new); | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
...in/java/com/ictye/the_origin_of_magic/foundation/Entitys/Magics/StdMagic/MagicBubble.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,61 @@ | ||
package com.ictye.the_origin_of_magic.foundation.Entitys.Magics.StdMagic; | ||
|
||
import com.ictye.the_origin_of_magic.Contents.AllParticle; | ||
import com.ictye.the_origin_of_magic.foundation.Entitys.Magics.MagicInterfaces.StdMagic.StdThrownMagic; | ||
import net.minecraft.entity.EntityType; | ||
import net.minecraft.entity.LivingEntity; | ||
import net.minecraft.entity.damage.DamageSource; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.item.Items; | ||
import net.minecraft.util.hit.EntityHitResult; | ||
import net.minecraft.world.World; | ||
|
||
public class MagicBubble extends StdThrownMagic { | ||
public MagicBubble(EntityType<? extends StdThrownMagic> entityType, World world) { | ||
super(entityType, world); | ||
} | ||
|
||
public MagicBubble(EntityType<? extends StdThrownMagic> type, double x, double y, double z, World world) { | ||
super(type, x, y, z, world); | ||
} | ||
|
||
public MagicBubble(EntityType<? extends StdThrownMagic> type, LivingEntity owner, World world) { | ||
super(type, owner, world); | ||
} | ||
|
||
@Override | ||
public void tick() { | ||
world.addParticle(AllParticle.MAGIC_BUBBLE_PARTICLE, this.getX(), this.getY(), this.getZ(), 0, 0, 0); | ||
super.tick(); | ||
} | ||
|
||
@Override | ||
protected float getGravity() { | ||
return 0.005f; | ||
} | ||
|
||
@Override | ||
public float getMagicRate() { | ||
return 3; | ||
} | ||
|
||
@Override | ||
protected void onEntityHit(EntityHitResult entityHitResult) { | ||
if(prdRandom!=null){ | ||
prdRandom.setSP((float) (prdRandom.getP() + 0.5)); | ||
if(prdRandom.getBool()){ | ||
entityHitResult.getEntity().damage(DamageSource.thrownProjectile(this, this.getOwner()), 7); | ||
}else { | ||
entityHitResult.getEntity().damage(DamageSource.thrownProjectile(this, this.getOwner()), 4); | ||
} | ||
}else { | ||
entityHitResult.getEntity().damage(DamageSource.thrownProjectile(this, this.getOwner()), 4); | ||
} | ||
super.onEntityHit(entityHitResult); | ||
} | ||
|
||
@Override | ||
public ItemStack getStack() { | ||
return new ItemStack(Items.AIR); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...n/java/com/ictye/the_origin_of_magic/foundation/Items/Magic/StdMagic/MagicBubbleItem.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,22 @@ | ||
package com.ictye.the_origin_of_magic.foundation.Items.Magic.StdMagic; | ||
|
||
import com.ictye.the_origin_of_magic.Contents.AllEntity; | ||
import com.ictye.the_origin_of_magic.foundation.Entitys.Magics.MagicInterfaces.StdMagic.StdThrownMagic; | ||
import com.ictye.the_origin_of_magic.foundation.Entitys.Magics.MagicInterfaces.StdMagicInterface; | ||
import com.ictye.the_origin_of_magic.foundation.Entitys.Magics.StdMagic.MagicBubble; | ||
import com.ictye.the_origin_of_magic.foundation.Items.Magic.Interface.StdMagicItem; | ||
import net.minecraft.entity.EntityType; | ||
import net.minecraft.entity.player.PlayerEntity; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.world.World; | ||
|
||
public class MagicBubbleItem extends StdMagicItem { | ||
public MagicBubbleItem(Settings settings, EntityType<StdThrownMagic> entityType) { | ||
super(settings, entityType); | ||
} | ||
|
||
@Override | ||
public StdMagicInterface getMagic(PlayerEntity user, World world, ItemStack stack) { | ||
return new MagicBubble(AllEntity.MAGIC_BUBBLE_ENTITY_TYPE,user, world); | ||
} | ||
} |
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
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/the_origin_of_magic/particles/magic_bubble_particle.json
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,5 @@ | ||
{ | ||
"textures": [ | ||
"the_origin_of_magic:magic_bubble_particle" | ||
] | ||
} |
Binary file added
BIN
+258 Bytes
src/main/resources/assets/the_origin_of_magic/textures/item/magic_bubble.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+253 Bytes
...esources/assets/the_origin_of_magic/textures/particle/magic_bubble_particle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.