Skip to content

Commit

Permalink
Commit lite changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lustyn committed Aug 1, 2016
1 parent a636105 commit d5d10c3
Show file tree
Hide file tree
Showing 28 changed files with 13 additions and 289 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugins {
*/
version = "1.0"
group= "club.krist.minimalperipherals" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "MinimalPeripherals-" + mcversion
archivesBaseName = "MinimalPeripherals-lite-" + mcversion

minecraft {
version = "1.8.9-11.15.1.1902-1.8.9"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

/**
Expand Down
17 changes: 0 additions & 17 deletions src/main/java/club/krist/minimalperipherals/block/BlockSteel.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ public static void init() {
register(Item.getItemFromBlock(ModBlocks.chat_box));
register(Item.getItemFromBlock(ModBlocks.iron_noteblock));
register(Item.getItemFromBlock(ModBlocks.circuit_block));
register(Item.getItemFromBlock(ModBlocks.steel_block));
register(ModItems.electronic_helmet);
register(ModItems.electronic_chestplate);
register(ModItems.electronic_leggings);
register(ModItems.electronic_boots);
register(ModItems.steel_ingot);
}

private static void register(Item item) {
Expand Down
10 changes: 0 additions & 10 deletions src/main/java/club/krist/minimalperipherals/init/ModBlocks.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
package club.krist.minimalperipherals.init;

import club.krist.minimalperipherals.MinimalPeripherals;
import club.krist.minimalperipherals.block.BlockChatBox;
import club.krist.minimalperipherals.block.BlockIronNoteblock;
import club.krist.minimalperipherals.block.BlockSteel;
import club.krist.minimalperipherals.block.BlockTest;
import club.krist.minimalperipherals.reference.Reference;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;

/**
Expand All @@ -21,12 +13,10 @@ public class ModBlocks {
public static BlockTest circuit_block = new BlockTest();
public static BlockChatBox chat_box = new BlockChatBox();
public static BlockIronNoteblock iron_noteblock = new BlockIronNoteblock();
public static BlockSteel steel_block = new BlockSteel();

public static void init() {
GameRegistry.registerBlock(circuit_block, circuit_block.getName());
GameRegistry.registerBlock(chat_box, chat_box.getName());
GameRegistry.registerBlock(iron_noteblock, iron_noteblock.getName());
GameRegistry.registerBlock(steel_block, steel_block.getName());
}
}
23 changes: 1 addition & 22 deletions src/main/java/club/krist/minimalperipherals/init/ModItems.java
Original file line number Diff line number Diff line change
@@ -1,32 +1,11 @@
package club.krist.minimalperipherals.init;

import club.krist.minimalperipherals.MinimalPeripherals;
import club.krist.minimalperipherals.item.ItemElectronicArmor;
import club.krist.minimalperipherals.item.ItemMinimal;
import club.krist.minimalperipherals.item.ItemMinimalArmor;
import club.krist.minimalperipherals.item.ItemSteelIngot;
import club.krist.minimalperipherals.reference.Reference;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;

/**
* Created by justy on 7/6/2016.
*/
public class ModItems {

public static ItemElectronicArmor electronic_helmet = new ItemElectronicArmor(1, 0);
public static ItemElectronicArmor electronic_chestplate = new ItemElectronicArmor(1, 1);
public static ItemElectronicArmor electronic_leggings = new ItemElectronicArmor(2, 2);
public static ItemElectronicArmor electronic_boots = new ItemElectronicArmor(1, 3);
public static ItemSteelIngot steel_ingot = new ItemSteelIngot();

public static void init() {
GameRegistry.registerItem(electronic_helmet, electronic_helmet.getName());
GameRegistry.registerItem(electronic_chestplate, electronic_chestplate.getName());
GameRegistry.registerItem(electronic_leggings, electronic_leggings.getName());
GameRegistry.registerItem(electronic_boots, electronic_boots.getName());
GameRegistry.registerItem(steel_ingot, steel_ingot.getName());

}
}
13 changes: 1 addition & 12 deletions src/main/java/club/krist/minimalperipherals/init/ModRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,8 @@ public static void init() {
//Circuit Block
GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.circuit_block, 4), new Object[]{new ItemStack(Items.dye, 1, 2), new ItemStack(Items.redstone), new ItemStack(Items.gold_ingot)});

//Electronic Armor
GameRegistry.addRecipe(new ItemStack(ModItems.electronic_helmet), "$#$", "# #", '$', ModBlocks.circuit_block, '#', ModItems.steel_ingot);
GameRegistry.addRecipe(new ItemStack(ModItems.electronic_chestplate), "# #", "$#$", "#$#", '#', ModItems.steel_ingot, '$', ModBlocks.circuit_block);
GameRegistry.addRecipe(new ItemStack(ModItems.electronic_leggings), "#$#", "$ $", "# #", '#', ModItems.steel_ingot, '$', ModBlocks.circuit_block);
GameRegistry.addRecipe(new ItemStack(ModItems.electronic_boots), "$ $", "# #", '#', ModItems.steel_ingot, '$', ModBlocks.circuit_block);

//Steel
GameRegistry.addSmelting(Items.iron_ingot, new ItemStack(ModItems.steel_ingot), 0.7F);
GameRegistry.addRecipe(new ItemStack(ModBlocks.steel_block), "###", "###", "###", '#', ModItems.steel_ingot);
GameRegistry.addShapelessRecipe(new ItemStack(ModItems.steel_ingot, 9), new Object[]{new ItemStack(ModBlocks.steel_block)});

//ChatBox & Iron Noteblock
GameRegistry.addRecipe(new ItemStack(ModBlocks.chat_box), "#$#", "$%$", "#$#", '$', ModBlocks.circuit_block, '#', Items.gold_ingot, '%', Items.redstone);
GameRegistry.addRecipe(new ItemStack(ModBlocks.iron_noteblock), "#$#", "$%$", "#$#", '$', ModBlocks.circuit_block, '#', ModItems.steel_ingot, '%', Items.redstone);
GameRegistry.addRecipe(new ItemStack(ModBlocks.iron_noteblock), "#$#", "$%$", "#$#", '$', ModBlocks.circuit_block, '#', Items.iron_ingot, '%', Items.redstone);
}
}

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 10 additions & 0 deletions src/main/java/club/krist/minimalperipherals/tile/TileChatBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
public class TileChatBox extends TilePeripheral {
public static final String name = "chat_box";
protected static ArrayList<TileChatBox> chat_boxes = new ArrayList<TileChatBox>();
protected static HashMap<TileChatBox, Integer> chat_times = new HashMap<TileChatBox, Integer>();

public TileChatBox() {
chat_boxes.add(this);
chat_times.put(this, 0);
}

@LuaMethod
Expand All @@ -46,6 +48,10 @@ public boolean say(Object[] arguments) throws LuaException {
pre = (String) arguments[2];
}

if (System.currentTimeMillis() - chat_times.get(this) < 1000) {
throw new LuaException("Throttled. Max message per second of 1.");
}

String message = (String) arguments[0];
String formatted_message = String.format("%s[%d,%d,%d] %s: %s", pre, getPos().getX(), getPos().getY(), getPos().getZ(), label, message);
sendMessage(formatted_message);
Expand All @@ -68,6 +74,10 @@ public boolean tell(Object[] arguments) throws LuaException {
label = (String) arguments[2];
}

if (System.currentTimeMillis() - chat_times.get(this) < 1000) {
throw new LuaException("Throttled. Max message per second of 1.");
}

String pre = "";
if (arguments.length > 3) {
if (!(arguments[3] instanceof String))
Expand Down

This file was deleted.

12 changes: 0 additions & 12 deletions src/main/resources/assets/minimalperipherals/lang/en_US.lang
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
#Electronic Armor
item.minimalperipherals:electronic_helmet.name=Electronic Helmet
item.minimalperipherals:electronic_chestplate.name=Electronic Chestplate
item.minimalperipherals:electronic_leggings.name=Electronic Leggings
item.minimalperipherals:electronic_boots.name=Electronic Boots

#Steel Ingot
item.minimalperipherals:steel_ingot.name=Steel Ingot

#Steel Block
tile.minimalperipherals:steel_block.name=Steel Block

#Circuit Block
tile.minimalperipherals:circuit_block.name=Circuit Block

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit d5d10c3

Please sign in to comment.