Advancements and recipes

This commit is contained in:
ACGaming 2020-08-30 17:56:27 +02:00
parent 5e1bd6d4b1
commit 9077d875b8
15 changed files with 239 additions and 16 deletions

View file

@ -70,14 +70,35 @@ public class EntityFriedrichLiechtenstein extends EntityCreature implements IMer
if (itemstack.isEmpty())
{
player.setHeldItem(hand, new ItemStack(ModItems.AHOJ_BRAUSE_DRINK));
}
else if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.AHOJ_BRAUSE_DRINK)))
} else if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.AHOJ_BRAUSE_DRINK)))
{
player.dropItem(new ItemStack(ModItems.AHOJ_BRAUSE_DRINK), false);
}
return true;
}
else if (itemstack.getItem() == Items.PAPER)
{
player.playSound(ModSoundEvents.ENTITY_FRIEDRICH_AMBIENT, 1.0F, 1.0F);
for (int i = 0; i < 7; ++i)
{
double d0 = this.rand.nextGaussian() * 0.02D;
double d1 = this.rand.nextGaussian() * 0.02D;
double d2 = this.rand.nextGaussian() * 0.02D;
this.world.spawnParticle(EnumParticleTypes.VILLAGER_HAPPY, this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width, this.posY + 0.5D + this.rand.nextFloat() * this.height, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width, d0, d1, d2);
}
itemstack.shrink(1);
if (itemstack.isEmpty())
{
player.setHeldItem(hand, new ItemStack(ModItems.AHOJ_BRAUSE));
} else if (!player.inventory.addItemStackToInventory(new ItemStack(ModItems.AHOJ_BRAUSE)))
{
player.dropItem(new ItemStack(ModItems.AHOJ_BRAUSE), false);
}
return true;
}
else
{
return super.processInteract(player, hand);

View file

@ -5,7 +5,6 @@ import mod.acgaming.spackenmobs.misc.ModConfigs;
import mod.acgaming.spackenmobs.misc.ModItems;
import mod.acgaming.spackenmobs.misc.ModLootTableList;
import mod.acgaming.spackenmobs.misc.ModSoundEvents;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityAgeable;
import net.minecraft.entity.SharedMonsterAttributes;
@ -23,8 +22,6 @@ import net.minecraft.network.datasync.EntityDataManager;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.*;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.Set;

View file

@ -3,11 +3,7 @@ package mod.acgaming.spackenmobs.items;
import mod.acgaming.spackenmobs.Spackenmobs;
import mod.acgaming.spackenmobs.misc.ModItems;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

View file

@ -103,7 +103,7 @@ public class ModConfigs
@Name("Smava Creeper max group size:")
public static int SmavaCreeper_max = 4;
@Name("WolfMZTE spawn probability:")
public static int WolfMZTE_weight = 50;
public static int WolfMZTE_weight = 25;
@Name("WolfMZTE min group size:")
public static int WolfMZTE_min = 1;
@Name("WolfMZTE max group size:")

View file

@ -0,0 +1,26 @@
{
"display": {
"icon": {
"item": "spackenmobs:ahoj_brause"
},
"title": {
"translate": "advancements.general.ahoj_brause.title"
},
"description": {
"translate": "advancements.general.ahoj_brause.description"
}
},
"parent": "spackenmobs:general/root",
"criteria": {
"ahoj_brause": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "spackenmobs:ahoj_brause"
}
]
}
}
}
}

View file

@ -0,0 +1,26 @@
{
"display": {
"icon": {
"item": "spackenmobs:ahoj_brause_drink"
},
"title": {
"translate": "advancements.general.ahoj_brause_drink.title"
},
"description": {
"translate": "advancements.general.ahoj_brause_drink.description"
}
},
"parent": "spackenmobs:general/root",
"criteria": {
"ahoj_brause_drink": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "spackenmobs:ahoj_brause_drink"
}
]
}
}
}
}

View file

@ -0,0 +1,26 @@
{
"display": {
"icon": {
"item": "spackenmobs:ram"
},
"title": {
"translate": "advancements.general.ram.title"
},
"description": {
"translate": "advancements.general.ram.description"
}
},
"parent": "spackenmobs:general/root",
"criteria": {
"ram": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "spackenmobs:ram"
}
]
}
}
}
}

View file

@ -0,0 +1,26 @@
{
"display": {
"icon": {
"item": "spackenmobs:ram_on_a_stick"
},
"title": {
"translate": "advancements.general.ram_on_a_stick.title"
},
"description": {
"translate": "advancements.general.ram_on_a_stick.description"
}
},
"parent": "spackenmobs:general/root",
"criteria": {
"ram_on_a_stick": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "spackenmobs:ram_on_a_stick"
}
]
}
}
}
}

View file

@ -0,0 +1,24 @@
{
"display": {
"icon": {
"item": "spackenmobs:surstroemming"
},
"title": {
"translate": "advancements.spackenmobs.root.title"
},
"description": {
"translate": "advancements.spackenmobs.root.description"
},
"background": "minecraft:textures/gui/advancements/backgrounds/stone.png",
"show_toast": false,
"announce_to_chat": false
},
"criteria": {
"entered_overworld": {
"trigger": "minecraft:changed_dimension",
"conditions": {
"to": "overworld"
}
}
}
}

