Update To 1.16.2
SlightlyVanilla/pipeline/head This commit looks good Details

This commit is contained in:
TheBrokenRail 2020-08-24 18:08:54 -04:00
parent 8342ef83ec
commit ed494fd52a
8 changed files with 43 additions and 31 deletions

12
Jenkinsfile vendored
View File

@ -15,5 +15,17 @@ pipeline {
}
}
}
stage('Publish') {
when {
expression {
return sh(returnStdout: true, script: 'git tag --contains').trim().length() > 0
}
}
steps {
withCredentials([string(credentialsId: 'curseforge_key', variable: 'CURSEFORGE_KEY')]) {
sh './gradlew -Pcurseforge.api_key="${CURSEFORGE_KEY}" curseforge'
}
}
}
}
}

View File

@ -31,9 +31,9 @@ dependencies {
modImplementation "me.shedaniel.cloth:config-2:${project.cloth_config_version}"
include "me.shedaniel.cloth:config-2:${project.cloth_config_version}"
modImplementation "me.sargunvohra.mcmods:autoconfig1u:${project.auto_config_version}"
include "me.sargunvohra.mcmods:autoconfig1u:${project.auto_config_version}"
modImplementation "io.github.prospector:modmenu:${project.mod_menu_version}"
modImplementation "me.sargunvohra.mcmods:autoconfig1u:${project.autoconfig_version}"
include "me.sargunvohra.mcmods:autoconfig1u:${project.autoconfig_version}"
modImplementation "io.github.prospector:modmenu:${project.modmenu_version}"
}
processResources {

View File

@ -3,11 +3,11 @@ org.gradle.jvmargs = -Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version = 1.16.1
minecraft_version = 1.16.2
curseforge_id = 368420
simple_minecraft_version = 1.16.1
yarn_build = 4
fabric_loader_version = 0.8.8+build.202
simple_minecraft_version = 1.16.2
yarn_build = 21
fabric_loader_version = 0.9.2+build.206
# Mod Properties
mod_version = 1.0.9
@ -16,7 +16,7 @@ org.gradle.jvmargs = -Xmx1G
# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_api_version = 0.13.1+build.370-1.16
cloth_config_version = 4.5.6
auto_config_version = 3.2.0-unstable
mod_menu_version = 1.12.2+build.16
fabric_api_version = 0.19.0+build.398-1.16
modmenu_version = 1.14.6+build.31
cloth_config_version = 4.7.0-unstable
autoconfig_version = 3.2.0-unstable

View File

@ -29,7 +29,7 @@ public class SlightlyVanilla implements ModInitializer {
public static EntityType<SlimeballEntity> SLIMEBALL_ENTITY;
public static EntityType<SpawnEggEntity> SPAWN_EGG_ENTITY;
public static final Tag<Block> EXTRA_PORTAL_BLOCKS_TAG = TagRegistry.block(new Identifier(NAMESPACE, "extra_portal_blocks"));
public static final Tag<Block> NETHER_PORTAL_FRAME_BLOCKS_TAG = TagRegistry.block(new Identifier(NAMESPACE, "nether_portal_frame_blocks"));
public static ModConfig getConfig() {
return AutoConfig.getConfigHolder(ModConfig.class).getConfig();

View File

@ -49,7 +49,7 @@ public class SlimeballEntity extends ThrownItemEntity {
ParticleEffect particleEffect = getParticleParameters();
for (int i = 0; i < 8; ++i) {
world.addParticle(particleEffect, getX(), getY(), getZ(), 0.0D, 0.0D, 0.0D);
getEntityWorld().addParticle(particleEffect, getX(), getY(), getZ(), 0.0D, 0.0D, 0.0D);
}
}
}
@ -57,8 +57,8 @@ public class SlimeballEntity extends ThrownItemEntity {
@Override
protected void onCollision(HitResult hitResult) {
super.onCollision(hitResult);
if (!world.isClient()) {
world.sendEntityStatus(this, (byte) 3);
if (!getEntityWorld().isClient()) {
getEntityWorld().sendEntityStatus(this, (byte) 3);
remove();
}
}

View File

@ -15,6 +15,7 @@ import net.minecraft.network.packet.s2c.play.EntitySpawnS2CPacket;
import net.minecraft.particle.ItemStackParticleEffect;
import net.minecraft.particle.ParticleEffect;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.hit.HitResult;
import net.minecraft.world.World;
@ -52,7 +53,7 @@ public class SpawnEggEntity extends ThrownItemEntity {
ParticleEffect particleEffect = getParticleParameters();
for (int i = 0; i < 8; ++i) {
world.addParticle(particleEffect, getX(), getY(), getZ(), 0.0D, 0.0D, 0.0D);
getEntityWorld().addParticle(particleEffect, getX(), getY(), getZ(), 0.0D, 0.0D, 0.0D);
}
}
}
@ -60,10 +61,10 @@ public class SpawnEggEntity extends ThrownItemEntity {
@Override
protected void onCollision(HitResult hitResult) {
super.onCollision(hitResult);
if (!world.isClient()) {
world.sendEntityStatus(this, (byte) 3);
if (!getEntityWorld().isClient()) {
getEntityWorld().sendEntityStatus(this, (byte) 3);
EntityType<?> entityType = ((SpawnEggItem) getStack().getItem()).getEntityType(getStack().getTag());
entityType.spawnFromItemStack(world, getItem(), null, getBlockPos(), SpawnReason.SPAWN_EGG, false, false);
entityType.spawnFromItemStack((ServerWorld) getEntityWorld(), getItem(), null, getBlockPos(), SpawnReason.SPAWN_EGG, false, false);
remove();
}
}

View File

@ -1,24 +1,22 @@
package com.thebrokenrail.slightlyvanilla.mixin;
import com.thebrokenrail.slightlyvanilla.SlightlyVanilla;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.NetherPortalBlock;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.BlockView;
import net.minecraft.world.dimension.AreaHelper;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@SuppressWarnings("unused")
@Mixin(NetherPortalBlock.AreaHelper.class)
@Mixin(AreaHelper.class)
public class MixinNetherPortalBlockAreaHelper {
@SuppressWarnings("UnresolvedMixinReference")
@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockState;isOf(Lnet/minecraft/block/Block;)Z"), method = "*")
public boolean redirectBlock(BlockState state, Block obsidian) {
if (SlightlyVanilla.getConfig().cryingObsidianNetherPortal && state.isIn(SlightlyVanilla.EXTRA_PORTAL_BLOCKS_TAG) && obsidian == Blocks.OBSIDIAN) {
return true;
} else {
return state.isOf(obsidian);
@Inject(at = @At("HEAD"), method = "method_30487", cancellable = true)
private static void isValidFrameBlock(BlockState state, BlockView world, BlockPos pos, CallbackInfoReturnable<Boolean> info) {
if (SlightlyVanilla.getConfig().cryingObsidianNetherPortal) {
info.setReturnValue(state.isIn(SlightlyVanilla.NETHER_PORTAL_FRAME_BLOCKS_TAG));
}
}
}

View File

@ -1,6 +1,7 @@
{
"replace": false,
"values": [
"minecraft:obsidian",
"minecraft:crying_obsidian"
]
}