Skip to content

Instantly share code, notes, and snippets.

Avatar

Brennan Ward Shadows-of-Fire

View GitHub Profile
@Shadows-of-Fire
Shadows-of-Fire / news.md
Last active Dec 16, 2021
Apotheosis 1.18 news
View news.md

Port work is beginning for Apotheosis. This means a ton of things are going to be redone, looked at, touched up, or perhaps even removed. The current slate of preemptive changes thus far looks like this:

Garden Module
No real changes. The content in this module is focused solely on the growth cap changes to bamboo, sugarcane, and cacti. The way they work might change a little bit, but not in a way that would be noticable.
The psuedo-changes are because the world height is no longer capped.

Potion Module
Endless Quiver will be moving to the Enchantment Module. This has been a long time coming but the change was never made due to binary compat reasons.
Everything else (sundering, ancient knowledge, potion charms, recipes) will be staying as-is.

View DarkoHaxRP.java
package shadows.darkohax2;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import net.minecraftforge.fml.common.Mod;
@Mod(DarkoHaxRP.MODID)
public class DarkoHaxRP {
View FastSuite.log
(Time values are in microseconds)
FastSuite (Cache Size 100):
Seek Times for Recipe iron nugget : [108, 44, 47, 37, 72, 44, 22, 21, 21, 18]
Seek Times for Recipe sticks : [1287, 1, 1, 1, 1, 2, 2, 1, 1, 1]
Seek Times for Recipe crafting table : [151, 0, 0, 0, 0, 1, 0, 0, 0, 0]
Seek Times for Recipe acacia planks : [4831, 12, 10, 10, 8, 17, 8, 10, 4, 4]
Seek Times for Recipe failure : [657, 344, 333, 306, 277, 372, 219, 189, 182, 180]
Seek Times for Recipe gold nugget : [29, 24, 26, 19, 68, 88, 20, 12, 12, 11]
View githubdark.css
@-moz-document domain("githubusercontent.com"), domain("graphql-explorer.githubapp.com"), regexp("^https?://((blog|gist|guides|help|raw|resources|status|developer)\\.)?github\\.com/((?!generated_pages/preview).)*$") {
/*! Github Dark v1.20.84 (2018-11-19) */
/*! Repository: https://github.com/StylishThemes/GitHub-Dark */
/*! Userstyle: http://userstyles.org/styles/37035 */
/*! License: https://creativecommons.org/licenses/by-sa/4.0/ */
/* Override default browser styles */
button {
color: #b5b5b5 !important;
}
/* begin auto-generated rules - use tools/generate.js to generate them */
View ItemAdapter.java
private static class ItemAdapter extends TypeAdapter<ItemStack> {
@Override
public void write(JsonWriter out, ItemStack s) throws IOException {
out.beginObject();
out.name("item").value(s.getItem().getRegistryName().toString());
out.name("meta").value(s.getItemDamage());
out.name("count").value(s.getCount());
if (s.hasTagCompound()) out.beginObject().name("nbt").value(s.getTagCompound().toString()).endObject();
out.endObject();
View attained_drops_custom.properties
gold_ingot=minecraft:gold_ingot|0xfdf55f
iron_ingot=minecraft:iron_ingot|0xd8d8d8
diamond=minecraft:diamond|0xa1fbe8
emerald=minecraft:emerald|0x17dd62
sea_heart=minecraft:heart_of_the_sea|0x2180a1
lapis=minecraft:lapis_lazuli|0x345ec3
redstone=minecraft:redstone|0xaa0f01
View gist:7c83dd262cec9f2f77a8839d0113a501
[06:43:29] [modloading-worker-14/ERROR]: Caught exception during event FMLLoadCompleteEvent dispatch for modid world_blender
java.lang.NullPointerException: null
at net.telepathicgrunt.worldblender.the_blender.FeatureGrouping.isLaggyFeature(FeatureGrouping.java:144) ~[?:?]
at net.telepathicgrunt.worldblender.the_blender.PerformBiomeBlending.addBiomeFeatures(PerformBiomeBlending.java:217) ~[?:?]
at net.telepathicgrunt.worldblender.the_blender.PerformBiomeBlending.setupBiomes(PerformBiomeBlending.java:68) ~[?:?]
at net.telepathicgrunt.worldblender.CommonModBusEventHandler.latestCommonSetup(CommonModBusEventHandler.java:26) ~[?:?]
at net.minecraftforge.eventbus.ASMEventHandler_102_CommonModBusEventHandler_latestCommonSetup_FMLLoadCompleteEvent.invoke(.dynamic) ~[?:?]
at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:80) ~[eventbus-2.0.0-milestone.1-service.jar:?]
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258) ~[eventbus-2.0.0-milestone.1-service.jar:?]
at net.min
View InfixPrefix.txt
Conversion: Infix -> Prefix
(a + b) -> + a b
((x + b) * (y - d)) -> * + x b - y d
(((a + b) / (x + y)) - r) -> - / + a b + x y r
Strategy: Parenthesis grouping, subgroup replacement.
Example (using case 3):
Split input into the following string subgroups, based on parenthesis. Parenthesis are stripped.
Input: (((a + b) / (x + y)) - r) -> ends up with 4 groups (number of open parenthesis).
View gist:5d2cb0f0527a8f87dedb1789c8712759
> Configure project :
New Dep: net.minecraftforge:forge:1.14.4-28.0.74_mapped_snapshot_20190829-1.14.3_at_0482be85dbf5320c258cf6fe0b5ffebf53c3cca3
> Task :eclipseClasspath
Error getting artifact: net.minecraftforge:forge:1.14.4-28.0.74_mapped_snapshot_20190829-1.14.3_at_0482be85dbf5320c258cf6fe0b5ffebf53c3cca3:null@jar from MinecraftUserRepo
java.lang.IllegalStateException: Could not download MCP Mappings: net.minecraft:mappings_snapshot:20190829-1.14.3@zip
at net.minecraftforge.gradle.userdev.MinecraftUserRepo.findMapping(MinecraftUserRepo.java:435)
at net.minecraftforge.gradle.userdev.MinecraftUserRepo.findRaw(MinecraftUserRepo.java:518)
at net.minecraftforge.gradle.userdev.MinecraftUserRepo.findFile(MinecraftUserRepo.java:394)
View plants
Plants
-Block Methods
--getPlantTypes() @Nullable Set<PlantType>, null type represents not a plant.
--canBePlanted(IBlockReader, BlockPos) boolean, Plant's authority on if it can be placed here. Equal authority with canPlantOn
--canHarvest(IBlockReader, BlockPos, @Nullable PlayerEntity) boolean, if the plant can be harvested
--harvest(IWorld, BlockPos, @Nullable PlayerEntity) List<ItemStack>, harvests the plant into a List<ItemStacK>. Updates the state in the world.
--placePlant(IWorld, BlockPos, @Nullable PlayerEntity, ItemStack) boolean, places the plant into the world. Returns true for success.
--getSeed() Item, returns the seed for this plant.
--getGrowthProgress(BlockState) float, returns [0, 1] for plant growth.