Skip to content

Commit

Permalink
Nerfed turquoise spawnrate, added smithing templates to loottables, f…
Browse files Browse the repository at this point in the history
…ixed armor effects being infinite when armor is taken off, fixed recipes not working, added meme sounds
  • Loading branch information
Leronus committed Feb 18, 2024
1 parent 726d820 commit 2616474
Show file tree
Hide file tree
Showing 49 changed files with 295 additions and 37 deletions.
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ repositories {
maven {
url = "https://api.modrinth.com/maven"
}
maven {
url = "https://cursemaven.com"
}
maven {
name = 'ParchmentMC'
url = 'https://maven.parchmentmc.org'
Expand Down Expand Up @@ -89,6 +92,9 @@ dependencies {
include 'net.kyrptonaught:customportalapi:0.0.1-beta64-1.20'

modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"

//XRay
modImplementation "curse.maven:advanced-xray-fabric-edition-444663:4595168"
}

processResources {
Expand Down
55 changes: 30 additions & 25 deletions src/main/java/mod/leronus/mores/item/custom/ModArmorItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.google.common.collect.ImmutableMap;
import mod.leronus.mores.item.ModArmorMaterials;
import net.minecraft.entity.Entity;
import net.minecraft.entity.effect.StatusEffect;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.entity.player.PlayerEntity;
Expand All @@ -16,30 +17,30 @@
public class ModArmorItem extends ArmorItem {
private static final Map<ArmorMaterial, StatusEffectInstance> MATERIAL_TO_EFFECT_MAP =
(new ImmutableMap.Builder<ArmorMaterial, StatusEffectInstance>())
.put(ModArmorMaterials.TIN, new StatusEffectInstance(StatusEffects.JUMP_BOOST, -1, 1,
false, false, true))
.put(ModArmorMaterials.COBALT, new StatusEffectInstance(StatusEffects.HASTE, -1, 0,
false, false, true))
.put(ModArmorMaterials.STEEL, new StatusEffectInstance(StatusEffects.STRENGTH, -1, 0,
false, false, true))
.put(ModArmorMaterials.AMETHYST, new StatusEffectInstance(StatusEffects.SLOW_FALLING, -1, 0,
false, false, true))
.put(ModArmorMaterials.EMERALD, new StatusEffectInstance(StatusEffects.LUCK, -1, 0,
false, false, true))
.put(ModArmorMaterials.TOPAZ, new StatusEffectInstance(StatusEffects.HASTE, -1, 1,
false, false, true))
.put(ModArmorMaterials.TOURMALINE, new StatusEffectInstance(StatusEffects.REGENERATION, -1, 0,
false, false, true))
.put(ModArmorMaterials.TANZANITE, new StatusEffectInstance(StatusEffects.SPEED, -1, 0,
false, false, true))
.put(ModArmorMaterials.RUBY, new StatusEffectInstance(StatusEffects.FIRE_RESISTANCE, -1, 0,
false, false, true))
.put(ModArmorMaterials.SAPPHIRE, new StatusEffectInstance(StatusEffects.NIGHT_VISION, -1, 0,
false, false, true))
.put(ModArmorMaterials.MOISSANITE, new StatusEffectInstance(StatusEffects.CONDUIT_POWER, -1, 0,
false, false, true))
.put(ModArmorMaterials.TURQUOISE, new StatusEffectInstance(StatusEffects.DOLPHINS_GRACE, -1, 0,
false, false, true))
.put(ModArmorMaterials.TIN, new StatusEffectInstance(StatusEffects.JUMP_BOOST, 10, 1,
false, true, false))
.put(ModArmorMaterials.COBALT, new StatusEffectInstance(StatusEffects.HASTE, 10, 0,
false, true, false))
.put(ModArmorMaterials.STEEL, new StatusEffectInstance(StatusEffects.STRENGTH, 10, 0,
false, true, false))
.put(ModArmorMaterials.AMETHYST, new StatusEffectInstance(StatusEffects.SLOW_FALLING, 10, 0,
false, true, false))
.put(ModArmorMaterials.EMERALD, new StatusEffectInstance(StatusEffects.LUCK, 10, 0,
false, true, false))
.put(ModArmorMaterials.TOPAZ, new StatusEffectInstance(StatusEffects.HASTE, 10, 1,
false, true, false))
.put(ModArmorMaterials.TOURMALINE, new StatusEffectInstance(StatusEffects.REGENERATION, 10, 0,
false, true, false))
.put(ModArmorMaterials.TANZANITE, new StatusEffectInstance(StatusEffects.SPEED, 10, 0,
false, true, false))
.put(ModArmorMaterials.RUBY, new StatusEffectInstance(StatusEffects.FIRE_RESISTANCE, 10, 0,
false, true, false))
.put(ModArmorMaterials.SAPPHIRE, new StatusEffectInstance(StatusEffects.NIGHT_VISION, 250, 0,
false, true, false))
.put(ModArmorMaterials.MOISSANITE, new StatusEffectInstance(StatusEffects.CONDUIT_POWER, 10, 0,
false, true, false))
.put(ModArmorMaterials.TURQUOISE, new StatusEffectInstance(StatusEffects.DOLPHINS_GRACE, 10, 0,
false, true, false))
.build();

public ModArmorItem(ArmorMaterial material, Type type, Settings settings) {
Expand Down Expand Up @@ -70,10 +71,14 @@ private void evaluateArmorEffects(PlayerEntity player) {

private void addStatusEffectForMaterial(PlayerEntity player, ArmorMaterial mapArmorMaterial, StatusEffectInstance mapStatusEffect) {
boolean hasPlayerEffect = player.hasStatusEffect(mapStatusEffect.getEffectType());

StatusEffect playerEffect = mapStatusEffect.getEffectType();
if(hasCorrectArmorOn(mapArmorMaterial, player) && !hasPlayerEffect) {
player.addStatusEffect(new StatusEffectInstance(mapStatusEffect));
}
if (hasCorrectArmorOn(mapArmorMaterial, player) && playerEffect == StatusEffects.NIGHT_VISION){
player.setStatusEffect(new StatusEffectInstance(StatusEffects.NIGHT_VISION, 250, 0,
false, true, false), null);
}
}

private boolean hasFullSuitOfArmorOn(PlayerEntity player) {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/mod/leronus/mores/sound/ModSounds.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
public class ModSounds {
public static final SoundEvent SWEET_CAROLINE_BOOTLEG = registerSoundEvent("sweet_caroline_bootleg");
public static final SoundEvent CIPHER = registerSoundEvent( "cipher");
public static final SoundEvent WORTEL9 = registerSoundEvent( "wortel9");
public static final SoundEvent WATWAAROM = registerSoundEvent( "watwaarom");

private static SoundEvent registerSoundEvent(String name) {
Identifier id = new Identifier(Mores.MOD_ID, name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ public static void bootstrap(Registerable<ConfiguredFeature<?, ?>> context) {
register(context, SAPPHIRE_BURIED_ORE_KEY, Feature.ORE, new OreFeatureConfig(OVERWORLD_SAPPHIRE_ORES,8, 1.0F));
register(context, NETHER_SAPPHIRE_ORE_KEY, Feature.ORE, new OreFeatureConfig(NETHER_SAPPHIRE_ORES,5, 0.7F));

register(context, TURQUOISE_SMALL_ORE_KEY, Feature.ORE, new OreFeatureConfig(OVERWORLD_TURQUOISE_ORES,4, 0.5F));
register(context, TURQUOISE_LARGE_ORE_KEY, Feature.ORE, new OreFeatureConfig(OVERWORLD_TURQUOISE_ORES,10, 0.7F));
register(context, TURQUOISE_BURIED_ORE_KEY, Feature.ORE, new OreFeatureConfig(OVERWORLD_TURQUOISE_ORES,8, 1.0F));
register(context, TURQUOISE_SMALL_ORE_KEY, Feature.ORE, new OreFeatureConfig(OVERWORLD_TURQUOISE_ORES,6, 0.5F));
register(context, TURQUOISE_LARGE_ORE_KEY, Feature.ORE, new OreFeatureConfig(OVERWORLD_TURQUOISE_ORES,7, 0.7F));
register(context, TURQUOISE_BURIED_ORE_KEY, Feature.ORE, new OreFeatureConfig(OVERWORLD_TURQUOISE_ORES,6, 1.0F));

register(context, END_ONYX_ORE_KEY, Feature.ORE, new OreFeatureConfig(END_ONYX_ORES,6));

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "mores:item/cipher_music_disc"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "mores:item/sweet_caroline_music_disc"
}
}
18 changes: 18 additions & 0 deletions src/main/resources/assets/mores/sounds.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,23 @@
"stream" : true
}
]
},
"wortel9": {
"subtitle" : "sound.mores.wortel9",
"sounds" : [
{
"name" : "mores:wortel9",
"stream" : true
}
]
},
"watwaarom": {
"subtitle" : "sound.mores.watwaarom",
"sounds" : [
{
"name" : "mores:watwaarom",
"stream" : true
}
]
}
}
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/gems/graphene.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:graphene_gem"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/gems/moissanite.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:moissanite_gem"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/gems/onyx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:onyx_gem"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/gems/ruby.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:ruby_gem"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/gems/sapphire.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:sapphire_gem"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/gems/tanzanite.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:tanzanite_gem"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/gems/topaz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:topaz_gem"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/gems/tourmaline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:tourmaline_gem"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/gems/turquoise.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:turquoise_gem"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/ingots/bronze.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:bronze_ingot"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/ingots/cobalt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:cobalt_ingot"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/ingots/obsidian.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:obsidian_ingot"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/ingots/silver.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:silver_ingot"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/ingots/steel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:steel_ingot"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:sterling_ingot"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/ingots/tin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:tin_ingot"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/nuggets/bronze.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:bronze_nugget"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/nuggets/cobalt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:cobalt_nugget"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/nuggets/copper.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:copper_nugget"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/nuggets/silver.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:silver_nugget"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/nuggets/steel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:steel_nugget"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:sterling_nugget"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/forge/tags/items/nuggets/tin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": "false",
"values": [
"mores:tin_nugget"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
}
},
"rewards": {
"loot": [
"mores:graphene_alloy_smithing_template"
],
"experience": 150
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
playsound mores:wortel9 ambient @a
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"type": "minecraft:advancement_reward",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "mores:graphene_alloy_smithing_template"
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"entries": [
{
"type": "minecraft:item",
"name": "mores:sterling_alloy_smithing_template"
"name": "mores:steel_alloy_smithing_template"
}
]
}
Expand Down
Loading

0 comments on commit 2616474

Please sign in to comment.