diff --git a/src/generated/resources/assets/theaurorian/blockstates/indigo_mushroom_block.json b/src/generated/resources/assets/theaurorian/blockstates/indigo_mushroom_block.json index 3c85c4c4..b1aab715 100644 --- a/src/generated/resources/assets/theaurorian/blockstates/indigo_mushroom_block.json +++ b/src/generated/resources/assets/theaurorian/blockstates/indigo_mushroom_block.json @@ -2,53 +2,65 @@ "multipart": [ { "apply": { - "model": "theaurorian:block/indigo_mushroom_block", - "uvlock": true, - "y": 90 + "model": "theaurorian:block/indigo_mushroom_block" }, "when": { - "down": "true" + "north": "true" + } + }, + { + "apply": { + "model": "theaurorian:block/indigo_mushroom_block" + }, + "when": { + "east": "true" } }, { "apply": { "model": "theaurorian:block/indigo_mushroom_block", + "uvlock": true, "y": 90 }, "when": { - "down": "false" + "south": "true" } }, { "apply": { "model": "theaurorian:block/indigo_mushroom_block", "uvlock": true, - "y": 270 + "y": 180 }, "when": { - "up": "true" + "west": "true" } }, { "apply": { "model": "theaurorian:block/indigo_mushroom_block", + "uvlock": true, "y": 270 }, "when": { - "up": "false" + "up": "true" } }, { "apply": { - "model": "theaurorian:block/indigo_mushroom_block" + "model": "theaurorian:block/indigo_mushroom_block", + "uvlock": true, + "x": 270 }, "when": { - "north": "true" + "down": "true" } }, { "apply": { - "model": "theaurorian:block/indigo_mushroom_block" + "model": "theaurorian:block/indigo_mushroom_block", + "uvlock": true, + "x": 90 }, "when": { "north": "false" @@ -56,18 +68,16 @@ }, { "apply": { - "model": "theaurorian:block/indigo_mushroom_block", - "uvlock": true, - "y": 180 + "model": "theaurorian:block/indigo_mushroom_block" }, "when": { - "south": "true" + "east": "false" } }, { "apply": { "model": "theaurorian:block/indigo_mushroom_block", - "y": 180 + "y": 90 }, "when": { "south": "false" @@ -76,11 +86,10 @@ { "apply": { "model": "theaurorian:block/indigo_mushroom_block", - "uvlock": true, - "y": 270 + "y": 180 }, "when": { - "west": "true" + "west": "false" } }, { @@ -89,26 +98,22 @@ "y": 270 }, "when": { - "west": "false" + "up": "false" } }, { "apply": { "model": "theaurorian:block/indigo_mushroom_block", - "uvlock": true, - "y": 90 + "x": 270 }, "when": { - "east": "true" + "down": "false" } }, { "apply": { "model": "theaurorian:block/indigo_mushroom_block", - "y": 90 - }, - "when": { - "east": "false" + "x": 90 } } ] diff --git a/src/generated/resources/assets/theaurorian/blockstates/indigo_mushroom_stem.json b/src/generated/resources/assets/theaurorian/blockstates/indigo_mushroom_stem.json index 94ee8301..dead3bc3 100644 --- a/src/generated/resources/assets/theaurorian/blockstates/indigo_mushroom_stem.json +++ b/src/generated/resources/assets/theaurorian/blockstates/indigo_mushroom_stem.json @@ -2,53 +2,65 @@ "multipart": [ { "apply": { - "model": "theaurorian:block/indigo_mushroom_stem", - "uvlock": true, - "y": 90 + "model": "theaurorian:block/indigo_mushroom_stem" }, "when": { - "down": "true" + "north": "true" + } + }, + { + "apply": { + "model": "theaurorian:block/indigo_mushroom_stem" + }, + "when": { + "east": "true" } }, { "apply": { "model": "theaurorian:block/indigo_mushroom_stem", + "uvlock": true, "y": 90 }, "when": { - "down": "false" + "south": "true" } }, { "apply": { "model": "theaurorian:block/indigo_mushroom_stem", "uvlock": true, - "y": 270 + "y": 180 }, "when": { - "up": "true" + "west": "true" } }, { "apply": { "model": "theaurorian:block/indigo_mushroom_stem", + "uvlock": true, "y": 270 }, "when": { - "up": "false" + "up": "true" } }, { "apply": { - "model": "theaurorian:block/indigo_mushroom_stem" + "model": "theaurorian:block/indigo_mushroom_stem", + "uvlock": true, + "x": 270 }, "when": { - "north": "true" + "down": "true" } }, { "apply": { - "model": "theaurorian:block/indigo_mushroom_stem" + "model": "theaurorian:block/indigo_mushroom_stem", + "uvlock": true, + "x": 90 }, "when": { "north": "false" @@ -56,18 +68,16 @@ }, { "apply": { - "model": "theaurorian:block/indigo_mushroom_stem", - "uvlock": true, - "y": 180 + "model": "theaurorian:block/indigo_mushroom_stem" }, "when": { - "south": "true" + "east": "false" } }, { "apply": { "model": "theaurorian:block/indigo_mushroom_stem", - "y": 180 + "y": 90 }, "when": { "south": "false" @@ -76,11 +86,10 @@ { "apply": { "model": "theaurorian:block/indigo_mushroom_stem", - "uvlock": true, - "y": 270 + "y": 180 }, "when": { - "west": "true" + "west": "false" } }, { @@ -89,26 +98,22 @@ "y": 270 }, "when": { - "west": "false" + "up": "false" } }, { "apply": { "model": "theaurorian:block/indigo_mushroom_stem", - "uvlock": true, - "y": 90 + "x": 270 }, "when": { - "east": "true" + "down": "false" } }, { "apply": { "model": "theaurorian:block/indigo_mushroom_stem", - "y": 90 - }, - "when": { - "east": "false" + "x": 90 } } ] diff --git a/src/generated/resources/assets/theaurorian/lang/en_us.json b/src/generated/resources/assets/theaurorian/lang/en_us.json index 6beccb02..b2087a92 100644 --- a/src/generated/resources/assets/theaurorian/lang/en_us.json +++ b/src/generated/resources/assets/theaurorian/lang/en_us.json @@ -154,6 +154,8 @@ "block.theaurorian.weeping_willow_slab": "Weeping Willow Slab", "block.theaurorian.weeping_willow_stairs": "Weeping Willow Stairs", "block.theaurorian.weeping_willow_wood": "Weeping Willow Wood", + "effect.theaurorian.moon_curse": "Moon Curse", + "effect.theaurorian.stun": "Stun", "enchantment.theaurorian.lightning": "Lightning", "enchantment.theaurorian.lightning.desc": "Does extra damage depending on how much armor the target is wearing", "enchantment.theaurorian.lightning_resistance": "Lightning Resistance", diff --git a/src/generated/resources/assets/theaurorian/lang/zh_cn.json b/src/generated/resources/assets/theaurorian/lang/zh_cn.json index 75d63b6d..0ffc33a4 100644 --- a/src/generated/resources/assets/theaurorian/lang/zh_cn.json +++ b/src/generated/resources/assets/theaurorian/lang/zh_cn.json @@ -154,6 +154,8 @@ "block.theaurorian.weeping_willow_slab": "垂柳木台阶", "block.theaurorian.weeping_willow_stairs": "垂柳木楼梯", "block.theaurorian.weeping_willow_wood": "垂柳木头", + "effect.theaurorian.moon_curse": "皎月之咒", + "effect.theaurorian.stun": "眩晕", "enchantment.theaurorian.lightning": "雷电", "enchantment.theaurorian.lightning.desc": "根据对方穿戴的护甲数量造成额外伤害", "enchantment.theaurorian.lightning_resistance": "雷电抵御", diff --git a/src/generated/resources/assets/theaurorian/models/item/keepers_bow.json b/src/generated/resources/assets/theaurorian/models/item/keepers_bow.json index 51646aa9..7da970a3 100644 --- a/src/generated/resources/assets/theaurorian/models/item/keepers_bow.json +++ b/src/generated/resources/assets/theaurorian/models/item/keepers_bow.json @@ -4,7 +4,6 @@ { "model": "theaurorian:item/keepers_bow_pulling_0", "predicate": { - "minecraft:pull": 0.0, "minecraft:pulling": 1.0 } }, diff --git a/src/generated/resources/assets/theaurorian/models/item/silent_wood_bow.json b/src/generated/resources/assets/theaurorian/models/item/silent_wood_bow.json index 2f644462..4e9b05dd 100644 --- a/src/generated/resources/assets/theaurorian/models/item/silent_wood_bow.json +++ b/src/generated/resources/assets/theaurorian/models/item/silent_wood_bow.json @@ -4,7 +4,6 @@ { "model": "theaurorian:item/silent_wood_bow_pulling_0", "predicate": { - "minecraft:pull": 0.0, "minecraft:pulling": 1.0 } }, diff --git a/src/generated/resources/data/forge/tags/items/tools/bows.json b/src/generated/resources/data/forge/tags/items/tools/bows.json new file mode 100644 index 00000000..4fde28a1 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/tools/bows.json @@ -0,0 +1,6 @@ +{ + "values": [ + "theaurorian:silent_wood_bow", + "theaurorian:keepers_bow" + ] +} \ No newline at end of file diff --git a/src/main/java/cn/teampancake/theaurorian/common/effect/StunEffect.java b/src/main/java/cn/teampancake/theaurorian/common/effect/StunEffect.java index 38c7a1a8..6d57f9c5 100644 --- a/src/main/java/cn/teampancake/theaurorian/common/effect/StunEffect.java +++ b/src/main/java/cn/teampancake/theaurorian/common/effect/StunEffect.java @@ -5,13 +5,13 @@ import net.minecraft.world.entity.ai.attributes.AttributeModifier; import net.minecraft.world.entity.ai.attributes.Attributes; -import java.util.UUID; - public class StunEffect extends MobEffect { + private static final String STUN_UUID = "e8c3b0b0-3d6c-11eb-b378-0242ac130002"; + public StunEffect() { super(MobEffectCategory.HARMFUL, 0x8B0000); - this.addAttributeModifier(Attributes.MOVEMENT_SPEED,STUN_UUID,-1, AttributeModifier.Operation.MULTIPLY_TOTAL); + this.addAttributeModifier(Attributes.MOVEMENT_SPEED, STUN_UUID, -1, AttributeModifier.Operation.MULTIPLY_TOTAL); } -} +} \ No newline at end of file diff --git a/src/main/java/cn/teampancake/theaurorian/common/effect/TAMobEffect.java b/src/main/java/cn/teampancake/theaurorian/common/effect/TAMobEffect.java new file mode 100644 index 00000000..855fe1a8 --- /dev/null +++ b/src/main/java/cn/teampancake/theaurorian/common/effect/TAMobEffect.java @@ -0,0 +1,12 @@ +package cn.teampancake.theaurorian.common.effect; + +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.effect.MobEffectCategory; + +public class TAMobEffect extends MobEffect { + + public TAMobEffect(MobEffectCategory category, int color) { + super(category, color); + } + +} \ No newline at end of file diff --git a/src/main/java/cn/teampancake/theaurorian/common/entities/monster/DisturbedHollow.java b/src/main/java/cn/teampancake/theaurorian/common/entities/monster/DisturbedHollow.java index 810f5cd0..123c3078 100644 --- a/src/main/java/cn/teampancake/theaurorian/common/entities/monster/DisturbedHollow.java +++ b/src/main/java/cn/teampancake/theaurorian/common/entities/monster/DisturbedHollow.java @@ -99,12 +99,23 @@ public boolean canUse() { return target != null && this.disturbedHollow.distanceToSqr(target) > this.getAttackReachSqr(target); } + @Override + public boolean canContinueToUse() { + return this.canUse() || this.disturbedHollow.getNavigation().isDone(); + } + @Override public void start() { this.chargeTime = 0; + this.disturbedHollow.setAggressive(true); this.disturbedHollow.level().broadcastEntityEvent(this.disturbedHollow, (byte) 4); } + @Override + public void stop() { + this.disturbedHollow.setAggressive(false); + } + @Override public boolean requiresUpdateEveryTick() { return true; @@ -127,6 +138,7 @@ public void tick() { double x = this.disturbedHollow.getX() + vec3.x * 5.0D; double y = this.disturbedHollow.getY(0.5D) + 0.5D; double z = eyeOfDisturbed.getZ() + vec3.z * 5.0D; + eyeOfDisturbed.setOwner(this.disturbedHollow); eyeOfDisturbed.setPos(x, y, z); level.addFreshEntity(eyeOfDisturbed); this.chargeTime = -60; diff --git a/src/main/java/cn/teampancake/theaurorian/common/entities/projectile/EyeOfDisturbedEntity.java b/src/main/java/cn/teampancake/theaurorian/common/entities/projectile/EyeOfDisturbedEntity.java index 590dc4a9..d35a32cb 100644 --- a/src/main/java/cn/teampancake/theaurorian/common/entities/projectile/EyeOfDisturbedEntity.java +++ b/src/main/java/cn/teampancake/theaurorian/common/entities/projectile/EyeOfDisturbedEntity.java @@ -48,7 +48,9 @@ public void tick() { protected void onHitEntity(EntityHitResult result) { if (!this.level().isClientSide) { Entity entity = result.getEntity(); - entity.hurt(this.damageSources().magic(), 2.0F); + if (entity != this.getOwner()) { + entity.hurt(this.damageSources().magic(), 2.0F); + } } } diff --git a/src/main/java/cn/teampancake/theaurorian/common/items/KeepersBow.java b/src/main/java/cn/teampancake/theaurorian/common/items/KeepersBow.java index 01aa2d6a..9c95e696 100644 --- a/src/main/java/cn/teampancake/theaurorian/common/items/KeepersBow.java +++ b/src/main/java/cn/teampancake/theaurorian/common/items/KeepersBow.java @@ -7,7 +7,8 @@ import net.minecraft.world.item.Rarity; import net.minecraft.world.level.Level; -public class KeepersBow extends BowItem implements ITooltipsItem{ +public class KeepersBow extends BowItem implements ITooltipsItem { + public KeepersBow() { super(new Properties() .defaultDurability(512) @@ -27,4 +28,5 @@ public void releaseUsing(ItemStack pStack, Level pLevel, LivingEntity entityLivi } } } + } diff --git a/src/main/java/cn/teampancake/theaurorian/data/provider/TABlockStateProvider.java b/src/main/java/cn/teampancake/theaurorian/data/provider/TABlockStateProvider.java index 1cc5e3ee..6edac581 100644 --- a/src/main/java/cn/teampancake/theaurorian/data/provider/TABlockStateProvider.java +++ b/src/main/java/cn/teampancake/theaurorian/data/provider/TABlockStateProvider.java @@ -8,6 +8,7 @@ import net.minecraft.data.PackOutput; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraftforge.client.model.generators.*; import net.minecraftforge.common.data.ExistingFileHelper; @@ -282,23 +283,24 @@ private void registerPlantStates(Block block) { } private void registerMushroomStates(Block block) { - MultiPartBlockStateBuilder builder = this.getMultipartBuilder(block); ResourceLocation parent = this.mcLoc("block/template_single_face"); ResourceLocation outside = this.modLoc("block/" + this.name(block) + "_side"); ResourceLocation inside = this.modLoc("block/" + this.name(block) + "_inside"); ModelFile outsideModel = this.models().singleTexture(this.name(block), parent, outside).renderType(TRANSLUCENT); ModelFile insideModel = this.models().singleTexture(this.name(block), parent, inside).renderType(TRANSLUCENT); - Map map = Map.of((0), (90), (1), (270), (2), (0), (3), (180), (4), (270), (5), (90)); - Map properties = PipeBlock.PROPERTY_BY_DIRECTION; - for (Direction direction : Direction.values()) { - boolean flag = direction == Direction.NORTH; - int yRot = map.get(direction.get3DDataValue()); - BooleanProperty property = properties.get(direction); - builder.part().modelFile(outsideModel).uvLock(!flag).rotationY(yRot) - .addModel().condition(property, Boolean.TRUE).end(); - builder.part().modelFile(insideModel).uvLock(Boolean.FALSE).rotationY(yRot) - .addModel().condition(property, Boolean.FALSE).end(); - } + this.getMultipartBuilder(block).part().modelFile(outsideModel).addModel().condition(BlockStateProperties.NORTH, true).end() + .part().modelFile(outsideModel).addModel().condition(BlockStateProperties.EAST, true).end() + .part().modelFile(outsideModel).rotationY(90).uvLock(true).addModel().condition(BlockStateProperties.SOUTH, true).end() + .part().modelFile(outsideModel).rotationY(180).uvLock(true).addModel().condition(BlockStateProperties.WEST, true).end() + .part().modelFile(outsideModel).rotationY(270).uvLock(true).addModel().condition(BlockStateProperties.UP, true).end() + .part().modelFile(outsideModel).rotationX(270).uvLock(true).addModel().condition(BlockStateProperties.DOWN, true).end() + .part().modelFile(outsideModel).rotationX(90).uvLock(true).addModel().condition(BlockStateProperties.NORTH, false).end() + .part().modelFile(insideModel).addModel().condition(BlockStateProperties.EAST, false).end() + .part().modelFile(insideModel).rotationY(90).uvLock(false).addModel().condition(BlockStateProperties.SOUTH, false).end() + .part().modelFile(insideModel).rotationY(180).uvLock(false).addModel().condition(BlockStateProperties.WEST, false).end() + .part().modelFile(insideModel).rotationY(270).uvLock(false).addModel().condition(BlockStateProperties.UP, false).end() + .part().modelFile(insideModel).rotationX(270).uvLock(false).addModel().condition(BlockStateProperties.DOWN, false).end() + .part().modelFile(insideModel).rotationX(90).uvLock(false).addModel().end(); } private void registerLiquidStates() { diff --git a/src/main/java/cn/teampancake/theaurorian/data/provider/TAItemModelProvider.java b/src/main/java/cn/teampancake/theaurorian/data/provider/TAItemModelProvider.java index 6267b3e8..d475b6c7 100644 --- a/src/main/java/cn/teampancake/theaurorian/data/provider/TAItemModelProvider.java +++ b/src/main/java/cn/teampancake/theaurorian/data/provider/TAItemModelProvider.java @@ -10,14 +10,12 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.SlabBlock; import net.minecraft.world.level.block.StairBlock; -import net.minecraftforge.client.model.generators.ItemModelBuilder; import net.minecraftforge.client.model.generators.ItemModelProvider; import net.minecraftforge.client.model.generators.ModelFile; import net.minecraftforge.common.ForgeSpawnEggItem; import net.minecraftforge.common.data.ExistingFileHelper; import net.minecraftforge.registries.ForgeRegistries; -import java.util.Map; import java.util.Objects; @SuppressWarnings({"ConstantConditions", "unused"}) @@ -146,15 +144,18 @@ protected void registerModels() { private void bowItem(Item item) { String name = Objects.requireNonNull(ForgeRegistries.ITEMS.getKey(item)).getPath(); - Map pulls = Map.of(0, 0.0F, 1, 0.65F, 2, 0.9F); ModelFile.UncheckedModelFile bowModel = new ModelFile.UncheckedModelFile(this.modLoc("item/" + name)); - ItemModelBuilder modelBuilder = this.withExistingParent(name, this.modLoc("item/ta_bow")) - .texture("layer0", this.modLoc("item/" + name)); - for (int i = 0; i < pulls.size(); i++) { + this.withExistingParent(name, this.modLoc("item/ta_bow")) + .texture("layer0", this.modLoc("item/" + name)) + .override().predicate(this.mcLoc("pulling"), 1) + .model(new ModelFile.UncheckedModelFile(this.modLoc("item/" + name + "_pulling_0"))).end() + .override().predicate(this.mcLoc("pulling"), 1).predicate(this.mcLoc("pull"), 0.65F) + .model(new ModelFile.UncheckedModelFile(this.modLoc("item/" + name + "_pulling_1"))).end() + .override().predicate(this.mcLoc("pulling"), 1).predicate(this.mcLoc("pull"), 0.9F) + .model(new ModelFile.UncheckedModelFile(this.modLoc("item/" + name + "_pulling_2"))).end(); + for (int i = 0; i < 3; i++) { String path = name + "_pulling_" + i; this.getBuilder(path).parent(bowModel).texture("layer0", this.modLoc("item/" + path)); - modelBuilder.override().predicate(this.mcLoc("pulling"), 1).predicate(this.mcLoc("pull"), pulls.get(i)) - .model(new ModelFile.UncheckedModelFile(this.modLoc("item/" + path))).end(); } } diff --git a/src/main/java/cn/teampancake/theaurorian/data/provider/lang/TALanguageProviderENUS.java b/src/main/java/cn/teampancake/theaurorian/data/provider/lang/TALanguageProviderENUS.java index c63b834b..3dce5a04 100644 --- a/src/main/java/cn/teampancake/theaurorian/data/provider/lang/TALanguageProviderENUS.java +++ b/src/main/java/cn/teampancake/theaurorian/data/provider/lang/TALanguageProviderENUS.java @@ -1,6 +1,7 @@ package cn.teampancake.theaurorian.data.provider.lang; import cn.teampancake.theaurorian.AurorianMod; +import cn.teampancake.theaurorian.common.effect.TAMobEffect; import cn.teampancake.theaurorian.registry.*; import net.minecraft.data.PackOutput; import net.minecraftforge.common.data.LanguageProvider; @@ -315,6 +316,10 @@ protected void addTranslations() { this.add(TAEntityTypes.SPIDER_MOTHER.get(), "Spider Mother"); this.add(TAEntityTypes.MOON_QUEEN.get(), "Moon Queen"); + //MOB EFFECT + this.add(TAMobEffects.STUN.get(), "Stun"); + this.add(TAMobEffects.MOON_CURSE.get(), "Moon Curse"); + //MOD ENCHANTMENT this.add(TAEnchantments.LIGHTNING_RESISTANCE.get(), "Lightning Resistance"); this.add(TAEnchantments.LIGHTNING_DAMAGE.get(), "Lightning"); diff --git a/src/main/java/cn/teampancake/theaurorian/data/provider/lang/TALanguageProviderZHCN.java b/src/main/java/cn/teampancake/theaurorian/data/provider/lang/TALanguageProviderZHCN.java index d68d0ac6..d0bffc8d 100644 --- a/src/main/java/cn/teampancake/theaurorian/data/provider/lang/TALanguageProviderZHCN.java +++ b/src/main/java/cn/teampancake/theaurorian/data/provider/lang/TALanguageProviderZHCN.java @@ -315,6 +315,10 @@ protected void addTranslations() { this.add(TAEntityTypes.SPIDER_MOTHER.get(), "蛛母"); this.add(TAEntityTypes.MOON_QUEEN.get(), "皎月女王"); + //MOB EFFECT + this.add(TAMobEffects.STUN.get(), "眩晕"); + this.add(TAMobEffects.MOON_CURSE.get(), "皎月之咒"); + //MOD ENCHANTMENT this.add(TAEnchantments.LIGHTNING_RESISTANCE.get(), "雷电抵御"); this.add(TAEnchantments.LIGHTNING_DAMAGE.get(), "雷电"); diff --git a/src/main/java/cn/teampancake/theaurorian/data/provider/tag/TAItemTagsProvider.java b/src/main/java/cn/teampancake/theaurorian/data/provider/tag/TAItemTagsProvider.java index 5089b794..f272afac 100644 --- a/src/main/java/cn/teampancake/theaurorian/data/provider/tag/TAItemTagsProvider.java +++ b/src/main/java/cn/teampancake/theaurorian/data/provider/tag/TAItemTagsProvider.java @@ -25,6 +25,8 @@ public TAItemTagsProvider(PackOutput output, CompletableFuture> EYE_OF_DISTURBED = ENTITY_TYPES.register("eye_of_disturbed", () -> EntityType.Builder.of(EyeOfDisturbedEntity::new, MobCategory.MISC).sized(0.25F, 0.25F) - .clientTrackingRange(4).updateInterval(10).build("eye_of_disturbed")); + .clientTrackingRange(4).updateInterval(10).fireImmune().build("eye_of_disturbed")); //Animal public static final RegistryObject> AURORIAN_RABBIT = ENTITY_TYPES.register("aurorian_rabbit", () -> EntityType.Builder.of(AurorianRabbit::new, MobCategory.CREATURE).sized(0.4F, 0.5F) diff --git a/src/main/java/cn/teampancake/theaurorian/registry/TAItems.java b/src/main/java/cn/teampancake/theaurorian/registry/TAItems.java index 56bbb63e..14b33416 100644 --- a/src/main/java/cn/teampancake/theaurorian/registry/TAItems.java +++ b/src/main/java/cn/teampancake/theaurorian/registry/TAItems.java @@ -1,9 +1,11 @@ package cn.teampancake.theaurorian.registry; import cn.teampancake.theaurorian.AurorianMod; -import cn.teampancake.theaurorian.client.model.AurorianSteelArmorModel; import cn.teampancake.theaurorian.common.items.*; -import cn.teampancake.theaurorian.common.items.armor.*; +import cn.teampancake.theaurorian.common.items.armor.AurorianSteelArmor; +import cn.teampancake.theaurorian.common.items.armor.ceruleanArmor; +import cn.teampancake.theaurorian.common.items.armor.knightArmor; +import cn.teampancake.theaurorian.common.items.armor.spectralArmor; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.world.effect.MobEffectInstance; @@ -16,7 +18,6 @@ import java.util.Random; -import static cn.teampancake.theaurorian.common.items.ModArmorMaterials.*; import static cn.teampancake.theaurorian.utils.TAItemRegUtils.*; import static net.minecraft.world.item.ArmorItem.Type.*; @@ -153,7 +154,7 @@ public class TAItems { /** * BowItem */ - public static final RegistryObject SILENT_WOOD_BOW = ITEMS.register("silent_wood_bow", () -> new BowItem(new Item.Properties())); + public static final RegistryObject SILENT_WOOD_BOW = ITEMS.register("silent_wood_bow", () -> new BowItem(new Item.Properties().durability(384))); public static final RegistryObject KEEPERS_BOW = ITEMS.register("keepers_bow", KeepersBow::new); /** diff --git a/src/main/java/cn/teampancake/theaurorian/registry/TAMobEffects.java b/src/main/java/cn/teampancake/theaurorian/registry/TAMobEffects.java index b6b8c3a2..62bcb03c 100644 --- a/src/main/java/cn/teampancake/theaurorian/registry/TAMobEffects.java +++ b/src/main/java/cn/teampancake/theaurorian/registry/TAMobEffects.java @@ -2,15 +2,22 @@ import cn.teampancake.theaurorian.AurorianMod; import cn.teampancake.theaurorian.common.effect.StunEffect; +import cn.teampancake.theaurorian.common.effect.TAMobEffect; import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.effect.MobEffectCategory; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; + @Mod.EventBusSubscriber(modid = AurorianMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) public class TAMobEffects { + public static final DeferredRegister MOB_EFFECTS = DeferredRegister.create(ForgeRegistries.MOB_EFFECTS, AurorianMod.MOD_ID); - //STUN public static final RegistryObject STUN = MOB_EFFECTS.register("stun", StunEffect::new); -} + public static final RegistryObject MOON_CURSE = MOB_EFFECTS.register("moon_curse", () -> new TAMobEffect(MobEffectCategory.HARMFUL, 0x714bdb)); + +} \ No newline at end of file