epstein added and nyan cat updated

This commit is contained in:
2026-02-08 15:07:09 +01:00
parent 3af26761c9
commit 6033bc4701
24 changed files with 431 additions and 86 deletions

View File

@@ -1,2 +1,2 @@
// 1.20.1 2026-01-26T11:11:39.1328713 szar/Tags for minecraft:point_of_interest_type
// 1.20.1 2026-02-08T13:35:45.6214131 szar/Tags for minecraft:point_of_interest_type
eba137b51c50a7143a3668876f41adaa1447b1d1 data\minecraft\tags\point_of_interest_type\acquirable_job_site.json

View File

@@ -0,0 +1,2 @@
// 1.20.1 2026-02-08T13:35:45.6204179 szar/Tags for minecraft:item
6995bcff12c66325bf8878f8f536d542b4b8776e data\minecraft\tags\items\music_discs.json

View File

@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"szar:pop_tart"
]
}

View File

@@ -0,0 +1,103 @@
package dev.tggamesyt.szar;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.ai.goal.Goal;
import net.minecraft.entity.ai.goal.LookAroundGoal;
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.entity.passive.VillagerEntity;
import net.minecraft.world.World;
import java.util.EnumSet;
import java.util.List;
public class EpsteinEntity extends PathAwareEntity implements Arrestable {
public static boolean arrestable = true;
public EpsteinEntity(EntityType<? extends PathAwareEntity> type, World world) {
super(type, world);
}
@Override
protected void initGoals() {
this.goalSelector.add(0, new MeleeAttackGoal(this, 1.2D, true));
this.goalSelector.add(2, new WanderAroundFarGoal(this, 1.0D));
this.goalSelector.add(3, new LookAroundGoal(this));
this.targetSelector.add(1, new AttackNearbyBabiesGoal(this));
}
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, 4.0);
}
@Override
protected void dropLoot(DamageSource source, boolean causedByPlayer) {
this.dropItem(Szar.EPSTEIN_FILES);
}
@Override
public boolean isArrestable() {
return arrestable;
}
// Custom goal class
static class AttackNearbyBabiesGoal extends Goal {
private final PathAwareEntity mob;
private LivingEntity target;
public AttackNearbyBabiesGoal(PathAwareEntity mob) {
this.mob = mob;
this.setControls(EnumSet.of(Control.TARGET));
}
@Override
public boolean canStart() {
List<LivingEntity> entities = mob.getWorld().getEntitiesByClass(
LivingEntity.class,
mob.getBoundingBox().expand(8.0D), // 8-block radius
e -> (e.isBaby()) && !e.isDead() && e.isAlive()
);
if (!entities.isEmpty()) {
target = entities.get(0); // pick the first one
return true;
}
return false;
}
@Override
public void start() {
if (target != null) {
mob.getNavigation().startMovingTo(target, 1.2D);
}
}
@Override
public void tick() {
if (target != null && target.isAlive()) {
mob.getLookControl().lookAt(target);
mob.getNavigation().startMovingTo(target, 1.2D);
// Attack if in range
if (mob.squaredDistanceTo(target) <= 2.0D) {
mob.tryAttack(target);
}
}
}
@Override
public boolean shouldContinue() {
return target != null && target.isAlive();
}
}
}

View File

@@ -0,0 +1,28 @@
package dev.tggamesyt.szar;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
import net.minecraft.data.DataOutput;
import net.minecraft.data.server.tag.TagProvider;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.tag.ItemTags;
import net.minecraft.registry.tag.PointOfInterestTypeTags;
import net.minecraft.util.Identifier;
import net.minecraft.world.poi.PointOfInterestType;
import java.util.concurrent.CompletableFuture;
public class ModItemTagProvider extends FabricTagProvider.ItemTagProvider {
public ModItemTagProvider(FabricDataOutput output,
CompletableFuture<RegistryWrapper.WrapperLookup> completableFuture) {
super(output, completableFuture);
}
@Override
protected void configure(RegistryWrapper.WrapperLookup lookup) {
getOrCreateTagBuilder(ItemTags.MUSIC_DISCS).add(Szar.POPTART);
}
}

