merge fixes

This commit is contained in:
modmuss50 2019-11-14 19:09:32 +00:00
parent d5e89c5e20
commit 977ac8f8a8
3 changed files with 7 additions and 6 deletions

View file

@ -92,7 +92,7 @@ dependencies {
transitive = false
}
def rcVersion = 'RebornCore:RebornCore-1.15:4.0.16+build.10'
def rcVersion = 'RebornCore:RebornCore-1.15:+'
modCompile (rcVersion) {
transitive = false

View file

@ -39,7 +39,7 @@ import net.minecraft.state.property.AbstractProperty;
import net.minecraft.state.property.BooleanProperty;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.SystemUtil;
import net.minecraft.util.Util;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
@ -76,7 +76,7 @@ public class CableBlock extends BlockWithEntity {
public static final BooleanProperty UP = BooleanProperty.of("up");
public static final BooleanProperty DOWN = BooleanProperty.of("down");
public static final Map<Direction, BooleanProperty> PROPERTY_MAP = SystemUtil.consume(new HashMap<>(), map -> {
public static final Map<Direction, BooleanProperty> PROPERTY_MAP = Util.create(new HashMap<>(), map -> {
map.put(Direction.EAST, EAST);
map.put(Direction.WEST, WEST);
map.put(Direction.NORTH, NORTH);

View file

@ -34,6 +34,7 @@ import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvents;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.BooleanProperty;
import net.minecraft.state.property.DirectionProperty;
@ -124,14 +125,14 @@ public class BlockRubberLog extends LogBlock {
if (stack.getItem() instanceof AxeItem) {
worldIn.playSound(playerIn, pos, SoundEvents.ITEM_AXE_STRIP, SoundCategory.BLOCKS, 1.0F, 1.0F);
if (worldIn.isClient) {
return true;
return ActionResult.SUCCESS;
}
worldIn.setBlockState(pos, TRContent.RUBBER_LOG_STRIPPED.getDefaultState().with(PillarBlock.AXIS, state.get(PillarBlock.AXIS)), 11);
if (playerIn instanceof LivingEntity) {
LivingEntity playerEntity = (LivingEntity) playerIn;
stack.damage(1, playerEntity, player -> { player.sendToolBreakStatus(hand); });
}
return true;
return ActionResult.SUCCESS;
}
if ((Energy.valid(stack) && Energy.of(stack).getEnergy() > 20) || stack.getItem() instanceof ItemTreeTap) {
@ -139,7 +140,7 @@ public class BlockRubberLog extends LogBlock {
worldIn.setBlockState(pos, state.with(HAS_SAP, false).with(SAP_SIDE, Direction.fromHorizontal(0)));
worldIn.playSound(playerIn, pos, ModSounds.SAP_EXTRACT, SoundCategory.BLOCKS, 0.6F, 1F);
if (worldIn.isClient) {
return true;
return ActionResult.SUCCESS;
}
if (Energy.valid(stack)) {
Energy.of(stack).use(20);