epstein added and nyan cat updated
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package dev.tggamesyt.szar.client;
|
||||
|
||||
import dev.tggamesyt.szar.EpsteinEntity;
|
||||
import dev.tggamesyt.szar.NaziEntity;
|
||||
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||
import net.minecraft.client.render.entity.MobEntityRenderer;
|
||||
import net.minecraft.client.render.entity.feature.HeldItemFeatureRenderer;
|
||||
import net.minecraft.client.render.entity.model.EntityModelLayers;
|
||||
import net.minecraft.client.render.entity.model.PlayerEntityModel;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
public class EpsteinEntityRenderer
|
||||
extends MobEntityRenderer<EpsteinEntity, PlayerEntityModel<EpsteinEntity>> {
|
||||
|
||||
public EpsteinEntityRenderer(EntityRendererFactory.Context context) {
|
||||
super(
|
||||
context,
|
||||
new PlayerEntityModel<>(context.getPart(EntityModelLayers.PLAYER), false),
|
||||
0.5F
|
||||
);
|
||||
|
||||
this.addFeature(new HeldItemFeatureRenderer<>(
|
||||
this,
|
||||
context.getHeldItemRenderer()
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Identifier getTexture(EpsteinEntity entity) {
|
||||
return new Identifier("szar", "textures/entity/epstein.png");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import net.minecraft.client.option.KeyBinding;
|
||||
import net.minecraft.client.render.entity.FlyingItemEntityRenderer;
|
||||
import net.minecraft.client.render.entity.animation.Animation;
|
||||
import net.minecraft.client.render.entity.model.EntityModelLayer;
|
||||
import net.minecraft.client.sound.EntityTrackingSoundInstance;
|
||||
import net.minecraft.client.sound.PositionedSoundInstance;
|
||||
import net.minecraft.client.sound.SoundInstance;
|
||||
import net.minecraft.client.sound.SoundManager;
|
||||
@@ -31,6 +32,7 @@ import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.Box;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.random.Random;
|
||||
|
||||
import java.util.*;
|
||||
@@ -52,69 +54,67 @@ public class SzarClient implements ClientModInitializer {
|
||||
"main"
|
||||
);
|
||||
// Outside of your tick handler
|
||||
private final Map<NyanEntity, PositionedSoundInstance> activeSounds = new HashMap<>();
|
||||
private final Map<NyanEntity, EntityTrackingSoundInstance> activeSounds = new HashMap<>();
|
||||
private static final SoundEvent NYAN_LOOP = SoundEvent.of(new Identifier("szar", "nyan_cat_loop"));
|
||||
private static final SoundEvent NYAN_START = SoundEvent.of(new Identifier("szar", "nyan_cat_first_loop"));
|
||||
int startOffset = 10; // first tick when start sound plays
|
||||
int startLength = 39; // length of one start sound
|
||||
int loopLength = 542; // ticks per loop
|
||||
int startOffset = 10;
|
||||
int startLength = 596;
|
||||
int loopLength = 541;
|
||||
int loopStart = startOffset + startLength;
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
ClientTickEvents.END_CLIENT_TICK.register(client -> {
|
||||
if (client.world == null) return;
|
||||
|
||||
SoundManager soundManager = client.getSoundManager();
|
||||
Box box = new Box(client.player.getX()-128, client.player.getY()-128, client.player.getZ()-128,
|
||||
client.player.getX()+128, client.player.getY()+128, client.player.getZ()+128);
|
||||
|
||||
Box box = new Box(
|
||||
client.player.getX() - 128, client.player.getY() - 128, client.player.getZ() - 128,
|
||||
client.player.getX() + 128, client.player.getY() + 128, client.player.getZ() + 128
|
||||
);
|
||||
|
||||
for (NyanEntity nyan : client.world.getEntitiesByClass(NyanEntity.class, box, e -> true)) {
|
||||
// Skip dead ones (just in case)
|
||||
if (!nyan.isAlive()) continue;
|
||||
|
||||
int age = nyan.age;
|
||||
|
||||
// Play first start
|
||||
if (age == 10) {
|
||||
PositionedSoundInstance start1 = PositionedSoundInstance.ambient(
|
||||
NYAN_START, Random.create(),
|
||||
nyan.getX(), nyan.getY(), nyan.getZ()
|
||||
// ---- PLAY START ONCE ----
|
||||
if (age >= startOffset && !activeSounds.containsKey(nyan)) {
|
||||
EntityTrackingSoundInstance startSound = new EntityTrackingSoundInstance(
|
||||
NYAN_START,
|
||||
SoundCategory.NEUTRAL,
|
||||
1.0f,
|
||||
1.0f,
|
||||
nyan,
|
||||
nyan.getId() // seed can be entity ID for stable pitch
|
||||
);
|
||||
client.getSoundManager().play(start1);
|
||||
activeSounds.put(nyan, start1);
|
||||
client.getSoundManager().play(startSound);
|
||||
activeSounds.put(nyan, startSound);
|
||||
}
|
||||
|
||||
// Play second start
|
||||
if (age == 49) {
|
||||
PositionedSoundInstance start2 = PositionedSoundInstance.ambient(
|
||||
NYAN_START, Random.create(),
|
||||
nyan.getX(), nyan.getY(), nyan.getZ()
|
||||
// ---- LOOP AFTER START FINISHES ----
|
||||
if (age >= loopStart && (age - loopStart) % loopLength == 0) {
|
||||
EntityTrackingSoundInstance loopSound = new EntityTrackingSoundInstance(
|
||||
NYAN_LOOP,
|
||||
SoundCategory.NEUTRAL,
|
||||
1.0f,
|
||||
1.0f,
|
||||
nyan,
|
||||
nyan.getId() // seed
|
||||
);
|
||||
client.getSoundManager().play(start2);
|
||||
activeSounds.put(nyan, start2);
|
||||
}
|
||||
|
||||
// Play looping
|
||||
if (age >= 88 && (age - 88) % 542 == 0) {
|
||||
PositionedSoundInstance loop = PositionedSoundInstance.ambient(
|
||||
NYAN_LOOP, Random.create(),
|
||||
nyan.getX(), nyan.getY(), nyan.getZ()
|
||||
);
|
||||
client.getSoundManager().play(loop);
|
||||
activeSounds.put(nyan, loop);
|
||||
client.getSoundManager().play(loopSound);
|
||||
activeSounds.put(nyan, loopSound);
|
||||
}
|
||||
}
|
||||
Iterator<Map.Entry<NyanEntity, PositionedSoundInstance>> it = activeSounds.entrySet().iterator();
|
||||
|
||||
// Stop sounds for dead entities
|
||||
Iterator<Map.Entry<NyanEntity, EntityTrackingSoundInstance>> it = activeSounds.entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Map.Entry<NyanEntity, PositionedSoundInstance> entry = it.next();
|
||||
NyanEntity nyan = entry.getKey();
|
||||
if (!nyan.isAlive()) {
|
||||
client.getSoundManager().stop(entry.getValue()); // stop the sound immediately
|
||||
it.remove(); // remove from map
|
||||
Map.Entry<NyanEntity, EntityTrackingSoundInstance> entry = it.next();
|
||||
if (!entry.getKey().isAlive()) {
|
||||
client.getSoundManager().stop(entry.getValue());
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ClientPlayNetworking.registerGlobalReceiver(
|
||||
PLANE_ANIM_PACKET,
|
||||
(client, handler, buf, sender) -> {
|
||||
@@ -166,7 +166,10 @@ public class SzarClient implements ClientModInitializer {
|
||||
Szar.BULLET,
|
||||
ctx -> new FlyingItemEntityRenderer<>(ctx)
|
||||
);
|
||||
|
||||
EntityRendererRegistry.register(
|
||||
Szar.EpsteinEntityType,
|
||||
EpsteinEntityRenderer::new
|
||||
);
|
||||
|
||||
EntityRendererRegistry.register(
|
||||
Szar.PoliceEntityType,
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package dev.tggamesyt.szar.client;
|
||||
|
||||
import dev.tggamesyt.szar.ModItemTagProvider;
|
||||
import dev.tggamesyt.szar.ModPoiTagProvider;
|
||||
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint;
|
||||
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
|
||||
import net.minecraft.registry.RegistryWrapper;
|
||||
|
||||
public class SzarDataGenerator implements DataGeneratorEntrypoint {
|
||||
|
||||
@@ -11,5 +13,6 @@ public class SzarDataGenerator implements DataGeneratorEntrypoint {
|
||||
FabricDataGenerator.Pack pack = fabricDataGenerator.createPack();
|
||||
|
||||
pack.addProvider(ModPoiTagProvider::new);
|
||||
pack.addProvider(ModItemTagProvider::new);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"szar:pop_tart"
|
||||
]
|
||||
}
|
||||
103
src/main/java/dev/tggamesyt/szar/EpsteinEntity.java
Normal file
103
src/main/java/dev/tggamesyt/szar/EpsteinEntity.java
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
28
src/main/java/dev/tggamesyt/szar/ModItemTagProvider.java
Normal file
28
src/main/java/dev/tggamesyt/szar/ModItemTagProvider.java
Normal 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);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"),
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "szar:item/epstein_files"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "minecraft:item/template_spawn_egg"
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
BIN
src/main/resources/assets/szar/sounds/nyan_cat.ogg
Normal file
BIN
src/main/resources/assets/szar/sounds/nyan_cat.ogg
Normal file
Binary file not shown.
BIN
src/main/resources/assets/szar/sounds/nyan_cat_start.ogg
Normal file
BIN
src/main/resources/assets/szar/sounds/nyan_cat_start.ogg
Normal file
Binary file not shown.
BIN
src/main/resources/assets/szar/sounds/nyan_music.ogg
Normal file
BIN
src/main/resources/assets/szar/sounds/nyan_music.ogg
Normal file
Binary file not shown.
BIN
src/main/resources/assets/szar/textures/entity/epstein.png
Normal file
BIN
src/main/resources/assets/szar/textures/entity/epstein.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/main/resources/assets/szar/textures/item/epstein_files.png
Normal file
BIN
src/main/resources/assets/szar/textures/item/epstein_files.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
33
src/main/resources/data/szar/recipes/ak47.json
Normal file
33
src/main/resources/data/szar/recipes/ak47.json
Normal 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"
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user