Skip to content

Commit

Permalink
1.0.1.1 update:
Browse files Browse the repository at this point in the history
-Fixed launch crash (again, oops...)
-Added Custom tabs for Mirrors and other items from this mod
  • Loading branch information
CodenameRevy committed Sep 25, 2019
1 parent 8b01c06 commit 955911c
Show file tree
Hide file tree
Showing 25 changed files with 190 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

version = '1.0.1.0'
version = '1.0.1.1'
group = 'com.codenamerevy.magicmirror' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'magicmirror'

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/codenamerevy/magicmirror/MagicMirror.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.codenamerevy.magicmirror;

import com.codenamerevy.magicmirror.tabs.MirrorsItemGroup;
import com.codenamerevy.magicmirror.util.Reference;
import net.minecraft.item.ItemGroup;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
Expand All @@ -9,6 +11,8 @@
@Mod(Reference.MODID)
public class MagicMirror
{
public static final ItemGroup MAGIC_MIRRORS = new MirrorsItemGroup("magic_mirrors");

public MagicMirror()
{
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
Expand Down
40 changes: 32 additions & 8 deletions src/main/java/com/codenamerevy/magicmirror/init/ItemInit.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package com.codenamerevy.magicmirror.init;

import com.codenamerevy.magicmirror.MagicMirror;
import com.codenamerevy.magicmirror.items.ItemBase;
import com.codenamerevy.magicmirror.items.ItemDimensionalMirror;
import com.codenamerevy.magicmirror.items.ItemMagicMirror;
import com.codenamerevy.magicmirror.util.Reference;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;;
import net.minecraft.item.Rarity;
import net.minecraft.util.ResourceLocation;

import java.util.ArrayList;
Expand All @@ -14,14 +17,35 @@ public class ItemInit
{
public static final List<Item> ITEMS = new ArrayList<Item>();

public static final Item MAGIC_MIRROR = new ItemMagicMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("magic_mirror"));
public static final Item ICE_MIRROR = new ItemMagicMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("ice_mirror"));

//TODO: FIX ItemDimensionalMirror class
public static final Item DIMENSIONAL_MIRROR = new ItemDimensionalMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("dimensional_mirror"));
public static final Item DIMENSIONAL_MIRROR_ICE = new ItemDimensionalMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("dimensional_mirror_ice"));


