diff --git a/gradle.properties b/gradle.properties index 4bf7966..ec9e37a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -# Done to increase the memory available to gradle. +# Done to increase the memory available to Gradle. org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://modmuss50.me/fabric.html @@ -6,7 +6,7 @@ minecraft_version=1.20.1 yarn_mappings=1.20.1+build.10 loader_version=0.18.3 # Mod Properties -mod_version=1.0.7 +mod_version=1.0.8 maven_group=dev.tggamesyt archives_base_name=szar # Dependencies diff --git a/src/client/java/dev/tggamesyt/szar/client/SzarClient.java b/src/client/java/dev/tggamesyt/szar/client/SzarClient.java index 6de9b0b..32572d4 100644 --- a/src/client/java/dev/tggamesyt/szar/client/SzarClient.java +++ b/src/client/java/dev/tggamesyt/szar/client/SzarClient.java @@ -41,11 +41,19 @@ public class SzarClient implements ClientModInitializer { Szar.NiggerEntityType, NiggerEntityRenderer::new ); + EntityRendererRegistry.register( + Szar.TERRORIST_ENTITY_TYPE, + TerroristEntityRenderer::new + ); EntityRendererRegistry.register( Szar.GYPSY_ENTITY_TYPE, GypsyEntityRenderer::new ); + BlockRenderLayerMap.INSTANCE.putBlock( + Szar.TALL_CANNABIS_BLOCK, + RenderLayer.getCutout() + ); BlockRenderLayerMap.INSTANCE.putBlock( Szar.CANNABIS_BLOCK, RenderLayer.getCutout() diff --git a/src/client/java/dev/tggamesyt/szar/client/TerroristEntityRenderer.java b/src/client/java/dev/tggamesyt/szar/client/TerroristEntityRenderer.java new file mode 100644 index 0000000..725f070 --- /dev/null +++ b/src/client/java/dev/tggamesyt/szar/client/TerroristEntityRenderer.java @@ -0,0 +1,28 @@ +package dev.tggamesyt.szar.client; + +import com.google.common.collect.ImmutableSortedMap; +import dev.tggamesyt.szar.GypsyEntity; +import dev.tggamesyt.szar.IslamTerrorist; +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 TerroristEntityRenderer + extends MobEntityRenderer> { + + public TerroristEntityRenderer(EntityRendererFactory.Context context) { + super( + context, + new BipedEntityModel<>(context.getPart(EntityModelLayers.PLAYER)), + 0.5F + ); + } + + @Override + public Identifier getTexture(IslamTerrorist entity) { + return new Identifier("szar", "textures/entity/islam_terrorist.png"); + } +} + diff --git a/src/main/java/dev/tggamesyt/szar/CannabisBlock.java b/src/main/java/dev/tggamesyt/szar/CannabisBlock.java new file mode 100644 index 0000000..fb7df4f --- /dev/null +++ b/src/main/java/dev/tggamesyt/szar/CannabisBlock.java @@ -0,0 +1,53 @@ +package dev.tggamesyt.szar; + +import net.minecraft.block.BlockState; +import net.minecraft.block.Fertilizable; +import net.minecraft.block.PlantBlock; +import net.minecraft.block.TallPlantBlock; +import net.minecraft.block.enums.DoubleBlockHalf; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.random.Random; +import net.minecraft.world.World; +import net.minecraft.world.WorldView; + +public class CannabisBlock extends PlantBlock implements Fertilizable { + + public CannabisBlock(Settings settings) { + super(settings); + } + + @Override + public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { + if (!world.isClient && random.nextInt(5) == 0) { // 20% chance + BlockPos above = pos.up(); + + if (world.isAir(above)) { + world.setBlockState(pos, Szar.TALL_CANNABIS_BLOCK.getDefaultState() + .with(TallPlantBlock.HALF, DoubleBlockHalf.LOWER)); + + world.setBlockState(above, Szar.TALL_CANNABIS_BLOCK.getDefaultState() + .with(TallPlantBlock.HALF, DoubleBlockHalf.UPPER)); + } + } + } + @Override + public boolean isFertilizable(WorldView world, BlockPos pos, BlockState state, boolean isClient) { + return world.getBlockState(pos.up()).isAir(); + } + + @Override + public boolean canGrow(World world, Random random, BlockPos pos, BlockState state) { + return true; + } + + @Override + public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) { + BlockPos above = pos.up(); + + world.setBlockState(pos, Szar.TALL_CANNABIS_BLOCK.getDefaultState() + .with(TallPlantBlock.HALF, DoubleBlockHalf.LOWER)); + world.setBlockState(above, Szar.TALL_CANNABIS_BLOCK.getDefaultState() + .with(TallPlantBlock.HALF, DoubleBlockHalf.UPPER)); + } +} diff --git a/src/main/java/dev/tggamesyt/szar/IslamTerrorist.java b/src/main/java/dev/tggamesyt/szar/IslamTerrorist.java new file mode 100644 index 0000000..4371334 --- /dev/null +++ b/src/main/java/dev/tggamesyt/szar/IslamTerrorist.java @@ -0,0 +1,224 @@ +package dev.tggamesyt.szar; + +import net.minecraft.entity.EntityType; +import net.minecraft.entity.EquipmentSlot; +import net.minecraft.entity.ItemEntity; +import net.minecraft.entity.TntEntity; +import net.minecraft.entity.ai.TargetPredicate; +import net.minecraft.entity.ai.goal.Goal; +import net.minecraft.entity.ai.goal.LookAroundGoal; +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.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.World; + +import java.util.*; + +public class IslamTerrorist extends PathAwareEntity { + + private int BlowUpCooldown = 0; + private int panicTicks = 0; + private UUID fleeingFrom = null; + + public IslamTerrorist(EntityType type, World world) { + super(type, world); + this.setCanPickUpLoot(true); + } + + // ================= ATTRIBUTES ================= + 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, 1.0); + } + + // ================= GOALS ================= + @Override + protected void initGoals() { + this.goalSelector.add(0, new PanicRandomlyGoal(this)); + this.goalSelector.add(1, new FleeSpecificPlayerGoal(this)); + this.goalSelector.add(3, new SneakBehindPlayerGoal(this)); + this.goalSelector.add(4, new BiasedWanderGoal(this, 0.6)); + this.goalSelector.add(5, new LookAroundGoal(this)); + } + + // ================= TICK ================= + @Override + public void tick() { + super.tick(); + + if (BlowUpCooldown > 0) BlowUpCooldown--; + } + + // ================= VISIBILITY ================= + private boolean isOnPlayerScreen(PlayerEntity player) { + Vec3d look = player.getRotationVec(1.0F).normalize(); + Vec3d toEntity = this.getPos().subtract(player.getEyePos()).normalize(); + return look.dotProduct(toEntity) > 0.55; + } + + // ================= STEALING ================= + private void triggerExposion(PlayerEntity player) { + if (this.getWorld().isClient) return; + + // Spawn primed TNT + TntEntity tnt = new TntEntity( + this.getWorld(), + this.getX(), + this.getY(), + this.getZ(), + this + ); + + tnt.setFuse(40); // 2 seconds (80 = normal TNT) + this.getWorld().spawnEntity(tnt); + + // Panic + flee + this.fleeingFrom = player.getUuid(); + this.panicTicks = 100; + this.BlowUpCooldown = 20*10; + + // Immediate movement impulse away from player + Vec3d runDir = this.getPos() + .subtract(player.getPos()) + .normalize() + .multiply(1.2); + + this.addVelocity(runDir.x, 0.3, runDir.z); + this.velocityDirty = true; + } + + + // ================= DAMAGE ================= + + // ================= GOALS ================= + + private static class PanicRandomlyGoal extends Goal { + private final IslamTerrorist mob; + PanicRandomlyGoal(IslamTerrorist mob) { this.mob = mob; this.setControls(EnumSet.of(Control.MOVE)); } + @Override public boolean canStart() { return mob.panicTicks > 0; } + @Override + public void tick() { + mob.panicTicks--; + if (mob.getNavigation().isIdle()) { + Vec3d dest = mob.getPos().add( + mob.random.nextGaussian() * 8, + 0, + mob.random.nextGaussian() * 8 + ); + mob.getNavigation().startMovingTo(dest.x, dest.y, dest.z, 1.5); + } + } + } + + // 🔴 Flee from only specific victim, hide behind others + private static class FleeSpecificPlayerGoal extends Goal { + private final IslamTerrorist mob; + private PlayerEntity threat; + + FleeSpecificPlayerGoal(IslamTerrorist mob) { + this.mob = mob; + this.setControls(EnumSet.of(Control.MOVE)); + } + + @Override + public boolean canStart() { + if (mob.fleeingFrom == null) return false; + PlayerEntity p = mob.getWorld().getPlayerByUuid(mob.fleeingFrom); + if (p == null || !mob.canSee(p) || !mob.isOnPlayerScreen(p)) return false; + threat = p; + return true; + } + + @Override + public void tick() { + TargetPredicate predicate = TargetPredicate.createNonAttackable() + .setBaseMaxDistance(16) + .setPredicate(player -> !player.getUuid().equals(mob.fleeingFrom)); + + PlayerEntity shield = mob.getWorld().getClosestPlayer(predicate, mob); + + Vec3d dest; + if (shield != null && !shield.isCreative()) { + dest = shield.getPos(); // hide behind other players + } else { + dest = mob.getPos().subtract(threat.getPos()).normalize().multiply(10).add(mob.getPos()); + } + + mob.getNavigation().startMovingTo(dest.x, dest.y, dest.z, 1.3); + } + } + + // 🟡 Sneak steal + private static class SneakBehindPlayerGoal extends Goal { + private final IslamTerrorist mob; + private PlayerEntity target; + private int cooldown = 0; + + SneakBehindPlayerGoal(IslamTerrorist mob) { + this.mob = mob; + this.setControls(EnumSet.of(Control.MOVE)); + } + + @Override + public boolean canStart() { + target = mob.getWorld().getClosestPlayer(mob, 10); + return target != null + && mob.BlowUpCooldown == 0 + && !mob.isOnPlayerScreen(target) + && !target.isCreative(); + } + + @Override + public void tick() { + if (cooldown-- > 0) return; + cooldown = 5; + + Vec3d behind = target.getPos().subtract(target.getRotationVec(1.0F).normalize()); + mob.getNavigation().startMovingTo(behind.x, behind.y, behind.z, 1.15); + + if (mob.distanceTo(target) < 1.3) { + mob.triggerExposion(target); + } + } + } + + // 🟢 Biased wander toward players when not guilty + private static class BiasedWanderGoal extends WanderAroundFarGoal { + private final IslamTerrorist mob; + + BiasedWanderGoal(IslamTerrorist mob, double speed) { + super(mob, speed); + this.mob = mob; + } + + @Override + protected Vec3d getWanderTarget() { + Vec3d base = super.getWanderTarget(); + PlayerEntity player = mob.getWorld().getClosestPlayer(mob, 10); + + if (player == null || base == null || mob.fleeingFrom != null) return base; + + Vec3d best = base; + double bestDist = base.squaredDistanceTo(player.getPos()); + + for (int i = 0; i < 4; i++) { + Vec3d c = super.getWanderTarget(); + if (c == null) continue; + double d = c.squaredDistanceTo(player.getPos()); + if (d < bestDist) { // bias toward player + best = c; + bestDist = d; + } + } + return best; + } + } +} diff --git a/src/main/java/dev/tggamesyt/szar/Szar.java b/src/main/java/dev/tggamesyt/szar/Szar.java index 5bbdf03..1ea6264 100644 --- a/src/main/java/dev/tggamesyt/szar/Szar.java +++ b/src/main/java/dev/tggamesyt/szar/Szar.java @@ -2,6 +2,8 @@ package dev.tggamesyt.szar; import com.google.common.collect.ImmutableSet; import net.fabricmc.api.ModInitializer; +import net.fabricmc.fabric.api.biome.v1.BiomeModifications; +import net.fabricmc.fabric.api.biome.v1.BiomeSelectors; import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents; import net.fabricmc.fabric.api.item.v1.FabricItemSettings; import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup; @@ -12,10 +14,7 @@ import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder; import net.fabricmc.fabric.api.object.builder.v1.trade.TradeOfferHelper; import net.fabricmc.fabric.api.object.builder.v1.world.poi.PointOfInterestHelper; import net.minecraft.advancement.Advancement; -import net.minecraft.block.AbstractBlock; -import net.minecraft.block.Block; -import net.minecraft.block.Blocks; -import net.minecraft.block.TallPlantBlock; +import net.minecraft.block.*; import net.minecraft.entity.EntityDimensions; import net.minecraft.entity.EntityType; import net.minecraft.entity.SpawnGroup; @@ -32,6 +31,7 @@ import net.minecraft.util.Formatting; import net.minecraft.util.Identifier; import net.minecraft.village.TradeOffer; import net.minecraft.village.VillagerProfession; +import net.minecraft.world.biome.BiomeKeys; import net.minecraft.world.poi.PointOfInterestType; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -73,6 +73,33 @@ public class Szar implements ModInitializer { SoundEvents.ENTITY_VILLAGER_WORK_CLERIC ) ); + public static final EntityType NiggerEntityType = + Registry.register( + Registries.ENTITY_TYPE, + new Identifier(MOD_ID, "nigger"), + FabricEntityTypeBuilder + .create(SpawnGroup.CREATURE, NiggerEntity::new) + .dimensions(EntityDimensions.fixed(0.6F, 1.8F)) // player-sized + .build() + ); + public static final EntityType GYPSY_ENTITY_TYPE = + Registry.register( + Registries.ENTITY_TYPE, + new Identifier(MOD_ID, "gypsy"), + FabricEntityTypeBuilder + .create(SpawnGroup.CREATURE, GypsyEntity::new) + .dimensions(EntityDimensions.fixed(0.6F, 1.8F)) // player-sized + .build() + ); + public static final EntityType TERRORIST_ENTITY_TYPE = + Registry.register( + Registries.ENTITY_TYPE, + new Identifier(MOD_ID, "islam_terrorist"), + FabricEntityTypeBuilder + .create(SpawnGroup.CREATURE, IslamTerrorist::new) + .dimensions(EntityDimensions.fixed(0.6F, 1.8F)) // player-sized + .build() + ); public static final ItemGroup SZAR_GROUP = Registry.register( Registries.ITEM_GROUP, new Identifier(MOD_ID, "szar_group"), @@ -85,6 +112,7 @@ public class Szar implements ModInitializer { entries.add(Szar.NWORD_PASS); entries.add(Szar.NIGGER_SPAWNEGG); entries.add(Szar.GYPSY_SPAWNEGG); + entries.add(Szar.TERRORIST_SPAWNEGG); entries.add(Szar.CANNABIS_ITEM); entries.add(Szar.WEED_ITEM); entries.add(Szar.WEED_JOINT_ITEM); @@ -152,7 +180,7 @@ public class Szar implements ModInitializer { new TradeOffer( new ItemStack(Items.SUGAR_CANE, 6), new ItemStack(Items.EMERALD, 1), - 12, // max uses + 10, // max uses 2, // villager XP 0.05f // price multiplier ) @@ -167,8 +195,8 @@ public class Szar implements ModInitializer { new TradeOffer( new ItemStack(Items.EMERALD, 10), new ItemStack(CANNABIS_ITEM, 1), - 12, // max uses - 2, // villager XP + 20, // max uses + 4, // villager XP 0.05f // price multiplier ) ); @@ -182,8 +210,8 @@ public class Szar implements ModInitializer { new TradeOffer( new ItemStack(Items.EMERALD, 15), new ItemStack(WEED_ITEM, 1), - 12, // max uses - 2, // villager XP + 16, // max uses + 8, // villager XP 0.05f // price multiplier ) ); @@ -197,8 +225,8 @@ public class Szar implements ModInitializer { new TradeOffer( new ItemStack(Items.EMERALD, 64), new ItemStack(WEED_JOINT_ITEM, 1), - 12, // max uses - 2, // villager XP + 5, // max uses + 12, // villager XP 0.05f // price multiplier ) ); @@ -212,8 +240,8 @@ public class Szar implements ModInitializer { new TradeOffer( new ItemStack(Items.EMERALD, 4), new ItemStack(Items.CAMPFIRE, 1), - 12, // max uses - 2, // villager XP + 16, // max uses + 10, // villager XP 0.05f // price multiplier ) ); @@ -247,7 +275,25 @@ public class Szar implements ModInitializer { GYPSY_ENTITY_TYPE, GypsyEntity.createAttributes() ); + /*FabricDefaultAttributeRegistry.register( + TERRORIST_ENTITY_TYPE, + IslamTerrorist.createAttributes() + );*/ ServerTickEvents.END_SERVER_TICK.register(PlayerValueTimer::onServerTick); + BiomeModifications.addSpawn( + BiomeSelectors.includeByKey( + BiomeKeys.DESERT, + BiomeKeys.BADLANDS, + BiomeKeys.ERODED_BADLANDS, + BiomeKeys.WOODED_BADLANDS + ), + SpawnGroup.MONSTER, + TERRORIST_ENTITY_TYPE, + 20, // weight (lower = rarer) + 1, // min group size + 1 // max group size + ); + } public static final Map PLAYER_JOINT_LEVEL = new HashMap<>(); public static final Map PLAYER_ADDICTION_LEVEL = new HashMap<>(); @@ -261,11 +307,19 @@ public class Szar implements ModInitializer { new Identifier(MOD_ID, "chemical_workbench"), new BlockItem(CHEMICAL_WORKBENCH, new FabricItemSettings()) ); + public static final Block TALL_CANNABIS_BLOCK = Registry.register( + Registries.BLOCK, + new Identifier(MOD_ID, "tall_cannabis"), + new TallPlantBlock( + FabricBlockSettings.copyOf(Blocks.LARGE_FERN) + ) + ); public static final Block CANNABIS_BLOCK = Registry.register( Registries.BLOCK, new Identifier(MOD_ID, "cannabis"), - new TallPlantBlock( - FabricBlockSettings.copyOf(Blocks.LARGE_FERN) + new CannabisBlock( + FabricBlockSettings.copyOf(Blocks.FERN) + .ticksRandomly() ) ); public static final Item CANNABIS_ITEM = Registry.register( @@ -397,24 +451,6 @@ public class Szar implements ModInitializer { new Identifier(MOD_ID, "nwordpass"), new NwordPassItem(new Item.Settings()) ); - public static final EntityType NiggerEntityType = - Registry.register( - Registries.ENTITY_TYPE, - new Identifier(MOD_ID, "nigger"), - FabricEntityTypeBuilder - .create(SpawnGroup.CREATURE, NiggerEntity::new) - .dimensions(EntityDimensions.fixed(0.6F, 1.8F)) // player-sized - .build() - ); - public static final EntityType GYPSY_ENTITY_TYPE = - Registry.register( - Registries.ENTITY_TYPE, - new Identifier(MOD_ID, "gypsy"), - FabricEntityTypeBuilder - .create(SpawnGroup.CREATURE, GypsyEntity::new) - .dimensions(EntityDimensions.fixed(0.6F, 1.8F)) // player-sized - .build() - ); public static final Item NIGGER_SPAWNEGG = Registry.register( Registries.ITEM, new Identifier(MOD_ID, "nigger_spawn_egg"), @@ -435,7 +471,16 @@ public class Szar implements ModInitializer { new Item.Settings() ) ); - + public static final Item TERRORIST_SPAWNEGG = Registry.register( + Registries.ITEM, + new Identifier(MOD_ID, "terrorist_spawn_egg"), + new SpawnEggItem( + TERRORIST_ENTITY_TYPE, + 0xFF0000, + 0x8B0000, + new Item.Settings() + ) + ); private static final List FORBIDDEN_WORDS = List.of( "nigger", "niger", diff --git a/src/main/resources/assets/szar/blockstates/cannabis.json b/src/main/resources/assets/szar/blockstates/cannabis.json index a9f2159..2d687f8 100644 --- a/src/main/resources/assets/szar/blockstates/cannabis.json +++ b/src/main/resources/assets/szar/blockstates/cannabis.json @@ -1,6 +1,5 @@ { "variants": { - "half=lower": { "model": "szar:block/cannabis_bottom" }, - "half=upper": { "model": "szar:block/cannabis" } + "": { "model": "szar:block/cannabis" } } } diff --git a/src/main/resources/assets/szar/blockstates/tall_cannabis.json b/src/main/resources/assets/szar/blockstates/tall_cannabis.json new file mode 100644 index 0000000..3b73f9f --- /dev/null +++ b/src/main/resources/assets/szar/blockstates/tall_cannabis.json @@ -0,0 +1,6 @@ +{ + "variants": { + "half=lower": { "model": "szar:block/cannabis_bottom" }, + "half=upper": { "model": "szar:block/tall_cannabis" } + } +} diff --git a/src/main/resources/assets/szar/lang/en_us.json b/src/main/resources/assets/szar/lang/en_us.json index e6771da..3d47bce 100644 --- a/src/main/resources/assets/szar/lang/en_us.json +++ b/src/main/resources/assets/szar/lang/en_us.json @@ -24,5 +24,7 @@ "death.attack.heart_attack": "%1$s got a heart attack", "death.attack.drog_overdose": "%1$s got a drog overdose", "block.szar.chemical_workbench": "Chemical Workbench", - "entity.minecraft.villager.drog_dealer": "Drog dealer" + "entity.minecraft.villager.drog_dealer": "Drog dealer", + "entity.szar.islam_terrorist": "Islam Terrorist", + "item.szar.terrorist_spawn_egg": "Islam Terrorist Spawn Egg" } diff --git a/src/main/resources/assets/szar/models/block/tall_cannabis.json b/src/main/resources/assets/szar/models/block/tall_cannabis.json new file mode 100644 index 0000000..3d16f6f --- /dev/null +++ b/src/main/resources/assets/szar/models/block/tall_cannabis.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cross", + "textures": { + "cross": "szar:block/cannabis" + } +} diff --git a/src/main/resources/assets/szar/models/item/terrorist_spawn_egg.json b/src/main/resources/assets/szar/models/item/terrorist_spawn_egg.json new file mode 100644 index 0000000..ddd1559 --- /dev/null +++ b/src/main/resources/assets/szar/models/item/terrorist_spawn_egg.json @@ -0,0 +1,3 @@ +{ + "parent": "minecraft:item/template_spawn_egg" +} diff --git a/src/main/resources/assets/szar/textures/block/cannabis.png b/src/main/resources/assets/szar/textures/block/cannabis.png index 4424dfe..32dec60 100644 Binary files a/src/main/resources/assets/szar/textures/block/cannabis.png and b/src/main/resources/assets/szar/textures/block/cannabis.png differ diff --git a/src/main/resources/assets/szar/textures/block/cannabis_bottom.png b/src/main/resources/assets/szar/textures/block/cannabis_bottom.png index 5367fd9..a06fd4c 100644 Binary files a/src/main/resources/assets/szar/textures/block/cannabis_bottom.png and b/src/main/resources/assets/szar/textures/block/cannabis_bottom.png differ diff --git a/src/main/resources/assets/szar/textures/entity/islam_terrorist.png b/src/main/resources/assets/szar/textures/entity/islam_terrorist.png new file mode 100644 index 0000000..761b38c Binary files /dev/null and b/src/main/resources/assets/szar/textures/entity/islam_terrorist.png differ diff --git a/src/main/resources/assets/szar/textures/entity/villager/drog_dealer.png b/src/main/resources/assets/szar/textures/entity/villager/drog_dealer.png new file mode 100644 index 0000000..fe76c3c Binary files /dev/null and b/src/main/resources/assets/szar/textures/entity/villager/drog_dealer.png differ diff --git a/src/main/resources/assets/szar/textures/entity/villager/drog_dealer_white.png b/src/main/resources/assets/szar/textures/entity/villager/drog_dealer_white.png new file mode 100644 index 0000000..0b196ea Binary files /dev/null and b/src/main/resources/assets/szar/textures/entity/villager/drog_dealer_white.png differ diff --git a/src/main/resources/assets/szar/textures/entity/villager/profession/drog_dealer.png b/src/main/resources/assets/szar/textures/entity/villager/profession/drog_dealer.png index f9d99f9..adb5f29 100644 Binary files a/src/main/resources/assets/szar/textures/entity/villager/profession/drog_dealer.png and b/src/main/resources/assets/szar/textures/entity/villager/profession/drog_dealer.png differ diff --git a/src/main/resources/data/szar/loot_tables/blocks/cannabis.json b/src/main/resources/data/szar/loot_tables/blocks/cannabis.json index d871b40..ad536af 100644 --- a/src/main/resources/data/szar/loot_tables/blocks/cannabis.json +++ b/src/main/resources/data/szar/loot_tables/blocks/cannabis.json @@ -8,33 +8,24 @@ "type": "minecraft:item", "name": "szar:cannabis" } - ], + ] + }, + { + "rolls": { + "min": 0, + "max": 2 + }, "conditions": [ { - "condition": "minecraft:any_of", - "terms": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "items": ["minecraft:shears"] - } - }, - { - "condition": "minecraft:match_tool", - "predicate": { - "enchantments": [ - { - "enchantment": "minecraft:silk_touch", - "levels": { "min": 1 } - } - ] - } - }, - { - "condition": "minecraft:random_chance", - "chance": 0.5 - } - ] + "condition": "minecraft:table_bonus", + "enchantment": "minecraft:fortune", + "chances": [0.0, 0.4, 0.7, 0.9] + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "szar:cannabis" } ] } diff --git a/src/main/resources/data/szar/loot_tables/blocks/tall_cannabis.json b/src/main/resources/data/szar/loot_tables/blocks/tall_cannabis.json new file mode 100644 index 0000000..ad536af --- /dev/null +++ b/src/main/resources/data/szar/loot_tables/blocks/tall_cannabis.json @@ -0,0 +1,33 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "szar:cannabis" + } + ] + }, + { + "rolls": { + "min": 0, + "max": 2 + }, + "conditions": [ + { + "condition": "minecraft:table_bonus", + "enchantment": "minecraft:fortune", + "chances": [0.0, 0.4, 0.7, 0.9] + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "szar:cannabis" + } + ] + } + ] +}