Skip to content
This repository was archived by the owner on Mar 3, 2022. It is now read-only.
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
6 changes: 5 additions & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@

- [ConnorTron110](https://github.com/ConnorTron110)
- Discord: `ConnorTron110#0110`
- [TeenagedLime3](https://github.com/TeenagedLime3)
- Discord `TeenagedLime3#4529`
- Youtube `https://www.youtube.com/channel/UCov5D-LLTM9nh2WPz5_LqOA`
- Twitch `https://twitch.tv/teenagedlime3`

## Assets

- Comso
- Discord: `Comso#1828`
- Created: the Raw Tin, Tin Ore, and Tin Ingot textures
- Created: the Raw Tin, Steel Blend, Steel Ingot, Damascus Ingot, Tin Ore, and Tin Ingot textures

## Miscellaneous

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ This uses the Forge modding API and targets Minecraft 1.18.
- Bronze Ingot, Block Of Bronze, Bronze Nugget, Bronze Tools (Sword, Pickaxe, Shovel, Axe and Hoe) and Bronze Armor
- Flint Tools (Sword, Pickaxe, Shovel, Axe, Hoe and Dagger)
- Jumprasher
- Steel: Ingot and Nugget (used in crafting of Damascus)
- Damascus: Damascus Ingot, Damascus

## Modifications

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package io.github.darealturtywurty.ancientology.common.items;

import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;

import javax.annotation.Nullable;
import java.util.List;

public class MjolnirItem extends Item {
public MjolnirItem(Properties pProperties) {
super(pProperties);
}

@Override
public void appendHoverText(ItemStack pstack, @Nullable Level plevel,
List<Component> pTooltipComponents, TooltipFlag pIsAdvanced) {
if (Screen.hasShiftDown()) {
pTooltipComponents.add(new TranslatableComponent("tooltip.ancientology.mjolnir"));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should really be a constant. Creating a new component every time this method is called, is very expensive.

} else {
pTooltipComponents.add(new TranslatableComponent("tooltip.ancientology.mjolnir.shift"));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as before, should be constant.

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package io.github.darealturtywurty.ancientology.common.items;

import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;

import javax.annotation.Nullable;
import java.util.List;

public class SchimitarItem extends Item {
public SchimitarItem(Properties pProperties) {
super(pProperties);
}

@Override
public void appendHoverText(ItemStack pstack, @Nullable Level plevel,
List<Component> pTooltipComponents, TooltipFlag pIsAdvanced) {
if (Screen.hasShiftDown()) {
pTooltipComponents.add(new TranslatableComponent("tooltip.ancientology.schimitar"));
} else {
pTooltipComponents.add(new TranslatableComponent("tooltip.ancientology.schimitar.shift"));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,13 @@

import io.github.darealturtywurty.ancientology.Ancientology;
import io.github.darealturtywurty.ancientology.common.items.ForbiddenFruitItem;
import io.github.darealturtywurty.ancientology.common.items.MjolnirItem;
import io.github.darealturtywurty.ancientology.common.items.SchimitarItem;
import io.github.darealturtywurty.ancientology.core.materials.ArmorMaterials;
import io.github.darealturtywurty.ancientology.core.materials.ToolMaterials;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ArmorItem;
import net.minecraft.world.item.AxeItem;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.DyeableArmorItem;
import net.minecraft.world.item.HoeItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.PickaxeItem;
import net.minecraft.world.item.Rarity;
import net.minecraft.world.item.ShovelItem;
import net.minecraft.world.item.SwordItem;
import net.minecraft.world.item.*;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
Expand All @@ -41,8 +34,8 @@ public final class ItemInit {
*/

// Resources
public static final RegistryObject<Item> RAW_TIN = ITEMS.register("raw_tin", () -> new Item(defaultProperties()));

public static final RegistryObject<Item> RAW_TIN = ITEMS.register("raw_tin",
() -> new Item(defaultProperties()));
public static final RegistryObject<Item> TIN_INGOT = ITEMS.register("tin_ingot",
() -> new Item(defaultProperties()));
public static final RegistryObject<Item> TIN_NUGGET = ITEMS.register("tin_nugget",
Expand All @@ -53,6 +46,14 @@ public final class ItemInit {
() -> new Item(defaultProperties()));
public static final RegistryObject<Item> BRONZE_NUGGET = ITEMS.register("bronze_nugget",
() -> new Item(defaultProperties()));
public static final RegistryObject<Item> STEEL_INGOT = ITEMS.register("steel_ingot",
() -> new Item(defaultProperties()));
public static final RegistryObject<Item> STEEL_NUGGET = ITEMS.register("steel_nugget",
() -> new Item(defaultProperties()));
public static final RegistryObject<Item> STEEL_BLEND = ITEMS.register("steel_blend",
() -> new Item(defaultProperties()));
public static final RegistryObject<Item> DAMASCUS_INGOT = ITEMS.register("damascus_ingot", //TODO THE DAMASCUS STEEL INGOT IS A PLACEHOLDER TEXTURE, COMSO SHOULD PROVIDE THE ACTUALL TEXTURE ON THE 13/02/22
() -> new Item(defaultProperties()));
// Tools
// TODO: Add Spears and Arrows
public static final RegistryObject<SwordItem> FLINT_DAGGER = ITEMS.register("flint_dagger",
Expand Down Expand Up @@ -106,6 +107,16 @@ public final class ItemInit {
() -> new ShovelItem(ToolMaterials.BRONZE, 1.5f, -3.0f, defaultProperties()));
public static final RegistryObject<HoeItem> BRONZE_HOE = ITEMS.register("bronze_hoe",
() -> new HoeItem(ToolMaterials.BRONZE, -1, -2.0f, defaultProperties()));

public static final RegistryObject<SwordItem> DAMASCUS_SWORD = ITEMS.register("damascus_sword",
() -> new SwordItem(ToolMaterials.DAMASCUS, 3, -2.4f, defaultProperties()));
public static final RegistryObject<MjolnirItem> MJOLNIR = ITEMS.register("mjolnir",
() -> new MjolnirItem(defaultProperties()));
public static final RegistryObject<AxeItem> DAMASCUS_AXE = ITEMS.register("damascus_axe",
() -> new AxeItem(ToolMaterials.DAMASCUS, 7, -3.2f, defaultProperties()));
public static final RegistryObject<SchimitarItem> SCIMITAR = ITEMS.register("scimitar",
() -> new SchimitarItem(defaultProperties()));

// Armor
public static final RegistryObject<ArmorItem> BRONZE_HELMET = ITEMS.register("bronze_helmet",
() -> new ArmorItem(ArmorMaterials.BRONZE, EquipmentSlot.HEAD, defaultProperties()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
public enum ToolMaterials implements Tier {
FLINT(0, 59, 2.0F, 0.0F, 15, () -> Ingredient.of(Items.FLINT)),
BONE(0, 59, 2.0F, 0.0F, 15, () -> Ingredient.of(Items.BONE)),
BRONZE(1, 131, 4.0F, 1.0F, 5, () -> Ingredient.of(ItemInit.BRONZE_INGOT.get()));
BRONZE(1, 131, 4.0F, 1.0F, 5, () -> Ingredient.of(ItemInit.BRONZE_INGOT.get())),
DAMASCUS(1, 131, 4.0F, 1.0F, 5, () -> Ingredient.of(ItemInit.BRONZE_INGOT.get()));

private final int level;
private final int uses;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
package io.github.darealturtywurty.ancientology.core.util.datastructures;

import java.util.Arrays;
import java.util.List;
import java.util.stream.IntStream;

import javax.annotation.Nullable;

import com.google.common.collect.Lists;

import io.github.darealturtywurty.ancientology.core.util.interfaces.OnChangedListener;
import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag;
Expand All @@ -21,6 +14,11 @@
import net.minecraftforge.items.wrapper.InvWrapper;
import net.minecraftforge.items.wrapper.SidedInvWrapper;

import javax.annotation.Nullable;
import java.util.Arrays;
import java.util.List;
import java.util.stream.IntStream;

public class SimpleContainer implements Container, IItemHandler, WorldlyContainer, INBTSerializable<CompoundTag> {
protected final ItemStack[] contents;
private final int stackLimit;
Expand Down Expand Up @@ -108,11 +106,12 @@ public IItemHandler getItemHandlerSided(Direction side) {
return new SidedInvWrapper(this, side);
}

/**
/*
* Get the array of {@link net.minecraft.item.ItemStack} inside this inventory.
*
* @return The items in this inventory.
*/

public ItemStack[] getItemStacks() {
return this.contents;
}
Expand Down
77 changes: 51 additions & 26 deletions src/main/resources/assets/ancientology/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,74 @@
{
//These errors don't affect the launching of the mod, if it causes an error for you open an issue in the github.

//Items
"item.ancientology.bronze_ingot": "Bronze Ingot",
"item.ancientology.bronze_nugget": "Bronze Nugget",
"item.ancientology.copper_nugget": "Copper Nugget",
"item.ancientology.tin_ingot": "Tin Ingot",
"item.ancientology.raw_tin": "Raw Tin",
"item.ancientology.tin_nugget": "Tin Nugget",
"item.ancientology.steel_nugget": "Steel Nugget",
"item.ancientology.steel_ingot": "Steel Ingot",
"item.ancientology.steel_blend": "Steel Blend",
"item.ancientology.damascus_ingot": "Damascus Ingot",
"item.ancientology.forbidden_fruit": "Forbidden Fruit",
//Blocks
"block.ancientology.bronze_block": "Block of Bronze",
"block.ancientology.tin_block": "Block of Tin",
"block.ancientology.deepslate_tin_ore": "Deepslate Tin Ore",
"block.ancientology.jumprasher": "Jumprasher",
"block.ancientology.life_leaves": "Leaves of Life",
"block.ancientology.life_log": "Log of Life",
"block.ancientology.life_planks": "Planks of Life",
"block.ancientology.life_sapling": "Sapling of Life",
"block.ancientology.tin_block": "Block of Tin",
"item.ancientology.bone_axe": "Bone Axe",
"item.ancientology.bone_boots": "Bone Boots",
"item.ancientology.bone_chestplate": "Bone Chestplate",
"item.ancientology.bone_dagger": "Bone Dagger",
"block.ancientology.jumprasher": "Jumprasher",
//Armor
"item.ancientology.bronze_helmet": "Bronze Helmet",
"item.ancientology.bronze_chestplate": "Bronze Chestplate",
"item.ancientology.bronze_leggings": "Bronze Leggings",
"item.ancientology.bronze_boots": "Bronze Boots",

"item.ancientology.bone_helmet": "Bone Helmet",
"item.ancientology.bone_hoe": "Bone Hoe",
"item.ancientology.bone_chestplate": "Bone Chestplate",
"item.ancientology.bone_leggings": "Bone Leggings",
"item.ancientology.bone_pickaxe": "Bone Pickaxe",
"item.ancientology.bone_shovel": "Bone Shovel",
"item.ancientology.bone_boots": "Bone Boots",
//Tools
"item.ancientology.bronze_axe": "Bronze Axe",
"item.ancientology.bronze_boots": "Bronze Boots",
"item.ancientology.bronze_chestplate": "Bronze Chestplate",
"item.ancientology.bronze_helmet": "Bronze Helmet",
"item.ancientology.bronze_hoe": "Bronze Hoe",
"item.ancientology.bronze_ingot": "Bronze Ingot",
"item.ancientology.bronze_leggings": "Bronze Leggings",
"item.ancientology.bronze_nugget": "Bronze Nugget",
"item.ancientology.bronze_pickaxe": "Bronze Pickaxe",
"item.ancientology.bronze_shovel": "Bronze Shovel",
"item.ancientology.bronze_hoe": "Bronze Hoe",
"item.ancientology.bronze_sword": "Bronze Sword",
"item.ancientology.copper_nugget": "Copper Nugget",

"item.ancientology.bone_axe": "Bone Axe",
"item.ancientology.bone_pickaxe": "Bone Pickaxe",
"item.ancientology.bone_shovel": "Bone Shovel",
"item.ancientology.bone_hoe": "Bone Hoe",
"item.ancientology.bone_dagger": "Bone Dagger",

"item.ancientology.flint_axe": "Flint Axe",
"item.ancientology.flint_dagger": "Flint Dagger",
"item.ancientology.flint_hoe": "Flint Hoe",
"item.ancientology.flint_pickaxe": "Flint Pickaxe",
"item.ancientology.flint_shovel": "Flint Shovel",
"item.ancientology.raw_tin": "Raw Tin",
"item.ancientology.tin_ingot": "Tin Ingot",
"item.ancientology.tin_nugget": "Tin Nugget",
"itemGroup.ancientology": "Ancientology",
"item.ancientology.forbidden_fruit": "Forbidden Fruit",
"item.ancientology.flint_hoe": "Flint Hoe",
"item.ancientology.flint_dagger": "Flint Dagger",

"item.ancientology.damascus_sword": "Damascus Sword",
"item.ancientology.mjolnir": "Mjolnir",
"item.ancientology.damascus_axe": "Damascus Axe",
"item.ancientology.scimitar": "Scimitar",
//Tooltips
"tooltip.ancientology.mjolnir.shift": "Hold §3SHIFT§3 §ffor more information",
"tooltip.ancientology.mjolnir": "The hammer of the god thor in Norse mythology (a weapon)",
"tooltip.ancientology.schimitar.shift": "Hold §3SHIFT§3 §ffor more information",
"tooltip.ancientology.schimitar": "A is a single-edged §6sword§6, §fassociated with Middle Eastern, South Asian or North African Cultures",
//Messages
"msg.ancientology.fruit_arrow_rain": "Heavenly arrows have come from above.",
"msg.ancientology.fruit_chance": "God has given you a second chance. Do not waste it.",
"msg.ancientology.fruit_give_bad_effect": "Sickness has befallen upon you. Don't disobey God.",
"msg.ancientology.fruit_give_good_effect": "You disobeyed God. You were not disappointed.",
"msg.ancientology.fruit_give_item": "You disobeyed God. You were not disappointed.",
"msg.ancientology.fruit_hunger": "God has stricken you with irony.",
"msg.ancientology.fruit_lightning": "You've invoked the wrath of God.",
"msg.ancientology.fruit_nether": "God has banished you to Hell."
}
"msg.ancientology.fruit_nether": "God has banished you to Hell.",
//Misc
"itemGroup.ancientology": "Ancientology"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "ancientology:item/damascus_axe"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "ancientology:item/damascus_ingot"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "ancientology:item/damascus_sword"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "ancientology:item/mjolnir"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "ancientology:item/scimitar"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "ancientology:item/steel_blend"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "ancientology:item/steel_ingot"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "ancientology:item/steel_nugget"
}
}
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.
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.
16 changes: 16 additions & 0 deletions src/main/resources/data/forge/tags/items/bone.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"replace": false,
"values": [
"ancientology:bone_arrow",
"ancientology:bone_axe",
"ancientology:bone_boots",
"ancientology:bone_chestplate",
"ancientology:bone_dagger",
"ancientology:bone_helmet",
"ancientology:bone_hoe",
"ancientology:bone_leggings",
"ancientology:bone_pickaxe",
"ancientology:bone_shovel",
"ancientology:bone_spear"
]
}
16 changes: 16 additions & 0 deletions src/main/resources/data/forge/tags/items/bronze.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"replace": false,
"values": [
"ancientology:bronze_arrow",
"ancientology:bronze_axe",
"ancientology:bronze_boots",
"ancientology:bronze_chestplate",
"ancientology:bronze_dagger",
"ancientology:bronze_helmet",
"ancientology:bronze_hoe",
"ancientology:bronze_leggings",
"ancientology:bronze_pickaxe",
"ancientology:bronze_shovel",
"ancientology:bronze_spear"
]
}
Loading