Reference sheet covering basic and commonly used Git commands.
Restore all files in the current directory to their stashed version §
$ git checkout stash -- .
<?xml version="1.0" encoding="UTF-8"?> | |
<projectDescription> | |
<name>Generic-Mod</name> | |
<comment>Project Generic-Mod created by Buildship.</comment> | |
<projects> | |
</projects> | |
<buildSpec> | |
<buildCommand> | |
<name>org.eclipse.jdt.core.javabuilder</name> | |
<arguments> |
package com.user.genericmod.common; | |
import java.io.File; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import org.apache.logging.log4j.Level; | |
import org.apache.logging.log4j.Marker; |
public static boolean extinguishItemTorch(ItemStack stack, Entity owner, int itemSlot, boolean extinguishByWater) | |
{ | |
if (extinguishByWater == true) | |
setItemHumidity(stack.getTagCompound(), SharedDefines.TORCH_HUMIDITY_THRESHOLD); | |
if (ItemTorch.isItemTorch(stack.getItem(), false)) | |
{ | |
ItemStack unlitTorch = new ItemStack(ResourceLibrary.TORCH_UNLIT, 1); | |
ItemTorch.createCustomItemNBTFromExisting(unlitTorch, owner.worldObj, stack.getTagCompound()); | |
package com.padwolf.minecraft.t1d.packets; | |
import com.padwolf.minecraft.t1d.refs.Functions; | |
import cpw.mods.fml.common.network.simpleimpl.IMessage; | |
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; | |
import cpw.mods.fml.common.network.simpleimpl.MessageContext; | |
public class MessagePacketHandler implements IMessageHandler<MessagePacket, IMessage> | |
{ |
package com.yooksi.fierysouls.block; | |
import javax.annotation.Nullable; | |
import com.yooksi.fierysouls.entity.item.EntityItemTorch; | |
import com.yooksi.fierysouls.item.ItemTorch; | |
import com.yooksi.fierysouls.tileentity.TileEntityTorch; | |
import net.minecraft.block.Block; | |
import net.minecraft.block.state.IBlockState; |
@SubscribeEvent | |
public static void onBlockLeftClicked(PlayerInteractEvent.LeftClickBlock event) | |
{ | |
/* | |
* Tips: Don't worry about World#getBlockState returning null, | |
* if it does not find anything valid it will just return the default state of AIR. | |
*/ | |
Random rand = new Random(); |
{ | |
"parent": "item/generated", | |
"textures": { | |
"layer0": "betterarchery:items/item_simple_bow_body", | |
"layer1": "betterarchery:items/layer_bow_string_standby" | |
}, | |
"display": { | |
"thirdperson_righthand": { | |
"rotation": [ -80, 260, -40 ], | |
"translation": [ -1, -2, 2.5 ], |
@SideOnly(Side.CLIENT) | |
@Override | |
public void addInformation(ItemStack stack, EntityPlayer player, java.util.List<String> info, boolean par4) | |
{ | |
info.add(com.mojang.realmsclient.gui.ChatFormatting.RED + "This item " + | |
com.mojang.realmsclient.gui.ChatFormatting.GREEN + "has a " + | |
com.mojang.realmsclient.gui.ChatFormatting.BLUE + "colourful " + | |
com.mojang.realmsclient.gui.ChatFormatting.GOLD + "description."); | |
} |