Crying Obsidian Nether Portal
This commit is contained in:
parent
b02c3982c1
commit
4197534e8f
@ -1,5 +1,8 @@
|
||||
# Changelog
|
||||
|
||||
**1.0.5**
|
||||
* Crying Obsidian Nether Portal
|
||||
|
||||
**1.0.4**
|
||||
* Allow Opening Loot Chests In Spectator Mode
|
||||
|
||||
|
@ -10,6 +10,7 @@ Suggest more tweaks in the issue tracker!
|
||||
* Throwable Slimeballs
|
||||
* Throwable Spawn Eggs
|
||||
* Open Loot Chests In Spectator Mode
|
||||
* Crying Obsidian Nether Portal
|
||||
|
||||
## Changelog
|
||||
[View Changelog](CHANGELOG.md)
|
||||
|
@ -6,11 +6,11 @@ org.gradle.jvmargs = -Xmx1G
|
||||
minecraft_version = 20w12a
|
||||
curseforge_id = 368420
|
||||
simple_minecraft_version = 1.16-Snapshot
|
||||
yarn_build = 14
|
||||
yarn_build = 16
|
||||
fabric_loader_version = 0.7.8+build.189
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.0.4
|
||||
mod_version = 1.0.5
|
||||
maven_group = com.thebrokenrail
|
||||
archives_base_name = slightlyvanilla
|
||||
|
||||
@ -19,4 +19,4 @@ org.gradle.jvmargs = -Xmx1G
|
||||
fabric_api_version = 0.5.5+build.311-1.16
|
||||
cloth_config_version = 3.1.0-unstable
|
||||
auto_config_version = 1.2.4
|
||||
mod_menu_version = 1.10.2+build.1
|
||||
mod_menu_version = 1.11.0+build.2
|
||||
|
@ -13,6 +13,7 @@ public class ModConfig implements ConfigData {
|
||||
@ConfigEntry.Gui.CollapsibleObject(startExpanded = true)
|
||||
public ThrowableOption throwableSpawnEggs = new ThrowableOption(true, false);
|
||||
public boolean openLootChestsInSpectatorMode = true;
|
||||
public boolean cryingObsidianNetherPortal = true;
|
||||
|
||||
public static class ThrowableOption {
|
||||
public boolean player;
|
||||
|
@ -6,6 +6,8 @@ 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;
|
||||
@ -17,6 +19,7 @@ import net.minecraft.entity.projectile.ProjectileEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.item.SpawnEggItem;
|
||||
import net.minecraft.tag.Tag;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPointer;
|
||||
import net.minecraft.util.math.Direction;
|
||||
@ -30,6 +33,8 @@ 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();
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
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 {
|
||||
@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockState;getBlock()Lnet/minecraft/block/Block;"), method = {"distanceToPortalEdge", "findHeight"})
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
@ -9,6 +9,7 @@
|
||||
"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",
|
||||
"entity.slightlyvanilla.slimeball": "Slimeball",
|
||||
"entity.slightlyvanilla.spawn_egg": "Spawn Egg"
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:crying_obsidian"
|
||||
]
|
||||
}
|
@ -10,7 +10,8 @@
|
||||
"MixinPlayerEntity",
|
||||
"MixinItem",
|
||||
"MixinSpawnEggItem",
|
||||
"MixinLootableContainerBlockEntity"
|
||||
"MixinLootableContainerBlockEntity",
|
||||
"MixinNetherPortalBlockAreaHelper"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
Reference in New Issue
Block a user