Skip to content

Commit

Permalink
v2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Furgl committed Sep 2, 2016
1 parent 3ae9118 commit 14d01a5
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 32 deletions.
19 changes: 12 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# eclipse
bin
*.launch
/.settings
/.metadata
/.classpath
/.project
/eclipse
.settings
.metadata
.classpath
.project

# idea
out
Expand All @@ -18,9 +18,14 @@ build
.gradle

# other
/bin
eclipse
run
saves
screenshots
logs
config
crash-reports
world
whitelist.json
usercache.json
usernamecache.json
Expand All @@ -34,4 +39,4 @@ CREDITS-fml.txt
forge-*changelog.txt
LICENSE-fml.txt
MinecraftForge-*.txt
README.txt
README.txt
9 changes: 0 additions & 9 deletions LICENSE.md

This file was deleted.

2 changes: 0 additions & 2 deletions README.md

This file was deleted.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {

apply plugin: 'forge'

version = "1.7.10-2.0"
version = "1.7.10-2.1"
group= "furgl.autoPickup" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "AutoPickup"

Expand Down
3 changes: 3 additions & 0 deletions eula.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).
#Thu Sep 01 14:04:53 CDT 2016
eula=true
12 changes: 5 additions & 7 deletions src/main/java/furgl/autoPickup/AutoPickup.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package furgl.autoPickup;

import org.lwjgl.input.Keyboard;

import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
Expand All @@ -17,7 +15,6 @@
import furgl.autoPickup.event.EntityJoinWorldEvents;
import furgl.autoPickup.event.ItemTossEvents;
import furgl.autoPickup.event.PlaySoundAtEntityEvents;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
Expand All @@ -27,10 +24,11 @@ public class AutoPickup
{
public static final String MODID = "autopickup";
public static final String MODNAME = "AutoPickup";
public static final String VERSION = "2.0";
public static final String VERSION = "2.1";

public static SimpleNetworkWrapper network;
public static KeyBinding ignoreBlacklist = new KeyBinding("Ignore Blacklist", Keyboard.KEY_LMENU, "Auto Pickup");
@SidedProxy(clientSide = "furgl.autoPickup.ClientProxy", serverSide = "furgl.autoPickup.CommonProxy")
public static CommonProxy proxy;

@EventHandler
public void preInit(FMLPreInitializationEvent event)
Expand All @@ -44,7 +42,7 @@ public void preInit(FMLPreInitializationEvent event)
@EventHandler
public void init(FMLInitializationEvent event)
{
ClientRegistry.registerKeyBinding(ignoreBlacklist);
AutoPickup.proxy.init();
}


Expand Down
16 changes: 16 additions & 0 deletions src/main/java/furgl/autoPickup/ClientProxy.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package furgl.autoPickup;

import org.lwjgl.input.Keyboard;

import cpw.mods.fml.client.registry.ClientRegistry;
import net.minecraft.client.settings.KeyBinding;

public class ClientProxy extends CommonProxy
{
public KeyBinding ignoreBlacklist = new KeyBinding("Ignore Blacklist", Keyboard.KEY_LMENU, "Auto Pickup");

public void init()
{
ClientRegistry.registerKeyBinding(ignoreBlacklist);
}
}
6 changes: 3 additions & 3 deletions src/main/java/furgl/autoPickup/CommandBlacklist.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ private static Collection convertToDisplayNames(Set set)
{
try
{
Item item = getItemByText(null, (String) iterator.next());
Item item = getItemByText(null, (String) iterator.next());/*
ArrayList<ItemStack> subItems = new ArrayList<ItemStack>();
item.getSubItems(item, item.getCreativeTab(), subItems);
for (ItemStack stack : subItems)
displayNames.add((String) item.getItemStackDisplayName(stack).replace(" ", "_"));
for (ItemStack stack : subItems)*/
displayNames.add((String) item.getItemStackDisplayName(new ItemStack(item)).replace(" ", "_"));
}
catch (Exception e)
{
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/furgl/autoPickup/CommonProxy.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package furgl.autoPickup;

public class CommonProxy
{
public void init()
{

}
}
4 changes: 2 additions & 2 deletions src/main/java/furgl/autoPickup/IgnoreKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ public void playerTick(PlayerTickEvent event)
{
if (event.side == Side.CLIENT && event.phase == Phase.START)
{
if ((AutoPickup.ignoreBlacklist.isPressed() || AutoPickup.ignoreBlacklist.getIsKeyPressed()) != isPressed)
if ((((ClientProxy)AutoPickup.proxy).ignoreBlacklist.isPressed() || ((ClientProxy)AutoPickup.proxy).ignoreBlacklist.getIsKeyPressed()) != isPressed)
{
isPressed = AutoPickup.ignoreBlacklist.isPressed() || AutoPickup.ignoreBlacklist.getIsKeyPressed();
isPressed = ((ClientProxy)AutoPickup.proxy).ignoreBlacklist.isPressed() || ((ClientProxy)AutoPickup.proxy).ignoreBlacklist.getIsKeyPressed();
AutoPickup.network.sendToServer(new PacketIgnoreKey(isPressed));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"modid": "autopickup",
"name": "AutoPickup",
"description": "Allows items to be picked up automatically or blacklisted and never picked up.",
"version": "2.0",
"version": "2.1",
"mcversion": "1.7.10",
"url": "https://sites.google.com/site/furglsmods/auto-pickup",
"updateUrl": "",
Expand Down

0 comments on commit 14d01a5

Please sign in to comment.