View file

@ -0,0 +1,26 @@
{
"display": {
"icon": {
"item": "spackenmobs:surstroemming"
},
"title": {
"translate": "advancements.general.surstroemming.title"
},
"description": {
"translate": "advancements.general.surstroemming.description"
}
},
"parent": "spackenmobs:general/root",
"criteria": {
"surstroemming": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "spackenmobs:surstroemming"
}
]
}
}
}
}

View file

@ -1,3 +1,15 @@
advancements.general.ahoj_brause.description=Töte oder handle mit Friedrich Liechtenstein und erhalte Ahoj-Brause Brausepulver
advancements.general.ahoj_brause.title=Das pulvert mich richtig 'n bisschen auf
advancements.general.ahoj_brause_drink.description=Melke Friedrich Liechtenstein und erhalte eine Ahoj-Brause Brause
advancements.general.ahoj_brause_drink.title=Diese Brause ist enorm
advancements.general.ram.description=Töte einen Jens und erhalte Corsair RAM
advancements.general.ram.title=MemTest
advancements.general.ram_on_a_stick.description=Stelle eine RAM-Rute her, um Jens zu reiten
advancements.general.ram_on_a_stick.title=Yes, jetzt geht's los
advancements.general.surstroemming.description=Füttere Jens mit Fisch und erhalte Surströmming
advancements.general.surstroemming.title=Lecker
advancements.spackenmobs.root.description=Betritt die Welt der Spackenmobs
advancements.spackenmobs.root.title=Spackenmobs
entity.apored.name=ApoRed
entity.bakamitai_creeper.name=Baka Mitai-Creeper
entity.drachenlord.name=Drachenlord
@ -10,10 +22,10 @@ entity.mr_bean.name=Mr. Bean
entity.schalker.name=Schalker
entity.smava_creeper.name=Smava-Creeper
entity.wolfmzte.name=WolfMZTE
item.ahoj_brause.name=Ahoj-Brause Brausepulver
item.ahoj_brause_drink.name=Ahoj-Brause Brause
item.ram.name=RAM
item.ram_on_a_stick.name=RAM-Rute
item.surstroemming.name=Surströmming
item.ahoj_brause.name=Ahoj-Brause
item.ahoj_brause_drink.name=Ahoj-Brause Brause
itemGroup.tabSpackenmobs=Spackenmobs
itemGroup.spackenmobs=Spackenmobs
spackenmobs.config.title=Spackenmobs-Einstellungen

View file

@ -1,3 +1,15 @@
advancements.general.ahoj_brause.description=Kill or trade with Friedrich Liechtenstein and get Ahoj-Brause Soda Powder
advancements.general.ahoj_brause.title=Das pulvert mich richtig 'n bisschen auf
advancements.general.ahoj_brause_drink.description=Milk a Friedrich Liechtenstein and get an Ahoj-Brause Soda
advancements.general.ahoj_brause_drink.title=Diese Brause ist enorm
advancements.general.ram.description=Kill a Jens and get Corsair RAM
advancements.general.ram.title=MemTest
advancements.general.ram_on_a_stick.description=Craft a RAM On A Stick to ride Jens
advancements.general.ram_on_a_stick.title=Yes, jetzt geht's los
advancements.general.surstroemming.description=Feed Jens with fish and get surströmming
advancements.general.surstroemming.title=Lecker
advancements.spackenmobs.root.description=Enter the world of Spackenmobs
advancements.spackenmobs.root.title=Spackenmobs
entity.apored.name=ApoRed
entity.bakamitai_creeper.name=Baka Mitai Creeper
entity.drachenlord.name=Drachenlord
@ -10,10 +22,10 @@ entity.mr_bean.name=Mr. Bean
entity.schalker.name=Schalker
entity.smava_creeper.name=Smava Creeper
entity.wolfmzte.name=WolfMZTE
item.ahoj_brause.name=Ahoj-Brause Soda Powder
item.ahoj_brause_drink.name=Ahoj-Brause Soda
item.ram.name=RAM
item.ram_on_a_stick.name=RAM on a Stick
item.surstroemming.name=Surströmming
item.ahoj_brause.name=Ahoj-Brause
item.ahoj_brause_drink.name=Ahoj-Brause Soda
itemGroup.tabSpackenmobs=Spackenmobs
itemGroup.spackenmobs=Spackenmobs
spackenmobs.config.title=Spackenmobs settings

View file

@ -0,0 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [{
"item": "minecraft:glass_bottle"
},
{
"item": "spackenmobs:ahoj_brause"
}
],
"result": {
"item": "spackenmobs:ahoj_brause_drink"
}
}

View file

@ -0,0 +1,18 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"# ",
" X"
],
"key": {
"#": {
"item": "minecraft:fishing_rod"
},
"X": {
"item": "spackenmobs:ram"
}
},
"result": {
"item": "spackenmobs:ram_on_a_stick"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB