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.hyperbox; | |
import java.lang.reflect.Field; | |
import java.util.Map; | |
import java.util.concurrent.Executor; | |
import java.util.function.BiFunction; | |
import java.util.function.Function; | |
import com.google.common.collect.ImmutableList; | |
import com.mojang.serialization.Lifecycle; |
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
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.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
/* | |
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.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
// thanks to gigaherz for pointing me in the right directions on the buildscript | |
// The shadow gradle plugin assists with repackaging a 3rd-party library jar within your own jar | |
// In addition to ensuring that your end-users have the library available when they use your own thing, | |
// it also helps avoid collisions with other things that are also using the same library. | |
// As always, make sure the license of the library allows redistribution and is compatible with | |
// your own thing's license before redistributing it in this manner | |
buildscript { |
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
/** | |
AbstractBlock::getShape(BlockState, IBlockReader, BlockPos, ISelectionContext) | |
The primary shape for "selection" raytraces, like clicking a block. | |
Defaults to a full cube. Delegated to by AbstractBlockState::getShape(IBlockReader, BlockPos, ISelectionContext) | |
Most of the other shape getters either default to this or default to empty, | |
so just overriding this shape getter is sufficient if finer variations aren't needed. | |
AbstractBlock::getCollisionShape(BlockState, IBlockReader, BlockPos, ISelectionContext) | |
The primary shape for collision raytraces. | |
Delegated to by AbstractBlockState::getCollisionShape(IBlockReader, BlockPos, ISelectionContext) |
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
/** | |
WHAT ARE WE WORKING WITH | |
--Dimension, DimensionType, ServerWorld | |
-- There exists a 1:1:1 relationship between each of these, e.g. there will be one DimensionType instance | |
and one Dimension instance for a given ServerWorld, and those DimensionType and Dimension instances will only be | |
used on that worldserver | |
--ServerWorld | |
-- The server-specific version of the World, which holds all the block and chunk data, entities, tile entities, etc.\ | |
for a given dimension. You won't be making these yourself or extending the class, but you'll need to find and use the | |
ServerWorld for your Dimension to teleport the player there. |
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" |
NewerOlder