//Regular Mirrors
public static final Item MAGIC_MIRROR = new ItemMagicMirror(new Item.Properties().group(MagicMirror.MAGIC_MIRRORS).maxStackSize(1)).setRegistryName(location("magic_mirror"));
public static final Item ICE_MIRROR = new ItemMagicMirror(new Item.Properties().group(MagicMirror.MAGIC_MIRRORS).maxStackSize(1)).setRegistryName(location("ice_mirror"));
/**public static final Item MAGIC_MIRROR_JUNGLE = new ItemMagicMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("magic_mirror_jungle"));
public static final Item MAGIC_MIRROR_DESERT = new ItemMagicMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("magic_mirror_desert.json"));
public static final Item MAGIC_MIRROR_OCEAN = new ItemMagicMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("magic_mirror_ocean.json"));
public static final Item MAGIC_MIRROR_CARTOGRAPHER = new ItemMagicMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("magic_mirror_cartographer"));
public static final Item MAGIC_MIRROR_MANSION = new ItemMagicMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("magic_mirror_mansion"));
public static final Item MAGIC_MIRROR_LIBRARY = new ItemMagicMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("magic_mirror_library"));
**/
//Dimensional Mirrors
public static final Item DIMENSIONAL_MIRROR = new ItemDimensionalMirror(new Item.Properties().group(MagicMirror.MAGIC_MIRRORS).maxStackSize(1)).setRegistryName(location("dimensional_mirror"));
public static final Item DIMENSIONAL_MIRROR_ICE = new ItemDimensionalMirror(new Item.Properties().group(MagicMirror.MAGIC_MIRRORS).maxStackSize(1)).setRegistryName(location("dimensional_mirror_ice"));
/**public static final Item DIMENSIONAL_MIRROR_JUNGLE = new ItemDimensionalMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("dimensional_mirror_jungle"));
public static final Item DIMENSIONAL_MIRROR_DESERT = new ItemDimensionalMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("dimensional_mirror_desert"));
public static final Item DIMENSIONAL_MIRROR_END = new ItemDimensionalMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("dimensional_mirror_end.json"));
public static final Item DIMENSIONAL_MIRROR_OCEAN = new ItemDimensionalMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("dimensional_mirror_ocean"));
public static final Item DIMENSIONAL_MIRROR_CARTOGRAPHER = new ItemDimensionalMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("dimensional_mirror_cartographer"));
public static final Item DIMENSIONAL_MIRROR_MANSION = new ItemDimensionalMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("dimensional_mirror_mansion"));
public static final Item DIMENSIONAL_MIRROR_LIBRARY = new ItemDimensionalMirror(new Item.Properties().group(ItemGroup.TOOLS).maxStackSize(1)).setRegistryName(location("dimensional_mirror_library"));
**/
//Materials
/**public static final Item DIMENSION_CRYSTAL = new ItemBase(new Item.Properties().group(ItemGroup.MATERIALS)).setRegistryName(location("dimension_crystal"));
//TODO: Add Config files
public static final Item MIRROR_FRAME = new ItemBase(new Item.Properties()).setRegistryName(location("mirror_frame"));
public static final Item ENCHANTED_MIRROR = new ItemBase(new Item.Properties().rarity(Rarity.RARE)).setRegistryName(location("enchanted_mirror"));
public static final Item BROKEN_MIRROR = new ItemBase(new Item.Properties()).setRegistryName(location("broken_mirror"));
public static final Item BROKEN_MIRROR_DIMENSIONAL = new ItemBase(new Item.Properties()).setRegistryName(location("broken_mirror_dimensional"));
**/
private static ResourceLocation location(String name)
{
return new ResourceLocation(Reference.MODID, name);
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/com/codenamerevy/magicmirror/items/ItemBase.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.codenamerevy.magicmirror.items;

import net.minecraft.item.Item;

public class ItemBase extends Item
{

public ItemBase(Properties properties)
{
super(properties);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.codenamerevy.magicmirror.tabs;

import com.codenamerevy.magicmirror.init.ItemInit;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;

public class MirrorsItemGroup extends ItemGroup
{
public MirrorsItemGroup(String label) {
super(label);
}

@Override
public ItemStack createIcon() {
return new ItemStack(ItemInit.MAGIC_MIRROR);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class Reference
{
public static final String MODID = "magicmirror";
public static final String NAME = "Magic Mirror";
public static final String VERSION = "1.0.1.0";
public static final String VERSION = "1.0.1.1";
public static final String MC_VERSION = "1.14.4";
public static final String CLIENT_PROXY = "com.codenamerevy.magicmirror.proxy.ClientProxy";
public static final String COMMON_PROXY = "com.codenamerevy.magicmirror.proxy.CommonProxy";
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ issueTrackerURL="https://github.com/CodenameRevy/-1.14.4-MagicMirror/issues"

[[mods]]
modId="magicmirror"
version="1.0.1.30
version="1.0.1.1"
displayName="Magic Mirrors"
displayURL="https://github.com/CodenameRevy/-1.14.4-MagicMirror"
logoFile="logo.png"
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/assets/magicmirror/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@
"chat.magicmirror.teleport": "Teleporting to your bed...",

"subtitle.magicmirror.teleport": "Teleport",
"subtitle.magicmirror.mirror_discharge": "Mirror Discharge"
"subtitle.magicmirror.mirror_discharge": "Mirror Discharge",

"itemGroup.magic_mirrors": "Magic Mirrors"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/broken_mirror"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/broken_mirror_dimensional"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/dimension_crystal"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/dimensional_mirror_cartographer"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/dimensional_mirror_desert"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/dimensional_mirror_end"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/dimensional_mirror_jungle"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/dimensional_mirror_library"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/dimensional_mirror_mansion"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/dimensional_mirror_ocean"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/enchanted_mirror"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/magic_mirror_cartographer"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/magic_mirror_desert"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/magic_mirror_jungle"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/magic_mirror_library"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/magic_mirror_mansion"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "item/generated",
"textures":
{
"layer0": "magicmirror:items/magic_mirror_ocean"
}
}

0 comments on commit 955911c

Please sign in to comment.