19w37a
This commit is contained in:
parent
1cc56ed2e3
commit
8c9c736da9
13 changed files with 170 additions and 169 deletions
|
@ -69,12 +69,12 @@ license {
|
||||||
group = 'TechReborn'
|
group = 'TechReborn'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft "com.mojang:minecraft:19w34a"
|
minecraft "com.mojang:minecraft:19w37a"
|
||||||
mappings "net.fabricmc:yarn:19w34a+build.12"
|
mappings "net.fabricmc:yarn:19w37a+build.9"
|
||||||
modCompile "net.fabricmc:fabric-loader:0.6.0+build.163"
|
modCompile "net.fabricmc:fabric-loader:0.6.0+build.163"
|
||||||
|
|
||||||
//Fabric api
|
//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:modmenu:1.7.9-unstable.19w34a+build.1"
|
||||||
modCompile "io.github.prospector.silk:SilkAPI:1.2.4-43"
|
modCompile "io.github.prospector.silk:SilkAPI:1.2.4-43"
|
||||||
|
@ -93,7 +93,7 @@ dependencies {
|
||||||
compile 'org.checkerframework:checker-qual:2.10.0'
|
compile 'org.checkerframework:checker-qual:2.10.0'
|
||||||
compileOnly "com.google.code.findbugs:jsr305:+"
|
compileOnly "com.google.code.findbugs:jsr305:+"
|
||||||
|
|
||||||
modCompile ('com.github.Virtuoel:Towelette:519538e54b') {
|
modCompileOnly ('com.github.Virtuoel:Towelette:519538e54b') {
|
||||||
transitive = false
|
transitive = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class SolarPanelBlockEntity extends PowerAcceptorBlockEntity implements I
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (world.getTime() % 20 == 0) {
|
if (world.getTime() % 20 == 0) {
|
||||||
canSeeSky = world.method_8626(pos.up());
|
canSeeSky = world.isSkyVisible(pos.up());
|
||||||
if (lastState != isSunOut()) {
|
if (lastState != isSunOut()) {
|
||||||
world.setBlockState(pos, world.getBlockState(pos).with(BlockMachineBase.ACTIVE, isSunOut()));
|
world.setBlockState(pos, world.getBlockState(pos).with(BlockMachineBase.ACTIVE, isSunOut()));
|
||||||
lastState = isSunOut();
|
lastState = isSunOut();
|
||||||
|
|
|
@ -69,8 +69,8 @@ public class VacuumFreezerBlockEntity extends GenericMachineBlockEntity implemen
|
||||||
|
|
||||||
// BlockEntity
|
// BlockEntity
|
||||||
@Override
|
@Override
|
||||||
public void validate() {
|
public void cancelRemoval() {
|
||||||
super.validate();
|
super.cancelRemoval();
|
||||||
multiblockChecker = new MultiblockChecker(world, pos.down());
|
multiblockChecker = new MultiblockChecker(world, pos.down());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ import net.minecraft.block.*;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
|
import net.minecraft.server.world.ServerWorld;
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
import net.minecraft.sound.BlockSoundGroup;
|
||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.state.StateFactory;
|
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) {
|
public void onBreak(World worldIn, BlockPos pos, BlockState state, PlayerEntity player) {
|
||||||
int i = 4;
|
int i = 4;
|
||||||
int j = i + 1;
|
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))) {
|
for (BlockPos blockpos : BlockPos.iterate(pos.add(-i, -i, -i), pos.add(i, i, i))) {
|
||||||
BlockState state1 = worldIn.getBlockState(blockpos);
|
BlockState state1 = worldIn.getBlockState(blockpos);
|
||||||
if (state1.matches(BlockTags.LEAVES)) {
|
if (state1.matches(BlockTags.LEAVES)) {
|
||||||
state1.scheduledTick(worldIn, blockpos, worldIn.getRandom());
|
state1.scheduledTick((ServerWorld) worldIn, blockpos, worldIn.getRandom());
|
||||||
state1.onRandomTick(worldIn, blockpos, worldIn.getRandom());
|
state1.onRandomTick((ServerWorld) worldIn, blockpos, worldIn.getRandom());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,7 +96,7 @@ public class BlockRubberLog extends LogBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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);
|
super.onScheduledTick(state, worldIn, pos, random);
|
||||||
if (state.get(AXIS) != Direction.Axis.Y) {
|
if (state.get(AXIS) != Direction.Axis.Y) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -46,7 +46,7 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Direction;
|
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.fluid.container.ItemFluidInfo;
|
||||||
import reborncore.common.util.Color;
|
import reborncore.common.util.Color;
|
||||||
import techreborn.TechReborn;
|
import techreborn.TechReborn;
|
||||||
|
@ -70,7 +70,7 @@ public class DynamicBucketBakedModel implements BakedModel, FabricBakedModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Direction;
|
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.fluid.container.ItemFluidInfo;
|
||||||
import reborncore.common.util.Color;
|
import reborncore.common.util.Color;
|
||||||
import techreborn.TechReborn;
|
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");
|
private static final ModelIdentifier CELL_GLASS = new ModelIdentifier(new Identifier(TechReborn.MOD_ID, "cell_glass"), "inventory");
|
||||||
|
|
||||||
@Override
|
@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) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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)
|
@Environment(EnvType.CLIENT)
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class ItemManual extends Item {
|
||||||
if(world.isClient){
|
if(world.isClient){
|
||||||
openGui(player);
|
openGui(player);
|
||||||
}
|
}
|
||||||
return new TypedActionResult<>(ActionResult.SUCCESS, player.getStackInHand(hand));
|
return new TypedActionResult<>(ActionResult.SUCCESS, player.getStackInHand(hand), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Environment(EnvType.CLIENT)
|
@Environment(EnvType.CLIENT)
|
||||||
|
|
|
@ -54,6 +54,6 @@ public class ItemScrapBox extends Item {
|
||||||
WorldUtils.dropItem(out, world, player.getBlockPos());
|
WorldUtils.dropItem(out, world, player.getBlockPos());
|
||||||
stack.decrement(1);
|
stack.decrement(1);
|
||||||
}
|
}
|
||||||
return new TypedActionResult<>(ActionResult.SUCCESS, stack);
|
return new TypedActionResult<>(ActionResult.SUCCESS, stack, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
@Override
|
||||||
|
|
|
@ -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
|
@Override
|
||||||
|
|
|
@ -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
|
@Override
|
||||||
|
|
|
@ -31,9 +31,9 @@ import java.util.function.Function;
|
||||||
import com.mojang.datafixers.Dynamic;
|
import com.mojang.datafixers.Dynamic;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.util.math.BlockBox;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
import net.minecraft.util.math.MutableIntBoundingBox;
|
|
||||||
import net.minecraft.world.ModifiableTestableWorld;
|
import net.minecraft.world.ModifiableTestableWorld;
|
||||||
import net.minecraft.world.gen.feature.AbstractTreeFeature;
|
import net.minecraft.world.gen.feature.AbstractTreeFeature;
|
||||||
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
|
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
|
||||||
|
@ -58,7 +58,7 @@ public class RubberTreeFeature extends AbstractTreeFeature<DefaultFeatureConfig>
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean generate(Set<BlockPos> changedBlocks, ModifiableTestableWorld worldIn, Random rand,
|
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 treeHeight = rand.nextInt(5) + treeBaseHeight;
|
||||||
int baseY = saplingPos.getY();
|
int baseY = saplingPos.getY();
|
||||||
int baseX = saplingPos.getX();
|
int baseX = saplingPos.getX();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue