Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/generated/resources/assets/aether_ii/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@
"entity.aether_ii.arctic_snowball": "Arctic Snowball",
"entity.aether_ii.arctic_taegore": "Arctic Taegore",
"entity.aether_ii.arkenium_taluton": "Arkenium Taluton",
"entity.aether_ii.bladeshroom_hunter": "BladeShroom Hunter",
"entity.aether_ii.carrion_sprout": "Carrion Sprout",
"entity.aether_ii.cockatrice": "Cockatrice",
"entity.aether_ii.edward": "Edward",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"criteria": {
"kill_bladeshroom_hunter": {
"conditions": {
"entity": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"type": "aether_ii:bladeshroom_hunter"
}
}
]
},
"trigger": "minecraft:player_killed_entity"
},
"observe": {
"conditions": {
"player": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"type_specific": {
"type": "minecraft:player",
"looking_at": {
"type": "aether_ii:bladeshroom_hunter"
}
}
}
}
]
},
"trigger": "minecraft:location"
}
},
"requirements": [
[
"observe",
"kill_bladeshroom_hunter"
]
],
"sends_telemetry_event": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"description_key": "aether_ii.guidebook_bestiary.description.entity.aether_ii.bladeshroom_hunter",
"effect_resistances": [],
"entity_type": "aether_ii:bladeshroom_hunter",
"health": 18,
"icon": "aether_ii:guidebook/bestiary/bladeshroom_hunter",
"id": "aether_ii:bladeshroom_hunter",
"impact_defense": 3,
"loot_slots": [],
"name": "entity.aether_ii.bladeshroom_hunter",
"pierce_defense": 3,
"slash_defense": -2,
"slot_name": "entity.aether_ii.bladeshroom_hunter"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"advancement": "aether_ii:bestiary/observe_bladeshroom_hunter",
"entry": "aether_ii:bladeshroom_hunter",
"entry_values": [
"icon",
"name",
"slot_name",
"slot_subtitle",
"description_key",
"entity_type",
"health",
"slash_defense",
"impact_defense",
"pierce_defense",
"effect_resistance_0",
"effect_resistance_1",
"effect_resistance_2",
"effect_resistance_3",
"scale_multiplier",
"loot_0",
"loot_1",
"loot_2",
"food"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "minecraft:entity",
"random_sequence": "aether_ii:entities/bladeshroom_hunter"
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"aether_ii:cockatrice",
"aether_ii:arkenium_taluton",
"aether_ii:gravitite_taluton",
"aether_ii:bladeshroom_hunter",
"aether_ii:holystone_rock",
"aether_ii:arctic_snowball",
"aether_ii:skyroot_pinecone",
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/aetherteam/aetherii/AetherIIStats.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ public class AetherIIStats {
.put(AetherIIAttributes.IMPACT_RESISTANCE, 2.0)
.put(AetherIIAttributes.PIERCE_RESISTANCE, -2.0)
.build();
public static final ImmutableMap<Holder<Attribute>, Double> BLADE_SHROOM_HUNTER = ImmutableMap.<Holder<Attribute>, Double>builder()
.put(Attributes.MAX_HEALTH, 18.0)
.put(AetherIIAttributes.SLASH_RESISTANCE, -2.0)
.put(AetherIIAttributes.IMPACT_RESISTANCE, 3.0)
.put(AetherIIAttributes.PIERCE_RESISTANCE, 3.0)
.build();

private static ItemAttributeModifiers.Entry slashDamageModifer(double amount) {
return new ItemAttributeModifiers.Entry(AetherIIAttributes.SLASH_DAMAGE, new AttributeModifier(AetherIIItems.BASE_SLASH_DAMAGE_ID, amount, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public class BestiarySection extends DiscoverySection<BestiaryEntry, BestiaryEnt
AetherIIEntityTypes.SWET, AetherIIEntityTypes.AECHOR_PLANT, AetherIIEntityTypes.CARRION_SPROUT,
AetherIIEntityTypes.SKEPHID, AetherIIEntityTypes.ZEPHYR,
AetherIIEntityTypes.TEMPEST, AetherIIEntityTypes.COCKATRICE,
AetherIIEntityTypes.ARKENIUM_TALUTON, AetherIIEntityTypes.GRAVITITE_TALUTON
AetherIIEntityTypes.ARKENIUM_TALUTON, AetherIIEntityTypes.GRAVITITE_TALUTON,
AetherIIEntityTypes.BLADE_SHROOM_HUNTER
);
private static final ResourceLocation GUIDEBOOK_DISCOVERY_RIGHT_PAGE_BESTIARY_LOCATION = ResourceLocation.fromNamespaceAndPath(AetherII.MODID, "textures/gui/guidebook/discovery/guidebook_discovery_right_bestiary.png");
private static final ResourceLocation SLASH_SPRITE = ResourceLocation.fromNamespaceAndPath(AetherII.MODID, "guidebook/stats/slash");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public class AetherIIModelLayers {
public static final ModelLayerLocation CARRION_SPROUT = register("carrion_sprout");
public static final ModelLayerLocation ARKENIUM_TALUTON = register("arkenium_taluton");
public static final ModelLayerLocation GRAVITITE_TALUTON = register("gravitite_taluton");
public static final ModelLayerLocation BLADE_SHROOM_HUNTER = register("bladeshroom_hunter");

public static final ModelLayerLocation EDWARD = register("edward");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public static void registerEntityRenderers(EntityRenderersEvent.RegisterRenderer
event.registerEntityRenderer(AetherIIEntityTypes.SKEPHID.get(), SkephidRenderer::new);
event.registerEntityRenderer(AetherIIEntityTypes.ARKENIUM_TALUTON.get(), ArkeniumTalutonRenderer::new);
event.registerEntityRenderer(AetherIIEntityTypes.GRAVITITE_TALUTON.get(), GravititeTalutonRenderer::new);
event.registerEntityRenderer(AetherIIEntityTypes.BLADE_SHROOM_HUNTER.get(), BladeShroomHunterRenderer::new);

// NPCs
event.registerEntityRenderer(AetherIIEntityTypes.EDWARD.get(), EdwardRenderer::new);
Expand Down Expand Up @@ -176,6 +177,7 @@ public static void registerLayerDefinition(EntityRenderersEvent.RegisterLayerDef
event.registerLayerDefinition(AetherIIModelLayers.SKEPHID, SkephidModel::createBodyLayer);
event.registerLayerDefinition(AetherIIModelLayers.ARKENIUM_TALUTON, ArkeniumTalutonModel::createBodyLayer);
event.registerLayerDefinition(AetherIIModelLayers.GRAVITITE_TALUTON, GravititeTalutonModel::createBodyLayer);
event.registerLayerDefinition(AetherIIModelLayers.BLADE_SHROOM_HUNTER, BladeShroomHunterModel::createBodyLayer);

// Projectiles
event.registerLayerDefinition(AetherIIModelLayers.GRAVITITE_DEBRIS_SHOT, GravititeDebrisShotModel::createBodyLayer);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
package com.aetherteam.aetherii.client.renderer.entity;

import com.aetherteam.aetherii.AetherII;
import com.aetherteam.aetherii.client.renderer.AetherIIModelLayers;
import com.aetherteam.aetherii.client.renderer.entity.model.BladeShroomHunterModel;
import com.aetherteam.aetherii.client.renderer.entity.state.BladeShroomHunterRenderState;
import com.aetherteam.aetherii.entity.monster.BladeShroomHunter;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.client.renderer.entity.MobRenderer;
import net.minecraft.core.Direction;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Pose;

public class BladeShroomHunterRenderer<T extends BladeShroomHunter> extends MobRenderer<T, BladeShroomHunterRenderState, BladeShroomHunterModel<BladeShroomHunterRenderState>> {
private static final ResourceLocation LOCATION = ResourceLocation.fromNamespaceAndPath(AetherII.MODID, "textures/entity/mobs/bladeshroom_hunter/bladeshroom_hunter.png");

public BladeShroomHunterRenderer(EntityRendererProvider.Context context) {
super(context, new BladeShroomHunterModel<>(context.bakeLayer(AetherIIModelLayers.BLADE_SHROOM_HUNTER)), 0.5F);
}

@Override
public BladeShroomHunterRenderState createRenderState() {
return new BladeShroomHunterRenderState();
}

@Override
public void extractRenderState(T bladeShroom, BladeShroomHunterRenderState renderState, float p_361157_) {
super.extractRenderState(bladeShroom, renderState, p_361157_);
renderState.rotations = bladeShroom.getCellRotation();
renderState.prevRotations = bladeShroom.prevRotation;
renderState.attachDir = bladeShroom.getAttachFacing();
renderState.attachChangeProgress = bladeShroom.getAttachAmount(p_361157_);
renderState.attackAnimationState.copyFrom(bladeShroom.axeAttackAnimationState);
renderState.buryAnimationState.copyFrom(bladeShroom.buryAnimationState);
renderState.unburyAnimationState.copyFrom(bladeShroom.unburyAnimationState);
renderState.rustleAnimationState.copyFrom(bladeShroom.rustleAnimationState);
}

@Override
protected void setupRotations(BladeShroomHunterRenderState entity, PoseStack poseStack, float rotationYaw, float p_320045_) {
float trans = 8F / 16F;
if (entity.pose != Pose.SLEEPING) {
if (entity.attachDir == Direction.DOWN) {
super.setupRotations(entity, poseStack, rotationYaw, p_320045_);
} else {

float yaw = (float) Math.toDegrees(Mth.atan2(entity.rotations.x, entity.rotations.z));
float pitch = (float) -Math.toDegrees(Mth.atan2(entity.rotations.y, Math.sqrt(entity.rotations.x * entity.rotations.x + entity.rotations.z * entity.rotations.z)));
float prevYaw = (float) Math.toDegrees(Mth.atan2(entity.prevRotations.x, entity.prevRotations.z));
float prevPitch = (float) -Math.toDegrees(Mth.atan2(entity.prevRotations.y, Math.sqrt(entity.prevRotations.x * entity.prevRotations.x + entity.prevRotations.z * entity.prevRotations.z)));
float realYaw = yaw;
float realPitch = pitch;
poseStack.translate(0.0F, trans, 0.0F);

poseStack.mulPose(Axis.YP.rotationDegrees(realYaw));
poseStack.mulPose(Axis.XP.rotationDegrees(-90 + realPitch));
//poseStack.mulPose(Axis.YP.rotationDegrees(realDiff * realYaw));

poseStack.translate(0.0F, -trans - 4 / 16F, 0.0F);
super.setupRotations(entity, poseStack, 0.0F, p_320045_);
}
} else {
super.setupRotations(entity, poseStack, rotationYaw, p_320045_);
}
}


@Override
public ResourceLocation getTextureLocation(BladeShroomHunterRenderState renderState) {
return LOCATION;
}
}
Loading