mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
Fix JABBA-related issues with crafting station slots (#54)
* Fix shift-merging tools voiding items fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/11392> * Change 0-sized ItemStacks into null stacks in crafting station attached slots Fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/10425> * Update buildscript * spotlessApply
This commit is contained in:
1 parent
18bfeaff32
commit
39be06c23b
571 files changed
+25959
-28223
No files matched your search
@@ -8,30 +8,24 @@ import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
import tconstruct.blocks.TConstructBlock;
|
||||
|
||||
public class SoilBlock extends TConstructBlock
|
||||
{
|
||||
static String[] soilTypes = new String[] { "slimesand", "grout", "slimesandblue", "graveyardsoil", "consecratedsoil", "slimedirt_blue", "nether_grout" };
|
||||
public class SoilBlock extends TConstructBlock {
|
||||
static String[] soilTypes = new String[] {
|
||||
"slimesand", "grout", "slimesandblue", "graveyardsoil", "consecratedsoil", "slimedirt_blue", "nether_grout"
|
||||
};
|
||||
|
||||
public SoilBlock()
|
||||
{
|
||||
public SoilBlock() {
|
||||
super(Material.ground, 3.0F, soilTypes);
|
||||
this.setHarvestLevel("shovel", -1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityWalking (World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
if (entity instanceof EntityLivingBase)
|
||||
{
|
||||
if (((EntityLivingBase) entity).getCreatureAttribute() == EnumCreatureAttribute.UNDEAD)
|
||||
{
|
||||
public void onEntityWalking(World world, int x, int y, int z, Entity entity) {
|
||||
if (entity instanceof EntityLivingBase) {
|
||||
if (((EntityLivingBase) entity).getCreatureAttribute() == EnumCreatureAttribute.UNDEAD) {
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
if (metadata == 3)
|
||||
{
|
||||
if (metadata == 3) {
|
||||
((EntityLivingBase) entity).heal(1);
|
||||
}
|
||||
else if (metadata == 4)
|
||||
{
|
||||
} else if (metadata == 4) {
|
||||
((EntityLivingBase) entity).attackEntityFrom(DamageSource.magic, 1);
|
||||
((EntityLivingBase) entity).setFire(1);
|
||||
}
|
||||
@@ -40,15 +34,12 @@ public class SoilBlock extends TConstructBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta < 3)
|
||||
{
|
||||
if (meta < 3) {
|
||||
entity.motionX *= 0.4;
|
||||
entity.motionZ *= 0.4;
|
||||
if (meta != 1 && entity instanceof EntityLivingBase)
|
||||
{
|
||||
if (meta != 1 && entity instanceof EntityLivingBase) {
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.weakness.id, 1));
|
||||
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.jump.id, 1, 1));
|
||||
}
|
||||
@@ -56,8 +47,7 @@ public class SoilBlock extends TConstructBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
|
||||
{
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
return Blocks.soul_sand.getCollisionBoundingBoxFromPool(world, x, y, z);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user