This commit is contained in:
modmuss50 2019-09-12 16:55:41 +01:00
parent 1cc56ed2e3
commit 8c9c736da9
13 changed files with 170 additions and 169 deletions

View file

@ -69,12 +69,12 @@ license {
group = 'TechReborn'
dependencies {
minecraft "com.mojang:minecraft:19w34a"
mappings "net.fabricmc:yarn:19w34a+build.12"
minecraft "com.mojang:minecraft:19w37a"
mappings "net.fabricmc:yarn:19w37a+build.9"
modCompile "net.fabricmc:fabric-loader:0.6.0+build.163"
//Fabric api
modCompile "net.fabricmc.fabric-api:fabric-api:0.3.2+build.212-1.15"
modCompile "net.fabricmc.fabric-api:fabric-api:0.3.2+build.227-1.15"
modCompile "io.github.prospector:modmenu:1.7.9-unstable.19w34a+build.1"
modCompile "io.github.prospector.silk:SilkAPI:1.2.4-43"
@ -93,7 +93,7 @@ dependencies {
compile 'org.checkerframework:checker-qual:2.10.0'
compileOnly "com.google.code.findbugs:jsr305:+"
modCompile ('com.github.Virtuoel:Towelette:519538e54b') {
modCompileOnly ('com.github.Virtuoel:Towelette:519538e54b') {
transitive = false
}
}

View file

@ -83,7 +83,7 @@ public class SolarPanelBlockEntity extends PowerAcceptorBlockEntity implements I
return;
}
if (world.getTime() % 20 == 0) {
canSeeSky = world.method_8626(pos.up());
canSeeSky = world.isSkyVisible(pos.up());
if (lastState != isSunOut()) {
world.setBlockState(pos, world.getBlockState(pos).with(BlockMachineBase.ACTIVE, isSunOut()));
lastState = isSunOut();

View file

@ -69,8 +69,8 @@ public class VacuumFreezerBlockEntity extends GenericMachineBlockEntity implemen
// BlockEntity
@Override
public void validate() {
super.validate();
public void cancelRemoval() {
super.cancelRemoval();
multiblockChecker = new MultiblockChecker(world, pos.down());
}

View file

@ -29,6 +29,7 @@ import net.minecraft.block.*;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
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.state.StateFactory;
@ -82,12 +83,12 @@ public class BlockRubberLog extends LogBlock {
public void onBreak(World worldIn, BlockPos pos, BlockState state, PlayerEntity player) {
int i = 4;
int j = i + 1;
if (worldIn.isAreaLoaded(pos.add(-j, -j, -j), pos.add(j, j, j))) {
if (worldIn instanceof ServerWorld && worldIn.isRegionLoaded(pos.add(-j, -j, -j), pos.add(j, j, j))) {
for (BlockPos blockpos : BlockPos.iterate(pos.add(-i, -i, -i), pos.add(i, i, i))) {
BlockState state1 = worldIn.getBlockState(blockpos);
if (state1.matches(BlockTags.LEAVES)) {
state1.scheduledTick(worldIn, blockpos, worldIn.getRandom());
state1.onRandomTick(worldIn, blockpos, worldIn.getRandom());
state1.scheduledTick((ServerWorld) worldIn, blockpos, worldIn.getRandom());
state1.onRandomTick((ServerWorld) worldIn, blockpos, worldIn.getRandom());
}
}
}
@ -95,7 +96,7 @@ public class BlockRubberLog extends LogBlock {
}
@Override
public void onScheduledTick(BlockState state, World worldIn, BlockPos pos, Random random) {
public void onScheduledTick(BlockState state, ServerWorld worldIn, BlockPos pos, Random random) {
super.onScheduledTick(state, worldIn, pos, random);
if (state.get(AXIS) != Direction.Axis.Y) {
return;

View file

@ -46,7 +46,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.ExtendedBlockView;
import net.minecraft.world.BlockRenderView;
import reborncore.common.fluid.container.ItemFluidInfo;
import reborncore.common.util.Color;
import techreborn.TechReborn;
@ -70,7 +70,7 @@ public class DynamicBucketBakedModel implements BakedModel, FabricBakedModel {
}
@Override
public void emitBlockQuads(ExtendedBlockView blockView, BlockState state, BlockPos pos, Supplier<Random> randomSupplier, RenderContext context) {
public void emitBlockQuads(BlockRenderView blockView, BlockState state, BlockPos pos, Supplier<Random> randomSupplier, RenderContext context) {
}

View file

@ -46,7 +46,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.ExtendedBlockView;
import net.minecraft.world.BlockRenderView;
import reborncore.common.fluid.container.ItemFluidInfo;
import reborncore.common.util.Color;
import techreborn.TechReborn;
@ -65,7 +65,7 @@ public class DynamicCellBakedModel implements BakedModel, FabricBakedModel {
private static final ModelIdentifier CELL_GLASS = new ModelIdentifier(new Identifier(TechReborn.MOD_ID, "cell_glass"), "inventory");
@Override
public void emitBlockQuads(ExtendedBlockView blockView, BlockState state, BlockPos pos, Supplier<Random> randomSupplier, RenderContext context) {
public void emitBlockQuads(BlockRenderView blockRenderView, BlockState blockState, BlockPos blockPos, Supplier<Random> supplier, RenderContext renderContext) {
}

View file

@ -109,7 +109,7 @@ public class ItemFrequencyTransmitter extends Item {
}
}
return new TypedActionResult<>(ActionResult.SUCCESS, stack);
return new TypedActionResult<>(ActionResult.SUCCESS, stack, true);
}
@Environment(EnvType.CLIENT)

View file

@ -49,7 +49,7 @@ public class ItemManual extends Item {
if(world.isClient){
openGui(player);
}
return new TypedActionResult<>(ActionResult.SUCCESS, player.getStackInHand(hand));
return new TypedActionResult<>(ActionResult.SUCCESS, player.getStackInHand(hand), true);
}
@Environment(EnvType.CLIENT)

View file

@ -54,6 +54,6 @@ public class ItemScrapBox extends Item {
WorldUtils.dropItem(out, world, player.getBlockPos());
stack.decrement(1);
}
return new TypedActionResult<>(ActionResult.SUCCESS, stack);
return new TypedActionResult<>(ActionResult.SUCCESS, stack, true);
}
}

View file

@ -141,9 +141,9 @@ public class ItemIndustrialChainsaw extends ItemChainsaw {
}
}
}
return new TypedActionResult<>(ActionResult.SUCCESS, stack);
return new TypedActionResult<>(ActionResult.SUCCESS, stack, true);
}
return new TypedActionResult<>(ActionResult.PASS, stack);
return new TypedActionResult<>(ActionResult.PASS, stack, true);
}
@Override

View file

@ -200,9 +200,9 @@ public class ItemIndustrialDrill extends ItemDrill {
}
}
}
return new TypedActionResult<>(ActionResult.SUCCESS, stack);
return new TypedActionResult<>(ActionResult.SUCCESS, stack, true);
}
return new TypedActionResult<>(ActionResult.PASS, stack);
return new TypedActionResult<>(ActionResult.PASS, stack, true);
}
@Override

View file

@ -138,9 +138,9 @@ public class ItemNanosaber extends SwordItem implements IEnergyItemInfo, ItemDur
}
}
}
return new TypedActionResult<>(ActionResult.SUCCESS, stack);
return new TypedActionResult<>(ActionResult.SUCCESS, stack, true);
}
return new TypedActionResult<>(ActionResult.PASS, stack);
return new TypedActionResult<>(ActionResult.PASS, stack, true);
}
@Override

View file

@ -31,9 +31,9 @@ import java.util.function.Function;
import com.mojang.datafixers.Dynamic;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockBox;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.MutableIntBoundingBox;
import net.minecraft.world.ModifiableTestableWorld;
import net.minecraft.world.gen.feature.AbstractTreeFeature;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
@ -58,7 +58,7 @@ public class RubberTreeFeature extends AbstractTreeFeature<DefaultFeatureConfig>
@Override
protected boolean generate(Set<BlockPos> changedBlocks, ModifiableTestableWorld worldIn, Random rand,
BlockPos saplingPos, MutableIntBoundingBox mutableBoundingBox) {
BlockPos saplingPos, BlockBox mutableBoundingBox) {
int treeHeight = rand.nextInt(5) + treeBaseHeight;
int baseY = saplingPos.getY();
int baseX = saplingPos.getX();