Compare commits

...
This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.

1 Commits
master ... 1.15

Author SHA1 Message Date
3ab20c3200 Port to 1.15.2
All checks were successful
SlightlyVanilla/pipeline/head This commit looks good
2020-03-25 11:25:54 -04:00
14 changed files with 19 additions and 81 deletions

View File

@ -1,5 +1,9 @@
# Changelog
**1.15.2 Port**
* Remove Crying Obsidian Nether Portal
* Remove Use Respawn Anchor In Any Dimension
**1.0.9**
* Disable Instant Nether Portal In Creative

View File

@ -1,16 +1,16 @@
# SlightlyVanilla
**1.15.2 Port**
A Collection of Tweaks for Vanilla Minecraft
All tweaks can be enabled/disabled individually.
Suggest more tweaks in the issue tracker!
## Tweaks
* Use Respawn Anchor in Any Dimension
* Instant Kill In Creative Mode
* Throwable Slimeballs
* Throwable Spawn Eggs
* Open Loot Chests In Spectator Mode
* Crying Obsidian Nether Portal
* Allow Leashing Villagers
* Disable Instant Nether Portal In Creative

View File

@ -84,7 +84,7 @@ if (project.hasProperty('curseforge.api_key')) {
apiKey = project.getProperty('curseforge.api_key')
project {
id = project.curseforge_id
changelog = 'A changelog can be found at https://gitea.thebrokenrail.com/TheBrokenRail/SlightlyVanilla/src/branch/master/CHANGELOG.md'
changelog = 'A changelog can be found at https://gitea.thebrokenrail.com/TheBrokenRail/SlightlyVanilla/src/branch/1.15/CHANGELOG.md'
releaseType = 'release'
addGameVersion project.simple_minecraft_version
addGameVersion 'Fabric'

View File

@ -3,10 +3,10 @@ org.gradle.jvmargs = -Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version = 20w12a
minecraft_version = 1.15.2
curseforge_id = 368420
simple_minecraft_version = 1.16-Snapshot
yarn_build = 18
simple_minecraft_version = 1.15.2
yarn_build = 14
fabric_loader_version = 0.7.8+build.189
# Mod Properties
@ -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.5.5+build.311-1.16
cloth_config_version = 3.1.0-unstable
fabric_api_version = 0.5.1+build.294-1.15
cloth_config_version = 2.9.3
auto_config_version = 1.2.4
mod_menu_version = 1.11.0+build.2
mod_menu_version = 1.10.2+build.32

View File

@ -6,14 +6,12 @@ import me.sargunvohra.mcmods.autoconfig1u.annotation.ConfigEntry;
@Config(name = SlightlyVanilla.NAMESPACE)
public class ModConfig implements ConfigData {
public boolean useRespawnAnchorInAnyDimension = true;
public boolean instantKillInCreative = true;
@ConfigEntry.Gui.CollapsibleObject(startExpanded = true)
public ThrowableOption throwableSlimeballs = new ThrowableOption(true, true);
@ConfigEntry.Gui.CollapsibleObject(startExpanded = true)
public ThrowableOption throwableSpawnEggs = new ThrowableOption(true, false);
public boolean openLootChestsInSpectatorMode = true;
public boolean cryingObsidianNetherPortal = true;
public boolean allowLeashingVillagers = true;
public boolean disableInstantNetherPortalInCreative = true;

View File

@ -6,8 +6,6 @@ import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
import me.sargunvohra.mcmods.autoconfig1u.serializer.GsonConfigSerializer;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.entity.FabricEntityTypeBuilder;
import net.fabricmc.fabric.api.tag.TagRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.DispenserBlock;
import net.minecraft.block.dispenser.ItemDispenserBehavior;
import net.minecraft.block.dispenser.ProjectileDispenserBehavior;
@ -15,14 +13,13 @@ import net.minecraft.entity.EntityCategory;
import net.minecraft.entity.EntityDimensions;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.SpawnType;
import net.minecraft.entity.projectile.Projectile;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.projectile.ProjectileEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.item.SpawnEggItem;
import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvents;
import net.minecraft.tag.Tag;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.BlockPointer;
import net.minecraft.util.math.Direction;
@ -38,8 +35,6 @@ 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 ModConfig getConfig() {
return AutoConfig.getConfigHolder(ModConfig.class).getConfig();
}
@ -58,7 +53,7 @@ public class SlightlyVanilla implements ModInitializer {
if (getConfig().throwableSlimeballs.dispenser) {
return new ProjectileDispenserBehavior() {
@Override
protected ProjectileEntity createProjectile(World position, Position stack, ItemStack itemStack) {
protected Projectile createProjectile(World position, Position stack, ItemStack itemStack) {
SlimeballEntity entity = new SlimeballEntity(position, stack.getX(), stack.getY(), stack.getZ());
entity.setItem(itemStack);
return entity;
@ -74,7 +69,7 @@ public class SlightlyVanilla implements ModInitializer {
if (getConfig().throwableSpawnEggs.dispenser) {
return new ProjectileDispenserBehavior() {
@Override
protected ProjectileEntity createProjectile(World position, Position stack, ItemStack itemStack) {
protected Projectile createProjectile(World position, Position stack, ItemStack itemStack) {
SpawnEggEntity entity = new SpawnEggEntity(position, stack.getX(), stack.getY(), stack.getZ());
entity.setItem(itemStack);
return entity;

View File

@ -5,7 +5,7 @@ import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.projectile.thrown.ThrownItemEntity;
import net.minecraft.entity.thrown.ThrownItemEntity;
import net.minecraft.item.Item;
import net.minecraft.item.Items;
import net.minecraft.network.Packet;
@ -56,7 +56,6 @@ public class SlimeballEntity extends ThrownItemEntity {
@Override
protected void onCollision(HitResult hitResult) {
super.onCollision(hitResult);
if (!world.isClient()) {
world.sendEntityStatus(this, (byte) 3);
remove();

View File

@ -6,7 +6,7 @@ import net.fabricmc.api.Environment;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.SpawnType;
import net.minecraft.entity.projectile.thrown.ThrownItemEntity;
import net.minecraft.entity.thrown.ThrownItemEntity;
import net.minecraft.item.Item;
import net.minecraft.item.Items;
import net.minecraft.item.SpawnEggItem;
@ -59,7 +59,6 @@ public class SpawnEggEntity extends ThrownItemEntity {
@Override
protected void onCollision(HitResult hitResult) {
super.onCollision(hitResult);
if (!world.isClient()) {
world.sendEntityStatus(this, (byte) 3);
EntityType<?> entityType = ((SpawnEggItem) getStack().getItem()).getEntityType(getStack().getTag());

View File

@ -1,25 +0,0 @@
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 org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@SuppressWarnings("unused")
@Mixin(NetherPortalBlock.AreaHelper.class)
public class MixinNetherPortalBlockAreaHelper {
@SuppressWarnings("UnresolvedMixinReference")
@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockState;getBlock()Lnet/minecraft/block/Block;"), method = "*")
public Block redirectBlock(BlockState state) {
Block block = state.getBlock();
if (block.isIn(SlightlyVanilla.EXTRA_PORTAL_BLOCKS_TAG) && SlightlyVanilla.getConfig().cryingObsidianNetherPortal) {
return Blocks.OBSIDIAN;
} else {
return block;
}
}
}

View File

@ -1,22 +0,0 @@
package com.thebrokenrail.slightlyvanilla.mixin;
import com.thebrokenrail.slightlyvanilla.SlightlyVanilla;
import net.minecraft.block.RespawnAnchorBlock;
import net.minecraft.world.dimension.Dimension;
import net.minecraft.world.dimension.DimensionType;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@SuppressWarnings("unused")
@Mixin(RespawnAnchorBlock.class)
public class MixinRespawnAnchorBlock {
@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/world/dimension/Dimension;getType()Lnet/minecraft/world/dimension/DimensionType;", ordinal = 0), method = "onUse")
public DimensionType getDimension(Dimension dimension) {
if (SlightlyVanilla.getConfig().useRespawnAnchorInAnyDimension) {
return DimensionType.THE_NETHER;
} else {
return dimension.getType();
}
}
}

View File

@ -1,6 +1,5 @@
{
"text.autoconfig.slightlyvanilla.title": "SlightlyVanilla Tweaks",
"text.autoconfig.slightlyvanilla.option.useRespawnAnchorInAnyDimension": "Use Respawn Anchor In Any Dimension",
"text.autoconfig.slightlyvanilla.option.instantKillInCreative": "Instant Kill In Creative Mode",
"text.autoconfig.slightlyvanilla.option.throwableSlimeballs": "Throwable Slimeballs",
"text.autoconfig.slightlyvanilla.option.throwableSlimeballs.player": "Player",
@ -9,7 +8,6 @@
"text.autoconfig.slightlyvanilla.option.throwableSpawnEggs.player": "Player",
"text.autoconfig.slightlyvanilla.option.throwableSpawnEggs.dispenser": "Dispenser",
"text.autoconfig.slightlyvanilla.option.openLootChestsInSpectatorMode": "Open Loot Chests In Spectator Mode",
"text.autoconfig.slightlyvanilla.option.cryingObsidianNetherPortal": "Crying Obsidian Nether Portal",
"text.autoconfig.slightlyvanilla.option.allowLeashingVillagers": "Allow Leashing Villagers",
"text.autoconfig.slightlyvanilla.option.disableInstantNetherPortalInCreative": "Disable Instant Nether Portal In Creative",
"entity.slightlyvanilla.slimeball": "Slimeball",

View File

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

View File

@ -32,6 +32,6 @@
"depends": {
"fabricloader": ">=0.7.4",
"fabric": "*",
"minecraft": "1.16.x"
"minecraft": "1.15.x"
}
}

View File

@ -6,12 +6,10 @@
"MixinClientPlayNetworkHandler"
],
"mixins": [
"MixinRespawnAnchorBlock",
"MixinPlayerEntity",
"MixinItem",
"MixinSpawnEggItem",
"MixinLootableContainerBlockEntity",
"MixinNetherPortalBlockAreaHelper",
"MixinAbstractTraderEntity"
],
"injectors": {