-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added a Silk Touch mode config option, if Silk Touch mode is disabled, players may enchant the Exchangers with Silk Touch to achieve Silk Touching on Exchangers or Fortune to get additional drops - Added a PlaceEvent for when Exchangers tries to replace blocks, allows other mods to cancel the event, which also fixes an issue with Faction Mod, closes #41 - Migrated over to use string block IDs instead of integers - Rewritten lots of translation stuff - Changed all the camelCase translation keys to be lowercase with underscores - Added a special blocks list for internal use - Fixed a major problem with Exchangers not being able to replace blocks with metadata, closes #42 Internal code optimizations to greatly reduce redundancy - Added a config option to allow Unbreaking enchant reducing chance of using power for Powered Exchangers, currently tested and works on all MC versions, enabled by default (Part of #37) - Added a way to decrease range for Exchangers (by holding sneak and pressing the mode key)
- Loading branch information
Showing
65 changed files
with
507 additions
and
885 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
254 changes: 142 additions & 112 deletions
254
src/main/java/jackyy/exchangers/handler/ExchangerHandler.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
package jackyy.exchangers.helper; | ||
|
||
import jackyy.exchangers.Exchangers; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.util.text.TextComponentString; | ||
import net.minecraft.util.text.TextComponentTranslation; | ||
|
||
public class ChatHelper { | ||
|
||
public static void msgPlayer(EntityPlayer player, String msg) { | ||
player.sendStatusMessage(new TextComponentString(msg), true); | ||
player.sendStatusMessage(new TextComponentTranslation(Exchangers.MODID + "." + msg), true); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package jackyy.exchangers.item; | ||
|
||
import jackyy.exchangers.Exchangers; | ||
import net.minecraft.creativetab.CreativeTabs; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.NonNullList; | ||
|
||
public class ItemCoreBase extends Item { | ||
|
||
public ItemCoreBase(){ | ||
setMaxStackSize(16); | ||
setCreativeTab(Exchangers.TAB); | ||
} | ||
|
||
@Override | ||
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) { | ||
if (isInCreativeTab(tab)) { | ||
if (checkLoaded()) { | ||
list.add(new ItemStack(this)); | ||
} | ||
} | ||
} | ||
|
||
public boolean checkLoaded() { | ||
return true; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.