diff --git a/capes.json b/capes.json index 1bdc0db..ab43601 100644 --- a/capes.json +++ b/capes.json @@ -2,23 +2,23 @@ "capes": [ { "id": "tg", - "texture": "https://raw.githubusercontent.com/tggamesyt/szar/main/src/main/resources/assets/szar/textures/etc/tg_cape.png" + "texture": "Magyarhttps://gitea.tggamesyt.dev/tggamesyt/szar/raw/main/src/main/resources/assets/szar/textures/etc/tg_cape.png" }, { "id": "gabri", - "texture": "https://raw.githubusercontent.com/tggamesyt/szar/main/src/main/resources/assets/szar/textures/etc/gabri_cape.png" + "texture": "Magyarhttps://gitea.tggamesyt.dev/tggamesyt/szar/raw/main/src/main/resources/assets/szar/textures/etc/gabri_cape.png" }, { "id": "tg1", - "texture": "https://raw.githubusercontent.com/tggamesyt/szar/main/src/main/resources/assets/szar/textures/etc/tg_cape1.png" + "texture": "Magyarhttps://gitea.tggamesyt.dev/tggamesyt/szar/raw/main/src/main/resources/assets/szar/textures/etc/tg_cape1.png" }, { "id": "test", - "texture": "https://raw.githubusercontent.com/tggamesyt/szar/main/src/main/resources/assets/szar/textures/etc/testcape.png" + "texture": "Magyarhttps://gitea.tggamesyt.dev/tggamesyt/szar/raw/main/src/main/resources/assets/szar/textures/etc/testcape.png" }, { "id": "ciber", - "texture": "https://raw.githubusercontent.com/tggamesyt/szar/main/src/main/resources/assets/szar/textures/etc/ciber_cape.png" + "texture": "Magyarhttps://gitea.tggamesyt.dev/tggamesyt/szar/raw/main/src/main/resources/assets/szar/textures/etc/ciber_cape.png" } ] } \ No newline at end of file diff --git a/src/client/java/dev/tggamesyt/szar/client/MagyarEntityRenderer.java b/src/client/java/dev/tggamesyt/szar/client/MagyarEntityRenderer.java new file mode 100644 index 0000000..916957b --- /dev/null +++ b/src/client/java/dev/tggamesyt/szar/client/MagyarEntityRenderer.java @@ -0,0 +1,26 @@ +package dev.tggamesyt.szar.client; + +import dev.tggamesyt.szar.OrbanEntity; +import net.minecraft.client.render.entity.EntityRendererFactory; +import net.minecraft.client.render.entity.MobEntityRenderer; +import net.minecraft.client.render.entity.model.BipedEntityModel; +import net.minecraft.client.render.entity.model.EntityModelLayers; +import net.minecraft.util.Identifier; + +public class OrbanEntityRenderer + extends MobEntityRenderer> { + + public OrbanEntityRenderer(EntityRendererFactory.Context context) { + super( + context, + new BipedEntityModel<>(context.getPart(EntityModelLayers.PLAYER)), + 0.5F + ); + } + + @Override + public Identifier getTexture(OrbanEntity entity) { + return new Identifier("szar", "textures/entity/orban.png"); + } +} + diff --git a/src/main/java/dev/tggamesyt/szar/MagyarEntity.java b/src/main/java/dev/tggamesyt/szar/MagyarEntity.java new file mode 100644 index 0000000..a2a9b10 --- /dev/null +++ b/src/main/java/dev/tggamesyt/szar/MagyarEntity.java @@ -0,0 +1,67 @@ +package dev.tggamesyt.szar; + +import net.minecraft.entity.EntityData; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.SpawnReason; +import net.minecraft.entity.ai.goal.MeleeAttackGoal; +import net.minecraft.entity.ai.goal.WanderAroundFarGoal; +import net.minecraft.entity.attribute.DefaultAttributeContainer; +import net.minecraft.entity.attribute.EntityAttributes; +import net.minecraft.entity.damage.DamageSource; +import net.minecraft.entity.mob.MobEntity; +import net.minecraft.entity.mob.PathAwareEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.nbt.NbtCompound; +import net.minecraft.nbt.NbtList; +import net.minecraft.nbt.NbtString; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.world.LocalDifficulty; +import net.minecraft.world.ServerWorldAccess; +import net.minecraft.world.World; +import org.jetbrains.annotations.Nullable; + +public class OrbanEntity extends PathAwareEntity implements Arrestable, HunPartie { + + public static boolean arrestable = false; + + public OrbanEntity(EntityType type, World world) { + super(type, world); + } + + @Override + protected void initGoals() { + this.goalSelector.add(2, new FollowLeaderWanderGoal(this, 1.0D, 6.0F)); + this.goalSelector.add(3, new WanderAroundFarGoal(this, 0.8D)); + this.goalSelector.add(1, new MeleeAttackGoal(this, 1.0, true)); + + this.targetSelector.add(1, new AggroOnHitRevengeGoal(this)); + this.targetSelector.add(2, new AttackEnemyHunGoal(this, "fidesz")); + } + + + public static DefaultAttributeContainer.Builder createAttributes() { + return MobEntity.createMobAttributes() + .add(EntityAttributes.GENERIC_MAX_HEALTH, 20.0) + .add(EntityAttributes.GENERIC_MOVEMENT_SPEED, 0.25) + .add(EntityAttributes.GENERIC_ATTACK_DAMAGE, 2); + } + + @Override + protected void dropLoot(DamageSource source, boolean causedByPlayer) { + var rand = this.getRandom(); + if (rand.nextFloat() < 0.01F) { + this.dropItem(Szar.HUN_DISC); + } + } + + @Override + public boolean isArrestable() { + return arrestable; + } + + @Override + public String getTeam() { + return "fidesz"; + } +} diff --git a/src/main/resources/assets/szar/models/item/magyar_spawn_egg.json b/src/main/resources/assets/szar/models/item/magyar_spawn_egg.json new file mode 100644 index 0000000..ddd1559 --- /dev/null +++ b/src/main/resources/assets/szar/models/item/magyar_spawn_egg.json @@ -0,0 +1,3 @@ +{ + "parent": "minecraft:item/template_spawn_egg" +} diff --git a/src/main/resources/assets/szar/models/item/super_apple.json b/src/main/resources/assets/szar/models/item/super_apple.json new file mode 100644 index 0000000..f8ca665 --- /dev/null +++ b/src/main/resources/assets/szar/models/item/super_apple.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "szar:item/bullet" + } +} diff --git a/src/main/resources/assets/szar/models/item/super_diamond.json b/src/main/resources/assets/szar/models/item/super_diamond.json new file mode 100644 index 0000000..f8ca665 --- /dev/null +++ b/src/main/resources/assets/szar/models/item/super_diamond.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "szar:item/bullet" + } +} diff --git a/src/main/resources/assets/szar/textures/item/super_apple.png b/src/main/resources/assets/szar/textures/item/super_apple.png new file mode 100644 index 0000000..7126abe Binary files /dev/null and b/src/main/resources/assets/szar/textures/item/super_apple.png differ diff --git a/src/main/resources/data/szar/recipes/super_apple.json b/src/main/resources/data/szar/recipes/super_apple.json new file mode 100644 index 0000000..a303f12 --- /dev/null +++ b/src/main/resources/data/szar/recipes/super_apple.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "NEN", + "EDN", + "NEN" + ], + "key": { + "N": { + "item": "minecraft:netherite_ingot" + }, + "D": { + "item": "minecraft:diamond" + }, + "E": { + "item": "szar:ender_ingot" + } + }, + "result": { + "item": "szar:super_diamond", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/szar/recipes/super_diamond.json b/src/main/resources/data/szar/recipes/super_diamond.json new file mode 100644 index 0000000..b53f016 --- /dev/null +++ b/src/main/resources/data/szar/recipes/super_diamond.json @@ -0,0 +1,33 @@ +{ + "type": "minecraft:crafting_shaped", + "ingredients": [ + { + "item": "minecraft:gunpowder" + }, + { + "item": "minecraft:iron_nugget" + } + ], + "pattern": [ + "PPP", + "BBB", + "LRB" + ], + "key": { + "P": { + "tag": "minecraft:planks" + }, + "B": { + "item": "minecraft:iron_block" + }, + "L": { + "item": "minecraft:leather" + }, + "R": { + "item": "minecraft:redstone" + } + }, + "result": { + "item": "szar:ak47" + } +} \ No newline at end of file