This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package commoble.databuddy.codec; | |
import java.util.Map; | |
import com.google.common.collect.Lists; | |
import com.mojang.math.Vector3f; | |
import com.mojang.serialization.Codec; | |
import com.mojang.serialization.DataResult; | |
import com.mojang.serialization.codecs.RecordCodecBuilder; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package commoble.featureexamplemod; | |
import java.util.List; | |
import net.minecraft.core.Registry; | |
import net.minecraft.data.worldgen.placement.PlacementUtils; | |
import net.minecraft.world.level.block.Blocks; | |
import net.minecraft.world.level.levelgen.GenerationStep.Decoration; | |
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; | |
import net.minecraft.world.level.levelgen.feature.Feature; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package biomecheeser; | |
import java.io.IOException; | |
import java.nio.file.Path; | |
import java.util.List; | |
import org.apache.logging.log4j.LogManager; | |
import org.apache.logging.log4j.Logger; | |
import com.google.gson.Gson; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data/sandbox/worldgen/configured_feature/red_wool.json | |
{ | |
"config": | |
{ | |
"state": | |
{ | |
"Name": "minecraft:red_wool" | |
} | |
}, | |
"type": "sandbox:single_block" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package commoble.tomeofrocks.datagen; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.function.Consumer; | |
import com.google.gson.JsonObject; | |
import net.minecraft.data.CookingRecipeBuilder; | |
import net.minecraft.data.DataGenerator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package commoble.dynamicregistrycheeser.mixin; | |
import org.spongepowered.asm.mixin.Mixin; | |
import org.spongepowered.asm.mixin.gen.Accessor; | |
import net.minecraft.world.biome.Biome; | |
import net.minecraft.world.biome.BiomeGenerationSettings; | |
@Mixin(Biome.class) | |
public interface BiomeAccessor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The MIT License (MIT) | |
Copyright (c) 2021 Joseph Bettendorff aka "Commoble" | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package commoble.sandbox; | |
import java.util.function.Consumer; | |
import java.util.function.Supplier; | |
import com.mojang.serialization.Codec; | |
import net.minecraft.util.ResourceLocation; | |
import net.minecraftforge.event.RegistryEvent; | |
import net.minecraftforge.eventbus.api.IEventBus; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package commoble.sandbox; | |
import java.util.function.Predicate; | |
import java.util.function.Supplier; | |
import com.mojang.serialization.Codec; | |
import commoble.sandbox.StatePredicateSerializer.StatePredicate; | |
import net.minecraft.block.BlockState; | |
import net.minecraft.util.ResourceLocation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#usage: | |
#install python 3ish | |
#open cmd | |
#run `python.recordCodecBuilderBuilder.py` | |
#enter name of class, e.g. Thing | |
#enter fields one line at a time in the format | |
#FieldType field_name FieldType.CODEC | |
#java class is output to rcbb_Thing.txt | |
classTemplate = ''' |
NewerOlder