Skip to content

Instantly share code, notes, and snippets.

View Geolykt's full-sized avatar
🍴
Fork, fork

Geolykt

🍴
Fork, fork
View GitHub Profile
@Geolykt
Geolykt / build.gradle
Created June 8, 2023 16:31
GcmcStarplane example configuration
plugins {
id 'java'
id 'java-library'
id 'gcmc-starplane' version '0.1.0'
}
group 'de.geolykt'
def archivesBaseName = 'gcmc-test'
version '1.0.0-SNAPSHOT'
v1 official named
CLASS org/bukkit/craftbukkit/libs/com/google/common/annotations/Beta com/google/common/annotations/Beta
CLASS org/bukkit/craftbukkit/libs/com/google/common/annotations/GwtCompatible com/google/common/annotations/GwtCompatible
CLASS org/bukkit/craftbukkit/libs/com/google/common/annotations/GwtIncompatible com/google/common/annotations/GwtIncompatible
CLASS org/bukkit/craftbukkit/libs/com/google/common/annotations/VisibleForTesting com/google/common/annotations/VisibleForTesting
CLASS org/bukkit/craftbukkit/libs/com/google/common/base/Absent com/google/common/base/Absent
CLASS org/bukkit/craftbukkit/libs/com/google/common/base/AbstractIterator$1 com/google/common/base/AbstractIterator$1
CLASS org/bukkit/craftbukkit/libs/com/google/common/base/AbstractIterator$State com/google/common/base/AbstractIterator$State
CLASS org/bukkit/craftbukkit/libs/com/google/common/base/AbstractIterator com/google/common/base/AbstractIterator
CLASS org/bukkit/craftbukkit/libs/com/google/common/base/Ascii
My suggestions to making emperor mode more fun (or rather said turning it into a more traditional 4X game):
The current way of playing emperor mode has the issue that the player is instantly confronted with the full set of features galimulator has to offer: Wars, Diplomacy, fancy Graphs, Lineages, Ships, Wealth, Science and a lot more. Without a tutorial it is simply impossible for a player to figure everything out without getting frustrated. However, the idea is not to have a text-based tutorial but rather exposing the player to the individual gameplay elements one by one (and hiding them from the menus until they get relevant). For this the core gameplay loop needs to get altered to make the first few minutes more friendly:
**Fog of war**:
At the start, players don't see much more than a handful of stars. As they expand they see more. Furthermore, as interactions with other empires don't exist until they are discovered, the relevant UI elements can be hidden from the menu until they are relevant.
**"Co
<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>
<versioning>
<snapshot>
<timestamp>20220725.090125</timestamp>
<buildNumber>47</buildNumber>
</snapshot>
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#NOTE: This file was written by de.geolykt:mavenresolver, a nonstandard resolver implementation!
#Sat Mar 11 23:55:23 CET 2023
maven-metadata-jitpack.xml.error=java.io.IOException\: Query for https\://jitpack.io/org/spigotmc/spigot-api/maven-metadata.xml returned with a response code of 404 (Not Found)
maven-metadata-coreprotect-repo.xml.lastUpdated=1678575062125
maven-metadata-geolykt-maven.xml.lastUpdated=1672852515277
maven-metadata-central.xml.error=java.io.IOException\: Query for https\://repo1.maven.org/maven2/org/spigotmc/spigot-api/maven-metadata.xml returned with a response code of 404 (Not Found)
maven-metadata-spigot-repo.xml.lastUpdated=1678575061507
maven-metadata-sk89q-repo.xml.lastUpdated=1678575061952
maven-metadata-rosewood-repo.xml.error=java.io.IOException\: Query for https\://repo.rosewooddev.io/repository/public/org/spigotmc/spigot-api/maven-metadata.xml returned with a response c
java.lang.ClassCastException: com.sun.tools.javac.code.Type$AnnotatedType cannot be cast to com.sun.tools.javac.code.Type$ClassType
at com.sun.tools.javac.api.JavacTrees$3.visitErrorType(JavacTrees.java:689)
at com.sun.tools.javac.api.JavacTrees$3.visitErrorType(JavacTrees.java:646)
at com.sun.tools.javac.code.Type$ErrorType.accept(Type.java:1829)
at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:4571)
at com.sun.tools.javac.api.JavacTrees.fuzzyMatch(JavacTrees.java:642)
at com.sun.tools.javac.api.JavacTrees.fuzzyMatch(JavacTrees.java:633)
at com.sun.tools.javac.api.JavacTrees.hasParameterTypes(JavacTrees.java:625)
at com.sun.tools.javac.api.JavacTrees.searchMethod(JavacTrees.java:572)
at com.sun.tools.javac.api.JavacTrees.findMethod(JavacTrees.java:528)
@Geolykt
Geolykt / DeprecationAnnotationMigrator.java
Created May 19, 2023 17:17
Migrate Java 9+ `@Deprecated` to Java 8 Deprecated annotations
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.util.Iterator;
import java.util.List;
public class DeprecationAnnotationMigrator {
public static void main(String[] args) throws IOException {
Obligatory foreword: Please be aware that the galimulator modding scene has moved in a very different direction compared to most JVM modding communities and we are still stuck in the past when it comes to certain things. While tinyv2 isn't something we plan to use anytime soon (we make hefty use of tinyv1 though), future developments could mean that newer versions of tiny are used, which is why I feel inclined to comment on this matter.
Signatures: Those are already automatically generated by our deobfuscator, however the data it generates is directly applied to the jar. In the past there has been no need to store signatures separately to disk. In the future it is planned to double down on the automation, thus merging those files would make sense - especially if it is supported by enigma-like tools.
Per-class default LVT names: An interesting idea - however I can't recall any cases where I'd need it. In minecraft space there is a larger usecase though given that suffixes and prefixes are used frequently.
A
@Geolykt
Geolykt / SidedProcessingSlotWrapper.java
Created April 24, 2023 20:20
SidedProcessingSlotWrapper attempt
package com.smashingmods.alchemylib.api.storage;
import javax.annotation.Nullable;
import org.jetbrains.annotations.NotNull;
import net.minecraft.core.Direction;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.items.IItemHandler;
@Geolykt
Geolykt / Pixmap2PixmapBlitter.java
Created January 2, 2023 15:36
Old half-broken Pixmap2PixmapBlitter
package de.geolykt.cityblitter.blitting;
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import org.slf4j.LoggerFactory;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.Pixmap.Format;