mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 00:38:35 +01:00
no more lamp sneak
This commit is contained in:
parent
9ca8e3d1ce
commit
9bed6f7ea5
13 changed files with 19 additions and 19 deletions
|
@ -23,9 +23,9 @@ if(hasProperty('buildnumber')){
|
|||
}
|
||||
|
||||
minecraft {
|
||||
version = "1.12.1-14.22.1.2481"
|
||||
version = "1.12.2-14.23.0.2536"
|
||||
runDir = "run"
|
||||
mappings = "snapshot_20170821"
|
||||
mappings = "snapshot_20171108"
|
||||
replaceIn "ModUtil.java"
|
||||
replace "@VERSION@", project.version.toString()
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ public class BlockColoredLamp extends BlockBase{
|
|||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ){
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
//Turning On
|
||||
if(stack.isEmpty() && player.isSneaking()){
|
||||
if(hand == EnumHand.MAIN_HAND && stack.isEmpty()){
|
||||
world.setBlockState(pos, (this.isOn ? InitBlocks.blockColoredLamp : InitBlocks.blockColoredLampOn).getDefaultState().withProperty(TYPE, state.getValue(TYPE)), 2);
|
||||
world.notifyLightSet(pos);
|
||||
return true;
|
||||
|
|
|
@ -124,7 +124,7 @@ public class BlockCrystalCluster extends BlockBase implements IColorProvidingBlo
|
|||
public IItemColor getItemColor(){
|
||||
return new IItemColor(){
|
||||
@Override
|
||||
public int getColorFromItemstack(ItemStack stack, int tintIndex){
|
||||
public int colorMultiplier(ItemStack stack, int tintIndex){
|
||||
return BlockCrystalCluster.this.crystal.clusterColor;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -108,12 +108,12 @@ public class ItemAllToolAA extends ItemToolAA implements IColorProvidingItem{
|
|||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState state){
|
||||
public float getDestroySpeed(ItemStack stack, IBlockState state){
|
||||
if(state.getBlock() == Blocks.WEB){
|
||||
return 15.0F;
|
||||
}
|
||||
else{
|
||||
return this.hasExtraWhitelist(state.getBlock()) || state.getBlock().getHarvestTool(state) == null || state.getBlock().getHarvestTool(state).isEmpty() || this.getToolClasses(stack).contains(state.getBlock().getHarvestTool(state)) ? this.efficiencyOnProperMaterial : 1.0F;
|
||||
return this.hasExtraWhitelist(state.getBlock()) || state.getBlock().getHarvestTool(state) == null || state.getBlock().getHarvestTool(state).isEmpty() || this.getToolClasses(stack).contains(state.getBlock().getHarvestTool(state)) ? this.efficiency : 1.0F;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ public class ItemAllToolAA extends ItemToolAA implements IColorProvidingItem{
|
|||
public IItemColor getItemColor(){
|
||||
return new IItemColor(){
|
||||
@Override
|
||||
public int getColorFromItemstack(ItemStack stack, int pass){
|
||||
public int colorMultiplier(ItemStack stack, int pass){
|
||||
return pass > 0 ? ItemAllToolAA.this.color : 0xFFFFFF;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -38,9 +38,9 @@ public class ItemAxeAA extends ItemToolAA{
|
|||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState state){
|
||||
public float getDestroySpeed(ItemStack stack, IBlockState state){
|
||||
Material material = state.getMaterial();
|
||||
return material != Material.WOOD && material != Material.PLANTS && material != Material.VINE ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
|
||||
return material != Material.WOOD && material != Material.PLANTS && material != Material.VINE ? super.getDestroySpeed(stack, state) : this.efficiency;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -69,7 +69,7 @@ public class ItemCrystalShard extends ItemBase implements IColorProvidingItem{
|
|||
public IItemColor getItemColor(){
|
||||
return new IItemColor(){
|
||||
@Override
|
||||
public int getColorFromItemstack(ItemStack stack, int tintIndex){
|
||||
public int colorMultiplier(ItemStack stack, int tintIndex){
|
||||
int damage = stack.getItemDamage();
|
||||
if(damage >= 0 && damage < BlockCrystal.ALL_CRYSTALS.length){
|
||||
return BlockCrystal.ALL_CRYSTALS[damage].clusterColor;
|
||||
|
|
|
@ -199,7 +199,7 @@ public class ItemDrill extends ItemEnergy{
|
|||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState state){
|
||||
public float getDestroySpeed(ItemStack stack, IBlockState state){
|
||||
return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack) ? (this.hasExtraWhitelist(state.getBlock()) || state.getBlock().getHarvestTool(state) == null || state.getBlock().getHarvestTool(state).isEmpty() || this.getToolClasses(stack).contains(state.getBlock().getHarvestTool(state)) ? this.getEfficiencyFromUpgrade(stack) : 1.0F) : 0.1F;
|
||||
}
|
||||
|
||||
|
@ -455,7 +455,7 @@ public class ItemDrill extends ItemEnergy{
|
|||
IBlockState state = world.getBlockState(pos);
|
||||
Block block = state.getBlock();
|
||||
float hardness = state.getBlockHardness(world, pos);
|
||||
boolean canHarvest = (ForgeHooks.canHarvestBlock(block, player, world, pos) || this.canHarvestBlock(state, stack)) && (!isExtra || this.getStrVsBlock(stack, world.getBlockState(pos)) > 1.0F);
|
||||
boolean canHarvest = (ForgeHooks.canHarvestBlock(block, player, world, pos) || this.canHarvestBlock(state, stack)) && (!isExtra || this.getDestroySpeed(stack, world.getBlockState(pos)) > 1.0F);
|
||||
if(hardness >= 0.0F && (!isExtra || (canHarvest && !block.hasTileEntity(world.getBlockState(pos))))){
|
||||
if(!player.capabilities.isCreativeMode){
|
||||
this.extractEnergyInternal(stack, use, false);
|
||||
|
|
|
@ -71,7 +71,7 @@ public class ItemDust extends ItemBase implements IColorProvidingItem{
|
|||
public IItemColor getItemColor(){
|
||||
return new IItemColor(){
|
||||
@Override
|
||||
public int getColorFromItemstack(ItemStack stack, int pass){
|
||||
public int colorMultiplier(ItemStack stack, int pass){
|
||||
return stack.getItemDamage() >= ALL_DUSTS.length ? 0xFFFFFF : ALL_DUSTS[stack.getItemDamage()].color;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -111,7 +111,7 @@ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{
|
|||
public IItemColor getItemColor(){
|
||||
return new IItemColor(){
|
||||
@Override
|
||||
public int getColorFromItemstack(ItemStack stack, int pass){
|
||||
public int colorMultiplier(ItemStack stack, int pass){
|
||||
return pass > 0 ? (stack.getItemDamage() >= ALL_JAMS.length ? 0xFFFFFF : ALL_JAMS[stack.getItemDamage()].color) : 0xFFFFFF;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -79,9 +79,9 @@ public class ItemPickaxeAA extends ItemToolAA{
|
|||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState state){
|
||||
public float getDestroySpeed(ItemStack stack, IBlockState state){
|
||||
Material material = state.getMaterial();
|
||||
return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
|
||||
return material != Material.IRON && material != Material.ANVIL && material != Material.ROCK ? super.getDestroySpeed(stack, state) : this.efficiency;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -178,7 +178,7 @@ public class ItemPotionRing extends ItemBase implements IColorProvidingItem, IDi
|
|||
public IItemColor getItemColor(){
|
||||
return new IItemColor(){
|
||||
@Override
|
||||
public int getColorFromItemstack(ItemStack stack, int tintIndex){
|
||||
public int colorMultiplier(ItemStack stack, int tintIndex){
|
||||
return stack.getItemDamage() >= ALL_RINGS.length ? 0xFFFFFF : ALL_RINGS[stack.getItemDamage()].color;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -378,7 +378,7 @@ public final class WorldUtil{
|
|||
}
|
||||
|
||||
public static RayTraceResult getNearestBlockWithDefaultReachDistance(World world, EntityPlayer player, boolean stopOnLiquids, boolean ignoreBlockWithoutBoundingBox, boolean returnLastUncollidableBlock){
|
||||
return getMovingObjectPosWithReachDistance(world, player, player instanceof EntityPlayerMP ? ((EntityPlayerMP)player).interactionManager.getBlockReachDistance() : 5.0D, stopOnLiquids, ignoreBlockWithoutBoundingBox, returnLastUncollidableBlock);
|
||||
return getMovingObjectPosWithReachDistance(world, player, player.getEntityAttribute(EntityPlayer.REACH_DISTANCE).getAttributeValue(), stopOnLiquids, ignoreBlockWithoutBoundingBox, returnLastUncollidableBlock);
|
||||
}
|
||||
|
||||
//Cobbled together from Tinkers' Construct (with permission, thanks!) and PlayerInteractionManager code.
|
||||
|
|
|
@ -909,7 +909,7 @@ booklet.actuallyadditions.chapter.coalStuff.name=Coal Stuff
|
|||
booklet.actuallyadditions.chapter.coalStuff.text.1=Sometimes your <item>Coal<r> just <imp>burns for too long or too short<r>. <n>For that, you can craft <item>Tiny Coal<r>, <item>Tiny Charcoal<r> and <item>Blocks of Charcoal<r> for using them in a furnace. <n>While the <item>Block of Charcoal<r> burns for as long as a <item>Block of Coal<r>, the <item>Tiny Coal<r> and <item>Tiny Charcoal<r> will burn for <imp>one eighth of a piece of coal<r>, meaning it will <imp>smelt one item in a normal furnace<r>.
|
||||
|
||||
booklet.actuallyadditions.chapter.lamps.name=Lamps
|
||||
booklet.actuallyadditions.chapter.lamps.text.1=<item>Lamps<r> are a block providing lots of light, similar to the mystic Glowstone or Torches, but they can be <imp>dyed with all of the 16 different colors<r> either by <imp>crafting them<r> or by placing them on the ground and <imp>right-clicking them with a piece of dye<r>. <n>When <imp>shift-right-clicking<r> them with an empty hand, they will <imp>turn on and off<r>.
|
||||
booklet.actuallyadditions.chapter.lamps.text.1=<item>Lamps<r> are a block providing lots of light, similar to the mystic Glowstone or Torches, but they can be <imp>dyed with all of the 16 different colors<r> either by <imp>crafting them<r> or by placing them on the ground and <imp>right-clicking them with a piece of dye<r>. <n>When <imp>right-clicking<r> them with an empty hand, they will <imp>turn on and off<r>.
|
||||
booklet.actuallyadditions.chapter.lamps.text.2=There is a way to toggle them with <imp>Redstone<r>, however. If you place a <item>Lamp Controller<r> facing into one and give it a <imp>redstone signal<r>, it will turn the lamp in front of it on and off. <n>The thing that makes this very expandable, though, is that it also <imp>toggles every lamp adjacent to that lamp<r> and every other lamp that gets touched. <n>That means you can have a huge field of lamps and toggle them all with <imp>just one<r> <item>Lamp Controller<r>.
|
||||
|
||||
booklet.actuallyadditions.chapter.treasureChest.name=Treasure Chests
|
||||
|
|
Loading…
Reference in a new issue