Skip to content

Commit

Permalink
Fix some bugs of entity, resource files and so on.
Browse files Browse the repository at this point in the history
  • Loading branch information
Glyceryl6 committed Nov 29, 2023
1 parent 421e7b8 commit 1fe723e
Show file tree
Hide file tree
Showing 21 changed files with 165 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,82 @@
"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"
}
},
{
"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"
Expand All @@ -76,11 +86,10 @@
{
"apply": {
"model": "theaurorian:block/indigo_mushroom_block",
"uvlock": true,
"y": 270
"y": 180
},
"when": {
"west": "true"
"west": "false"
}
},
{
Expand All @@ -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
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,82 @@
"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"
}
},
{
"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"
Expand All @@ -76,11 +86,10 @@
{
"apply": {
"model": "theaurorian:block/indigo_mushroom_stem",
"uvlock": true,
"y": 270
"y": 180
},
"when": {
"west": "true"
"west": "false"
}
},
{
Expand All @@ -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
}
}
]
Expand Down
2 changes: 2 additions & 0 deletions src/generated/resources/assets/theaurorian/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions src/generated/resources/assets/theaurorian/lang/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "雷电抵御",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{
"model": "theaurorian:item/keepers_bow_pulling_0",
"predicate": {
"minecraft:pull": 0.0,
"minecraft:pulling": 1.0
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{
"model": "theaurorian:item/silent_wood_bow_pulling_0",
"predicate": {
"minecraft:pull": 0.0,
"minecraft:pulling": 1.0
}
},
Expand Down
6 changes: 6 additions & 0 deletions src/generated/resources/data/forge/tags/items/tools/bows.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"values": [
"theaurorian:silent_wood_bow",
"theaurorian:keepers_bow"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}
}
Original file line number Diff line number Diff line change
@@ -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);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Loading

0 comments on commit 1fe723e

Please sign in to comment.