1.16-pre2

This commit is contained in:
modmuss50 2020-06-05 16:03:22 +01:00
parent ae1a26156a
commit ffc4c1643e
4 changed files with 13 additions and 11 deletions

View file

@ -69,12 +69,12 @@ license {
group = 'TechReborn' group = 'TechReborn'
dependencies { dependencies {
minecraft "com.mojang:minecraft:20w22a" minecraft "com.mojang:minecraft:1.16-pre2"
mappings "net.fabricmc:yarn:20w22a+build.6:v2" mappings "net.fabricmc:yarn:1.16-pre2+build.1:v2"
modImplementation "net.fabricmc:fabric-loader:0.8.5+build.199" modImplementation "net.fabricmc:fabric-loader:0.8.7+build.201"
//Fabric api //Fabric api
modImplementation "net.fabricmc.fabric-api:fabric-api:0.11.2+build.351-1.16" modImplementation "net.fabricmc.fabric-api:fabric-api:0.11.6+build.355-1.16"
optionalDependency ("me.shedaniel:RoughlyEnoughItems:4.3.7-unstable") optionalDependency ("me.shedaniel:RoughlyEnoughItems:4.3.7-unstable")
disabledOptionalDependency ('io.github.cottonmc:LibCD:2.3.0+1.15.2') disabledOptionalDependency ('io.github.cottonmc:LibCD:2.3.0+1.15.2')

View file

@ -25,12 +25,14 @@
package techreborn.blockentity.generator; package techreborn.blockentity.generator;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.LightningEntity; import net.minecraft.entity.LightningEntity;
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.world.ServerWorld; import net.minecraft.server.world.ServerWorld;
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.Vec3d;
import net.minecraft.world.Heightmap; import net.minecraft.world.Heightmap;
import reborncore.api.IToolDrop; import reborncore.api.IToolDrop;
import reborncore.common.blocks.BlockMachineBase; import reborncore.common.blocks.BlockMachineBase;
@ -76,12 +78,12 @@ public class LightningRodBlockEntity extends PowerAcceptorBlockEntity implements
onStatusHoldTicks = 400; onStatusHoldTicks = 400;
return; return;
} }
final LightningEntity lightningBolt = new LightningEntity(world,
pos.getX() + 0.5F, world.getTopPosition(Heightmap.Type.MOTION_BLOCKING, getPos()).getY(), LightningEntity lightningBolt = EntityType.LIGHTNING_BOLT.create(world);
pos.getZ() + 0.5F, false); lightningBolt.method_29495(Vec3d.ofBottomCenter(world.getTopPosition(Heightmap.Type.MOTION_BLOCKING, getPos())));
if (!world.isClient) { if (!world.isClient) {
((ServerWorld) world).addLightning(lightningBolt); ((ServerWorld) world).spawnEntity(lightningBolt);
} }
addEnergy(TechRebornConfig.lightningRodBaseEnergyStrike * (0.3F + weatherStrength)); addEnergy(TechRebornConfig.lightningRodBaseEnergyStrike * (0.3F + weatherStrength));
machineBaseBlock.setActive(true, world, pos); machineBaseBlock.setActive(true, world, pos);

View file

@ -74,7 +74,7 @@ public class DebugToolItem extends Item {
private void sendMessage(ItemUsageContext context, Text string) { private void sendMessage(ItemUsageContext context, Text string) {
if (!context.getWorld().isClient) { if (!context.getWorld().isClient) {
context.getPlayer().sendSystemMessage(string, Util.field_25140); context.getPlayer().sendSystemMessage(string, Util.NIL_UUID);
} }
} }

View file

@ -79,7 +79,7 @@ public class WorldGenerator {
} }
private static void setupTrees() { private static void setupTrees() {
RUBBER_TREE_FEATURE = Registry.register(Registry.FEATURE, new Identifier("techreborn:rubber_tree"), new RubberTreeFeature(TreeFeatureConfig.field_24921)); RUBBER_TREE_FEATURE = Registry.register(Registry.FEATURE, new Identifier("techreborn:rubber_tree"), new RubberTreeFeature(TreeFeatureConfig.CODEC));
RUBBER_TREE_DECORATOR = Registry.register(Registry.DECORATOR, new Identifier("techreborn:rubber_tree"), new RubberTreeDecorator(ChanceDecoratorConfig.field_24980)); RUBBER_TREE_DECORATOR = Registry.register(Registry.DECORATOR, new Identifier("techreborn:rubber_tree"), new RubberTreeDecorator(ChanceDecoratorConfig.field_24980));
WeightedBlockStateProvider logProvider = new WeightedBlockStateProvider(); WeightedBlockStateProvider logProvider = new WeightedBlockStateProvider();