View File

@@ -6,6 +6,7 @@ import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.tag.ItemTags;
import net.minecraft.registry.tag.PointOfInterestTypeTags;
import net.minecraft.util.Identifier;
import net.minecraft.world.poi.PointOfInterestType;

View File

@@ -45,19 +45,30 @@ public class NaziEntity extends PathAwareEntity implements Arrestable{
@Override
protected void dropLoot(DamageSource source, boolean causedByPlayer) {
ItemStack book = new ItemStack(Items.WRITTEN_BOOK);
var rand = this.getRandom();
if (rand.nextFloat() < 0.01F) {
this.dropItem(Szar.AK47);
}
if (rand.nextFloat() < 0.01F) {
ItemStack book = new ItemStack(Items.WRITTEN_BOOK);
NbtCompound nbt = book.getOrCreateNbt();
nbt.putString("title", "Nazi's message");
nbt.putString("author", "Nazi");
NbtCompound nbt = book.getOrCreateNbt();
nbt.putString("title", "Nazi's message");
nbt.putString("author", "Nazi");
// Pages need to be JSON text components
NbtList pages = new NbtList();
pages.add(NbtString.of("{\"text\":\"Hail Hitler\"}"));
// Pages need to be JSON text components
NbtList pages = new NbtList();
pages.add(NbtString.of("{\"text\":\"Hail Hitler\"}"));
nbt.put("pages", pages);
nbt.put("pages", pages);
this.dropStack(book);
this.dropStack(book);
}
int count = rand.nextInt(17);
if (count > 0) {
this.dropStack(new ItemStack(Szar.AK_AMMO, count));
}
}
@Override

View File

@@ -1,6 +1,7 @@
package dev.tggamesyt.szar;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.SpawnReason;
import net.minecraft.entity.ai.goal.LookAroundGoal;
import net.minecraft.entity.ai.goal.MeleeAttackGoal;
import net.minecraft.entity.ai.goal.WanderAroundFarGoal;
@@ -13,6 +14,7 @@ import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvent;
import net.minecraft.util.Identifier;
import net.minecraft.world.World;
import net.minecraft.world.WorldAccess;
public class NyanEntity extends PathAwareEntity {
@@ -33,6 +35,49 @@ public class NyanEntity extends PathAwareEntity {
.add(EntityAttributes.GENERIC_MOVEMENT_SPEED, 0.25)
.add(EntityAttributes.GENERIC_ATTACK_DAMAGE, 2);
}
@Override
public boolean canSpawn(WorldAccess world, SpawnReason spawnReason) {
// Only above ground
boolean aboveGround = this.getY() >= world.getBottomY() + 1 && this.getY() <= world.getTopY();
// Only allow 5% of spawn attempts to succeed
boolean rareChance = this.random.nextFloat() < 0.05f;
// Standard mob spawn rules + above ground + rare chance
return super.canSpawn(world, spawnReason) && aboveGround && rareChance;
}
@Override
public boolean damage(DamageSource source, float amount) {
boolean result = super.damage(source, amount);
if (result) {
// Trigger panic
this.setPanic(200); // panic for 100 ticks (5 seconds)
}
return result;
}
private int panicTicks = 0;
private void setPanic(int ticks) {
this.panicTicks = ticks;
}
@Override
public void tick() {
super.tick();
if (panicTicks > 0) {
panicTicks--;
// Move in a random direction away from attacker
double speed = 1.5D;
double dx = (this.random.nextDouble() - 0.5) * 2;
double dz = (this.random.nextDouble() - 0.5) * 2;
this.getNavigation().startMovingTo(this.getX() + dx * 5, this.getY(), this.getZ() + dz * 5, speed);
}
}
@Override

View File

@@ -129,6 +129,15 @@ public class Szar implements ModInitializer {
.dimensions(EntityDimensions.fixed(0.6F, 1.8F)) // player-sized
.build()
);
public static final EntityType<EpsteinEntity> EpsteinEntityType =
Registry.register(
Registries.ENTITY_TYPE,
new Identifier(MOD_ID, "epstein"),
FabricEntityTypeBuilder
.create(SpawnGroup.CREATURE, EpsteinEntity::new)
.dimensions(EntityDimensions.fixed(0.6F, 1.8F)) // player-sized
.build()
);
public static final EntityType<HitterEntity> HitterEntityType =
Registry.register(
Registries.ENTITY_TYPE,
@@ -220,6 +229,8 @@ public class Szar implements ModInitializer {
entries.add(Szar.AK47);
entries.add(Szar.POPTART);
entries.add(Szar.NYAN_SPAWNEGG);
entries.add(Szar.EPSTEIN_FILES);
entries.add(Szar.EPSTEIN_SPAWNEGG);
})
.build()
);
@@ -370,6 +381,10 @@ public class Szar implements ModInitializer {
NiggerEntityType,
NiggerEntity.createAttributes()
);
FabricDefaultAttributeRegistry.register(
EpsteinEntityType,
NiggerEntity.createAttributes()
);
FabricDefaultAttributeRegistry.register(
NyanEntityType,
NyanEntity.createAttributes()
@@ -410,9 +425,9 @@ public class Szar implements ModInitializer {
),
SpawnGroup.MONSTER,
TERRORIST_ENTITY_TYPE,
20, // weight (lower = rarer)
10, // weight (lower = rarer)
1, // min group size
1 // max group size
2 // max group size
);
BiomeModifications.addSpawn(
BiomeSelectors.includeByKey(
@@ -422,30 +437,37 @@ public class Szar implements ModInitializer {
),
SpawnGroup.MONSTER,
NiggerEntityType,
20, // weight (lower = rarer)
5, // weight (lower = rarer)
1, // min group size
2 // max group size
);
// 1. Allow entity A to spawn naturally in your biomes
BiomeModifications.addSpawn(
BiomeSelectors.includeByKey(BiomeKeys.FOREST, BiomeKeys.FLOWER_FOREST),
BiomeSelectors.includeByKey(BiomeKeys.WINDSWEPT_HILLS, BiomeKeys.WINDSWEPT_GRAVELLY_HILLS, BiomeKeys.STONY_PEAKS),
SpawnGroup.MONSTER,
HitterEntityType,
5, 1, 1
1, 1, 1
);
BiomeModifications.addSpawn(
BiomeSelectors.includeByKey(
BiomeKeys.JUNGLE,
BiomeKeys.BAMBOO_JUNGLE,
BiomeKeys.SPARSE_JUNGLE
),
BiomeSelectors.includeByKey(BiomeKeys.JUNGLE, BiomeKeys.BAMBOO_JUNGLE, BiomeKeys.SPARSE_JUNGLE),
SpawnGroup.MONSTER,
GYPSY_ENTITY_TYPE,
20, // weight (lower = rarer)
1, // min group size
5 // max group size
5, 1, 5
);
BiomeModifications.addSpawn(
BiomeSelectors.includeByKey(BiomeKeys.FOREST, BiomeKeys.FLOWER_FOREST),
SpawnGroup.AMBIENT,
NyanEntityType,
1, 1, 1
);
BiomeModifications.addSpawn(
BiomeSelectors.includeByKey(BiomeKeys.FOREST, BiomeKeys.FLOWER_FOREST),
SpawnGroup.MONSTER,
EpsteinEntityType,
1, 1, 1
);
BiomeModifications.addFeature(
BiomeSelectors.tag(BiomeTags.IS_JUNGLE),
@@ -563,6 +585,11 @@ public class Szar implements ModInitializer {
new Identifier(MOD_ID, "police_key"),
new KeyItem(new Item.Settings())
);
public static final Item EPSTEIN_FILES = Registry.register(
Registries.ITEM,
new Identifier(MOD_ID, "epstein_files"),
new Item(new Item.Settings())
);
public static final Item HANDCUFF_ITEM = Registry.register(
Registries.ITEM,
new Identifier(MOD_ID, "police_handcuff"),
@@ -684,14 +711,16 @@ public class Szar implements ModInitializer {
new Identifier(MOD_ID, "fasz"),
new FaszItem(FASZ_BLOCK, new Item.Settings())
);
public static final SoundEvent NYAN_MUSIC =
SoundEvent.of(new Identifier("szar", "nyan_music"));
public static final Item POPTART = Registry.register(
Registries.ITEM,
new Identifier(MOD_ID, "pop_tart"),
new Item(new Item.Settings()
new MusicDiscItem(13, NYAN_MUSIC, new Item.Settings()
.food(new FoodComponent.Builder()
.saturationModifier(0.6f).
hunger((Math.random() < 0.5) ? 6 : 7) // SIX OR SEVEN
.build()))
.build()), 217)
);
public static final Item NWORD_PASS = Registry.register(
Registries.ITEM,
@@ -748,6 +777,16 @@ public class Szar implements ModInitializer {
new Item.Settings()
)
);
public static final Item EPSTEIN_SPAWNEGG = Registry.register(
Registries.ITEM,
new Identifier(MOD_ID, "epstein_spawn_egg"),
new SpawnEggItem(
EpsteinEntityType,
0xB47459,
0x151D2D,
new Item.Settings()
)
);
public static final Item GYPSY_SPAWNEGG = Registry.register(
Registries.ITEM,
new Identifier(MOD_ID, "gypsy_spawn_egg"),

View File

@@ -47,5 +47,11 @@
"item.szar.pop_tart": "Pop Tart",
"entity.szar.nyan_cat": "Nyan Cat",
"item.szar.nyan_cat_spawn_egg": "Nyan Cat Spawn Egg"
"item.szar.nyan_cat_spawn_egg": "Nyan Cat Spawn Egg",
"item.szar.pop_tart.desc": "daniwellP - Nyanyanyanyanyanyanya!",
"szar.nyan_cat_performs": "Nyan Cat Performs",
"szar.nyan_cat_start": "Nyan Cat Starts Performing",
"item.szar.epstein_files": "Epstein Files",
"entity.szar.epstein": "Epstein",
"item.szar.epstein_spawn_egg": "Epstein Spawn Egg"
}

View File

@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "szar:item/epstein_files"
}
}

View File

@@ -0,0 +1,3 @@
{
"parent": "minecraft:item/template_spawn_egg"
}

View File

@@ -1,5 +1,6 @@
{
"nyan_cat_first_loop": {
"nyan_cat_first_loop_old": {
"subtitle": "szar.nyan_cat_start",
"sounds": [
{
"name": "szar:nyan_cat_first_loop",
@@ -7,12 +8,39 @@
}
]
},
"nyan_cat_loop": {
"nyan_cat_loop_old": {
"subtitle": "szar.nyan_cat_performs",
"sounds": [
{
"name": "szar:nyan_cat_loop",
"stream": true
}
]
},
"nyan_cat_first_loop": {
"subtitle": "szar.nyan_cat_start",
"sounds": [
{
"name": "szar:nyan_cat_start",
"stream": true
}
]
},
"nyan_cat_loop": {
"subtitle": "szar.nyan_cat_performs",
"sounds": [
{
"name": "szar:nyan_cat",
"stream": true
}
]
},
"nyan_music": {
"sounds": [
{
"name": "szar:nyan_music",
"stream": true
}
]
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -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"
}
}

View File

@@ -1,20 +1,14 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" M ",
" B ",
"B B"
],
"key": {
"M": {
"item": "minecraft:milk_bucket"
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "minecraft:gunpowder"
},
"B": {
"item": "minecraft:beef"
{
"item": "minecraft:iron_nugget"
}
},
],
"result": {
"item": "szar:bullet",
"count": 1
"item": "szar:bullet"
}
}
}