Browse Source

1.0.12

master
TheBrokenRail 6 months ago
parent
commit
dd4694ec40
  1. 3
      CHANGELOG.md
  2. 10
      gradle.properties
  3. 1
      src/main/java/com/thebrokenrail/slightlyvanilla/ModConfig.java
  4. 20
      src/main/java/com/thebrokenrail/slightlyvanilla/mixin/MixinServerPlayerEntity.java
  5. 1
      src/main/resources/assets/slightlyvanilla/lang/en_us.json
  6. 3
      src/main/resources/slightlyvanilla.mixins.json

3
CHANGELOG.md

@ -1,5 +1,8 @@
# Changelog
**1.0.12**
* Allow Disabling Beds Setting Spawn
**1.0.11**
* Fix Loading On Client Without ModMenu
* Fix Loading On Server

10
gradle.properties

@ -3,11 +3,11 @@ org.gradle.jvmargs = -Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version = 1.16.3
minecraft_version = 1.16.4
curseforge_id = 368420
simple_minecraft_version = 1.16.3
yarn_build = 47
fabric_loader_version = 0.10.3+build.211
simple_minecraft_version = 1.16.4
yarn_build = 7
fabric_loader_version = 0.10.8
# Mod Properties
mod_version = 1.0.11
@ -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.24.1+build.412-1.16
fabric_api_version = 0.28.1+1.16
modmenu_version = 1.14.6+build.31
cloth_config_version = 4.7.0-unstable
autoconfig_version = 3.2.0-unstable

1
src/main/java/com/thebrokenrail/slightlyvanilla/ModConfig.java

@ -21,6 +21,7 @@ public class ModConfig implements ConfigData {
public boolean disableInstantNetherPortalInCreative = true;
@Environment(EnvType.CLIENT)
public boolean noteBlockScreen = true;
public boolean bedsSetSpawn = true;
public static class ThrowableOption {
public boolean player;

20
src/main/java/com/thebrokenrail/slightlyvanilla/mixin/MixinServerPlayerEntity.java

@ -0,0 +1,20 @@
package com.thebrokenrail.slightlyvanilla.mixin;
import com.thebrokenrail.slightlyvanilla.SlightlyVanilla;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.registry.RegistryKey;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(ServerPlayerEntity.class)
public class MixinServerPlayerEntity {
@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/server/network/ServerPlayerEntity;setSpawnPoint(Lnet/minecraft/util/registry/RegistryKey;Lnet/minecraft/util/math/BlockPos;FZZ)V"), method = "trySleep")
public void setSpawnPoint(ServerPlayerEntity obj, RegistryKey<World> dimension, BlockPos pos, float angle, boolean spawnPointSet, boolean bl) {
if (SlightlyVanilla.getConfig().bedsSetSpawn) {
obj.setSpawnPoint(dimension, pos, angle, spawnPointSet, bl);
}
}
}

1
src/main/resources/assets/slightlyvanilla/lang/en_us.json

@ -13,6 +13,7 @@
"text.autoconfig.slightlyvanilla.option.allowLeashingVillagers": "Allow Leashing Villagers",
"text.autoconfig.slightlyvanilla.option.disableInstantNetherPortalInCreative": "Disable Instant Nether Portal In Creative",
"text.autoconfig.slightlyvanilla.option.noteBlockScreen": "Add Note Block Screen",
"text.autoconfig.slightlyvanilla.option.bedsSetSpawn": "Beds Set Spawn",
"entity.slightlyvanilla.slimeball": "Slimeball",
"entity.slightlyvanilla.spawn_egg": "Spawn Egg",
"text.slightlyvanilla.noteblock_screen_slider": "Note: %s (%s)",

3
src/main/resources/slightlyvanilla.mixins.json

@ -3,8 +3,8 @@
"package": "com.thebrokenrail.slightlyvanilla.mixin",
"compatibilityLevel": "JAVA_8",
"client": [
"MixinClientPlayNetworkHandler",
"MixinClientPlayerInteractionManager",
"MixinClientPlayNetworkHandler",
"ScreenHandlerAccessor"
],
"mixins": [
@ -14,6 +14,7 @@
"MixinNetherPortalBlockAreaHelper",
"MixinPlayerEntity",
"MixinRespawnAnchorBlock",
"MixinServerPlayerEntity",
"MixinSpawnEggItem"
],
"injectors": {

Loading…
Cancel
Save