Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Commit

Permalink
Mallard AI + Adding Armours and Tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Devin Louis committed Jan 29, 2021
1 parent f231254 commit 37fb2f8
Show file tree
Hide file tree
Showing 28 changed files with 119 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@
public class DevDisclaimer {
public static void init() {
// disclaimer text only shows in dev environment as of jan 27th. production build doesnt have it.
//if (FabricLoader.INSTANCE.isDevelopmentEnvironment()) {}
HudRenderCallback.EVENT.register((matrices, delta) -> {
MinecraftClient.getInstance().textRenderer
.drawWithShadow(matrices, PastelWonderland.PastelWonderlandVersion, 1, 1, 0xFFFFFF); // shoot me where it hurts most please.
});
if (FabricLoader.INSTANCE.isDevelopmentEnvironment()) {
HudRenderCallback.EVENT.register((matrices, delta) -> {
MinecraftClient.getInstance().textRenderer
.drawWithShadow(matrices, PastelWonderland.PastelWonderlandVersion, 1, 1, 0xFFFFFF); // shoot me where it hurts most please.
});

// renders Distribution text
HudRenderCallback.EVENT.register((matrices, delta) -> {
MinecraftClient.getInstance().textRenderer
.drawWithShadow(matrices, PastelWonderland.PastelWonderlandDistribution, 1, 10, 0xFFFFFF);
});

// renders Distribution text
HudRenderCallback.EVENT.register((matrices, delta) -> {
MinecraftClient.getInstance().textRenderer
.drawWithShadow(matrices, PastelWonderland.PastelWonderlandDistribution, 1, 10, 0xFFFFFF);
});
// Game FPS
HudRenderCallback.EVENT.register((matrices, delta) -> {
MinecraftClient.getInstance().textRenderer
.drawWithShadow(matrices, PastelWonderland.PastelWonderlandFPSDevelopment, 1, 20, 0xFFFFFF);
});

// Game FPS
HudRenderCallback.EVENT.register((matrices, delta) -> {
MinecraftClient.getInstance().textRenderer
.drawWithShadow(matrices, PastelWonderland.PastelWonderlandFPSDevelopment, 1, 20, 0xFFFFFF);
});

if (FabricLoader.INSTANCE.isDevelopmentEnvironment()) {
// renders Distribution text
HudRenderCallback.EVENT.register((matrices, delta) -> {
MinecraftClient.getInstance().textRenderer
Expand All @@ -35,3 +35,4 @@ public static void init() {
}
}
}

Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
package dev.hiitsdevin.pastelwonderland.Entities.Mallards;

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.ai.goal.*;
import net.minecraft.entity.attribute.EntityAttributes;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.mob.Angerable;
import net.minecraft.entity.passive.ChickenEntity;
import net.minecraft.entity.passive.PassiveEntity;
import net.minecraft.entity.passive.WolfEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.projectile.PersistentProjectileEntity;
import net.minecraft.item.Items;
import net.minecraft.recipe.Ingredient;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.sound.SoundEvent;
import net.minecraft.sound.SoundEvents;
import net.minecraft.world.World;
import org.jetbrains.annotations.Nullable;

import java.util.Objects;
import java.util.UUID;

public class MallardEntity extends ChickenEntity {
private static final Ingredient BREEDING_INGREDIENT;
Expand All @@ -25,10 +32,11 @@ public MallardEntity(EntityType<? extends ChickenEntity> entityType, World world
Objects.requireNonNull(this.getAttributeInstance(EntityAttributes.GENERIC_MOVEMENT_SPEED)).setBaseValue(0.25D);
}

@Override
public SoundEvent getAmbientSound() {
return SoundEvents.ENTITY_ENDERMAN_SCREAM;
}
// saved for when we actually find clean mallard sounds
//@Override
//public SoundEvent getAmbientSound() {
//return SoundEvents.ENTITY_ENDERMAN_SCREAM;
//}

@Override
public void initGoals() {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "pastelwonderland:item/pastel_boots"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "pastelwonderland:item/pastel_chestplate"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "pastelwonderland:item/pastel_helmet"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "pastelwonderland:item/pastel_leggings"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,52 @@
"entries": [
{
"type": "minecraft:item",
"name": "pastelwonderland:pastel_powder"
},
"name": "pastelwonderland:pastel_ingot",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 2,
"max": 4
}
}
]
}
],
"functions": [
{
"function": "minecraft:limit_count",
"limit": {
"min": 2,
"max": 4
}
}
]
},
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "pastelwonderland:pastel_ingot"
"name": "pastelwonderland:pastel_powder",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 3,
"max": 5
}
}
]
}
],
"functions": [
{
"function": "minecraft:limit_count",
"limit": {
"min": 3,
"max": 5
}
}
]
}
Expand Down
16 changes: 16 additions & 0 deletions src/main/resources/data/pastelwonderland/recipes/pastel_axe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" CC",
" AC",
"A "
],
"key": {
"C": {"item": "pastelwonderland:pastel_ingot"},
"A": {"item": "minecraft:stick"}
},
"result": {
"item": "pastelwonderland:pastel_axe",
"count": 1
}
}
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@
"weight": 8,
"minCount": 4,
"maxCount": 4
},
{
"type": "pastelwonderland:mallard",
"weight": 14,
"minCount": 5,
"maxCount": 5
}
],
"ambient": [],
Expand Down

0 comments on commit 37fb2f8

Please sign in to comment.