Skip to content

Instantly share code, notes, and snippets.

View matshou's full-sized avatar
📚
Learning C++

Matthew Cain matshou

📚
Learning C++
  • Dresden, Germany
View GitHub Profile
---Returns fog instance.
---@return ClimateManager.ClimateFloat
local function getFogIntensity()
return getClimateManager():getClimateFloat(5);
end
---Update fog intensity with given value
---@param value Float
local function updateFogIntensity(value)
@matshou
matshou / changelog.gradle
Last active March 20, 2021 09:07
Generates project changelog using github-changelog-generator.
/**
* Generates project changelog using github-changelog-generator
* https://github.com/github-changelog-generator/github-changelog-generator
*/
tasks.register("generateChangelog", Exec.class) {
it.description 'Generate a project changelog.'
it.group 'documentation'
def commandArgs = [
@matshou
matshou / gimpfu_help.md
Last active May 21, 2020 14:28
GimpFu Reference Page

Returns the list of images currently open.

>>> gimp.image_list()

Return the last opened image reference.

>>> pdb.gimp.image_list()[0]

Find a layer with a given name in an image.

@matshou
matshou / cocolib_build.gradle
Created May 6, 2020 01:59
Odyssey consuming Minecraft modding library CocoLib
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
}
}
@matshou
matshou / GuiHelper.java
Created May 5, 2020 04:21
Gui helper class to help position elements on the screen.
import net.minecraft.client.MainWindow;
public class GuiHelper {
public static final int DEFAULT_WINDOW_WIDTH = 427;
public static final int DEFAULT_WINDOW_HEIGHT = 240;
public static class Coordinates {
public final int x;
@matshou
matshou / build.gradle
Created May 2, 2020 15:23
Providing files for inspection on #mixin
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
maven { url = 'https://repo.spongepowered.org/maven' }
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
@matshou
matshou / mixin-exception.txt
Created April 17, 2020 21:54
Error initialising mixin config mixins.trcm.json
[17Apr2020 23:49:19.630] [main/DEBUG] [mixin/]: Processing prepare() for PlatformAgent[MixinPlatformAgentDefault:ContainerHandleModLauncher.Resource(trcm-project.1.15.2-0.1.0.jar:C:\Users\Yooks\AppData\Roaming\.minecraft\mods\trcm-project.1.15.2-0.1.0.jar)]
[17Apr2020 23:49:19.631] [main/DEBUG] [mixin/]: Registering mixin config: mixins.trcm.json
[17Apr2020 23:49:19.684] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: org.spongepowered.asm.launch.MixinInitialisationError: Error initialising mixin config mixins.trcm.json
[17Apr2020 23:49:19.684] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at org.spongepowered.asm.mixin.transformer.Config.create(Config.java:153)
[17Apr2020 23:49:19.684] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at org.spongepowered.asm.mixin.Mixins.createConfiguration(Mixins.java:100)
[17Apr2020 23:49:19.684] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: at org.spongepowered.asm.mixin.Mixins.addCo
@matshou
matshou / .editorconfig
Last active May 9, 2020 06:35
Personal Java project code style scheme for IntelliJ IDEA.
[*]
charset = utf-8
end_of_line = crlf
indent_size = 4
indent_style = space
insert_final_newline = false
max_line_length = 110
tab_width = 4
ij_continuation_indent_size = 8
ij_formatter_off_tag = @formatter:off
@matshou
matshou / spotless.gradle
Last active April 24, 2021 03:25
Personal Spotless formatting rules for Java Gradle.
spotless {
/*
* Read Spotless Java documentation here:
* https://diffplug.github.io/spotless/javadoc/spotless-plugin-gradle/3.25.0/
*/
java {
// Include only java source files
target 'src/*/java/**/*.java'
// A sequence of package names
@matshou
matshou / Classic Eclipse.icls
Created January 26, 2020 20:25
Classic Eclipse color scheme for IntelliJ
<scheme name="Classic Eclipse" version="142" parent_scheme="Default">
<option name="FONT_SCALE" value="1.0" />
<metaInfo>
<property name="created">2020-01-25T13:07:03</property>
<property name="ide">Idea</property>
<property name="ideVersion">2019.3.2.0.0</property>
<property name="modified">2020-01-25T13:07:22</property>
<property name="originalScheme">Classic Eclipse</property>
</metaInfo>
<option name="LINE_SPACING" value="1.0" />