mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
r23 ~
This commit is contained in:
parent
5b166a784f
commit
f014b1af57
2 changed files with 4 additions and 2 deletions
|
@ -12,7 +12,7 @@ buildscript {
|
||||||
}
|
}
|
||||||
apply plugin: 'net.minecraftforge.gradle.forge'
|
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||||
|
|
||||||
version = "1.8.9-r22"
|
version = "1.8.9-r23"
|
||||||
group = "de.ellpeck.actuallyadditions"
|
group = "de.ellpeck.actuallyadditions"
|
||||||
archivesBaseName = "ActuallyAdditions"
|
archivesBaseName = "ActuallyAdditions"
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
|
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
public class PlayerObtainEvents{
|
public class PlayerObtainEvents{
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
@ -34,7 +36,7 @@ public class PlayerObtainEvents{
|
||||||
if(!event.player.worldObj.isRemote && event.crafting != null && event.crafting.getItem() != null && event.crafting.getItem() != InitItems.itemBooklet){
|
if(!event.player.worldObj.isRemote && event.crafting != null && event.crafting.getItem() != null && event.crafting.getItem() != InitItems.itemBooklet){
|
||||||
|
|
||||||
String name = event.crafting.getItem().getRegistryName();
|
String name = event.crafting.getItem().getRegistryName();
|
||||||
if(name != null && name.toLowerCase().contains(ModUtil.MOD_ID_LOWER)){
|
if(name != null && name.toLowerCase(Locale.ROOT).contains(ModUtil.MOD_ID_LOWER)){
|
||||||
NBTTagCompound compound = PersistentServerData.getDataFromPlayer(event.player);
|
NBTTagCompound compound = PersistentServerData.getDataFromPlayer(event.player);
|
||||||
if(compound != null && !compound.getBoolean("BookGottenAlready")){
|
if(compound != null && !compound.getBoolean("BookGottenAlready")){
|
||||||
compound.setBoolean("BookGottenAlready", true);
|
compound.setBoolean("BookGottenAlready", true);
|
||||||
|
|
Loading…
Reference in a new issue