Merge branch '1.8.9' of https://github.com/TechReborn/TechReborn into 1.8.9
|
@ -127,7 +127,7 @@ dependencies {
|
|||
// shade 'IC2-Classic-API-STANDALONE:IC2-Classic-API-STANDALONE:1.1.0.19-5:api'
|
||||
deobfCompile 'RebornCore:RebornCore-1.8.9:1.4.4.+:universal'
|
||||
deobfCompile "mezz.jei:jei_1.8.9:2.27.+"
|
||||
deobfCompile 'MCMultiPart:MCMultiPart:1.0.6:universal'
|
||||
deobfCompile 'MCMultiPart:MCMultiPart:1.0.8:universal'
|
||||
|
||||
println("Downloading dependencies that have no maven :/")
|
||||
//This is done becuase
|
||||
|
|
|
@ -11,12 +11,10 @@ import net.minecraft.block.properties.PropertyEnum;
|
|||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.property.ExtendedBlockState;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
|
@ -25,13 +23,14 @@ import net.minecraftforge.common.property.Properties;
|
|||
import reborncore.api.power.IEnergyInterfaceTile;
|
||||
import reborncore.common.misc.Functions;
|
||||
import reborncore.common.misc.vecmath.Vecs3dCube;
|
||||
import techreborn.utils.damageSources.ElectrialShockSource;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Created by mark on 02/03/2016.
|
||||
*/
|
||||
public abstract class CableMultipart extends Multipart implements IOccludingPart, ISlottedPart, ITickable, ICableType {
|
||||
public abstract class CableMultipart extends Multipart implements IOccludingPart, ISlottedPart, ITickable, ICableType, ICollidableMultipart {
|
||||
|
||||
public Vecs3dCube[] boundingBoxes = new Vecs3dCube[14];
|
||||
public float center = 0.6F;
|
||||
|
@ -277,4 +276,17 @@ public abstract class CableMultipart extends Multipart implements IOccludingPart
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onEntityCollided(Entity entity) {
|
||||
if(getCableType().canKill && entity instanceof EntityLivingBase){
|
||||
entity.attackEntityFrom(new ElectrialShockSource(), 1F);
|
||||
getWorld().playSoundAtEntity(entity, "techreborn:cable_shock", 0.6F, 1F);
|
||||
getWorld().spawnParticle(EnumParticleTypes.CRIT, entity.posX, entity.posY, entity.posZ, 0, 0,0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityStanding(Entity entity) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package techreborn.utils.damageSources;
|
||||
|
||||
import net.minecraft.util.DamageSource;
|
||||
|
||||
/**
|
||||
* Created by mark on 06/03/2016.
|
||||
*/
|
||||
public class ElectrialShockSource extends DamageSource {
|
||||
public ElectrialShockSource() {
|
||||
super("shock");
|
||||
}
|
||||
}
|
|
@ -64,7 +64,7 @@ tile.techreborn.ore2.copper.name=Copper Ore
|
|||
tile.techreborn.ore2.tin.name=Tin Ore
|
||||
tile.techreborn.storage2.copper.name=Copper Block
|
||||
tile.techreborn.storage2.tin.name=Tin Block
|
||||
tile.techreborn.solarpanel.name=Solar panel
|
||||
tile.techreborn.solarpanel.name=Solar Panel
|
||||
tile.techreborn.watermill.name=Water Mill
|
||||
tile.techreborn.windmill.name=Wind Mill
|
||||
tile.techreborn.ironfurnace.name=Iron Furnace
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"sap_extract": { "category": "block", "sounds":["sap_extract"] },
|
||||
"block_dismantle": { "category": "block", "sounds":["block_dismantle"] }
|
||||
"block_dismantle": { "category": "block", "sounds":["block_dismantle"] },
|
||||
"cable_shock": { "category": "block", "sounds":["cable_shock"] }
|
||||
}
|
BIN
src/main/resources/assets/techreborn/sounds/cable_shock.ogg
Normal file
Before Width: | Height: | Size: 504 B After Width: | Height: | Size: 504 B |
Before Width: | Height: | Size: 459 B After Width: | Height: | Size: 471 B |
After Width: | Height: | Size: 266 B |
After Width: | Height: | Size: 467 B |
After Width: | Height: | Size: 445 B |
After Width: | Height: | Size: 447 B |
After Width: | Height: | Size: 441 B |
After Width: | Height: | Size: 366 B |
After Width: | Height: | Size: 229 B |
After Width: | Height: | Size: 274 B |
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 343 B |
After Width: | Height: | Size: 330 B |
After Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 297 B After Width: | Height: | Size: 298 B |
After Width: | Height: | Size: 390 B |
After Width: | Height: | Size: 474 B |