Skip to content

Instantly share code, notes, and snippets.

View maruohon's full-sized avatar

Matti Ruohonen maruohon

View GitHub Profile
@maruohon
maruohon / config_locks.json
Created January 12, 2024 21:29
malilib config locks mockup
{
// NOTE: Do not leave the comments to an actual live config, they will break the parser!
"malilib_config_overrides":
[
{
// Optional. If not specified, then targets all mods by default. Accepts a regex targeting mod IDs.
"mod": ".*",
// Optional. If not specified, then targets all categories by default.
@maruohon
maruohon / client_mod_checksums.txt
Created June 7, 2023 18:12
masa client mod checksums
I may expand this list at some point, but here are the latest 1.19.4 client mod checksums.
Preferably check with at least two different hash algorithms, and in particular don't trust the MD5 algorithm alone!
MD5:
35d3f3b93e56bef87236799dda92d195 itemscroller-fabric-1.19.4-0.19.2.jar
115a84d9a0db155cac8bc648ac28c4f4 litematica-fabric-1.19.4-0.14.3.jar
c01773cfb3db4fd88803d9c3373eb6f7 malilib-fabric-1.19.4-0.15.4.jar
f30373745c8203ebd0ee3f9ee4df2055 minihud-fabric-1.19.4-0.26.2.jar
e3a2476d9af969ecc912d027cce2ee6b tweakeroo-fabric-1.19.4-0.16.0.jar
{
"mod_features":
[
{
// Optional. If not specified, then targets all mods by default. Accepts a regex targeting mod IDs.
"mod": ".*",
// Optional. If present, forces a default policy for all the features from the matched mods. Allowed values are "allow" or "deny".
// The overrides list below can be used to override the default policy for select features.
"policy": "deny",
// Optional. Can add a message that is visible to the user in the config menu for each overridden config option. Note that this only makes sense when disallowing/overriding features.
@maruohon
maruohon / tweakeroo-placement.md
Created February 1, 2020 23:08
Tweakeroo block placement features

Block rotations and offsets in Tweakeroo:

  • Tweakeroo has two separate tweaks for rotations: Flexible Block Placement and Accurate Block Placement.
  • In both cases you need to enable the feature in the Tweak Toggles category (or using a hotkey in Tweak Hotkeys)
  • Then you need to set the activation keys in the Generic Hotkeys category, which you will hold when you want to place a block in a certain way.
  • Flexible Placement gives you the 5-way overlay that you may have seen in some videos. Using the offset activation key, it will place the block either diagonally or with a one block gap from the clicked block. With the rotation key it will rotate the block to "face to the direction indicated by the overlay" (play with it to get a feel for it).
  • The Accurate Placement feature is what you usually want for pistons/observers/droppers/dispensers. It has two activation keys, accurateBlockPlacementInto and accurateBlockPlacementReverse. The into key will make the placed block face into t
public static RayTraceResult rayTraceFromPlayer(World worldIn, EntityPlayer playerIn, boolean useLiquids)
{
float f = playerIn.prevRotationPitch + (playerIn.rotationPitch - playerIn.prevRotationPitch);
float f1 = playerIn.prevRotationYaw + (playerIn.rotationYaw - playerIn.prevRotationYaw);
double d0 = playerIn.prevPosX + (playerIn.posX - playerIn.prevPosX);
double d1 = playerIn.prevPosY + (playerIn.posY - playerIn.prevPosY) + (double)(worldIn.isRemote ? playerIn.getEyeHeight() - playerIn.getDefaultEyeHeight() : playerIn.getEyeHeight()); // isRemote check to revert changes to ray trace position due to adding the eye height clientside and player yOffset differences
double d2 = playerIn.prevPosZ + (playerIn.posZ - playerIn.prevPosZ);
Vec3d eyesVec = new Vec3d(d0, d1, d2);
float f2 = MathHelper.cos(-f1 * 0.017453292F - (float)Math.PI);
float f3 = MathHelper.sin(-f1 * 0.017453292F - (float)Math.PI);
{
"dimensions": [
{
"dim": -1,
"worldinfo": {}
},
{
"dim": 1,
"dimensiontype": {
"name": "DIM1",
@maruohon
maruohon / gist:4fb888eafadd87d4a17c
Created July 19, 2015 17:29
Example configuration for my Minecraft Overviewer port for FTB Direwolf20 1.6.4 mod pack
worlds["[quad] FTB Direwolf20 1.6.4"] = "/data/game_servers/minecraft/servers/ftb_dw20_164/world"
outputdir = "/data/overviewer/ftb_dw20_164"
texturepath = "/data/minecraft/tools/textures/1.6.4_modded"
nether_smooth = [Base(), EdgeLines(), Nether(), SmoothLighting(strength=0.6)]
end_smooth = [Base(), EdgeLines(), SmoothLighting(strength=0.85, night=True)]
############ Renders ###############################
# Normal Overworld render
@maruohon
maruohon / gist:49ef39c3992316202553
Created November 11, 2014 18:13
A bash script to generate huge Minecraft worlds in several smaller parts
#!/bin/bash
#
# Author: masa
# Date: 2014-11-11
#
# A script for automatically creating (from a template), starting, stopping and running
# a command on multiple Minecraft server instances.
# The goal is to quickly generate a huge Minecraft world in a multiprocessor environment.
# The script is currently built around running 16 separate instances at once,
# and the world it will generate is 50k x 50k blocks (about, a little more since it is 100 x 100 region files).
@maruohon
maruohon / log4j2.xml
Last active September 17, 2021 10:08
Minecraft server logging configuration file for Minecraft 1.7.2+
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Appenders>
<File name="legacy_server_log" fileName="server.log">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%level] %msg%n" />
</File>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%level] %msg%n" />
</Console>