6 Commits
Author SHA1 Message Date
chylex f71338502d WIP 2024-05-11 10:08:54 +02:00
chylex 0240efb00c TEST 2024-05-11 10:08:27 +02:00
chylex 221c4e3675 Add Gradle convention plugins with a NeoForge mod for Minecraft 1.20.6 2024-05-11 10:08:25 +02:00
chylex 6a2f878c35 Add .gitattributes and .gitignore 2024-02-19 14:20:19 +01:00
chylex ae765d4d8c Add README 2024-02-19 14:19:38 +01:00
chylex 8cb7d6f973 Initial commit 2023-01-17 02:30:39 +01:00
2043 changed files with 1194 additions and 66667 deletions
+1
View File
@@ -0,0 +1 @@
* text=auto eol=lf
+9 -22
View File
@@ -1,28 +1,15 @@
# idea # IntelliJ
out
/.idea/
*.iml
*.ipr *.ipr
*.iws *.iws
*.iml
.idea/gradle.xml # Gradle
.idea/tasks.xml
.idea/workspace.xml
.idea/codeStyles .gradle/
.idea/libraries build/
# eclipse # Game
bin
*.launch
.settings
.metadata
.classpath
.project
# gradle /run/
build
.gradle
# game
run/*
!run/*.ps1
-41
View File
@@ -1,41 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaProjectCodeInsightSettings">
<excluded-names>
<name>akka</name>
<name>chylex.hee.client.util.MC</name>
<name>com.ibm</name>
<name>com.sun</name>
<name>java.awt</name>
<name>java.beans</name>
<name>java.rmi</name>
<name>javafx</name>
<name>javax.rmi</name>
<name>javax.swing</name>
<name>javax.xml</name>
<name>jdk.internal</name>
<name>net.java.games.input.Component.Identifier.Key</name>
<name>net.minecraft.init.Blocks</name>
<name>net.minecraft.init.Items</name>
<name>net.minecraft.init.MobEffects</name>
<name>net.minecraft.init.PotionTypes</name>
<name>net.minecraft.init.SoundEvents</name>
<name>net.minecraft.util.EnumActionResult</name>
<name>net.minecraft.util.EnumFacing</name>
<name>net.minecraft.util.EnumHand</name>
<name>net.minecraft.world.EnumDifficulty</name>
<name>net.minecraftforge.fml.common.Mod.EventBusSubscriber</name>
<name>net.minecraftforge.fml.common.eventhandler.Event</name>
<name>net.minecraftforge.fml.common.eventhandler.EventPriority</name>
<name>net.minecraftforge.fml.common.eventhandler.SubscribeEvent</name>
<name>net.minecraftforge.fml.relauncher.Side</name>
<name>net.minecraftforge.fml.relauncher.SideOnly</name>
<name>org.ietf</name>
<name>org.omg</name>
<name>org.w3c</name>
<name>org.xml</name>
<name>scala</name>
<name>sun</name>
</excluded-names>
</component>
</project>
-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="1.8">
<module name="Hardcore-Ender-Expansion-2.api" target="1.8" />
<module name="Hardcore-Ender-Expansion-2.main" target="1.8" />
<module name="Hardcore-Ender-Expansion-2.test" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>
-22
View File
@@ -1,22 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="CascadeIf" enabled="false" level="INFO" enabled_by_default="false" />
<inspection_tool class="ClassName" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="namePattern" value="[A-Z][_A-Za-z\d]*" />
</inspection_tool>
<inspection_tool class="FoldInitializerAndIfToElvis" enabled="false" level="INFO" enabled_by_default="false" />
<inspection_tool class="FunctionName" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="namePattern" value="([A-Za-z][A-Za-z\d]*)|([A-Z][_A-Z\d]*)" />
</inspection_tool>
<inspection_tool class="RedundantSuppression" enabled="true" level="WARNING" enabled_by_default="true">
<option name="IGNORE_ALL" value="true" />
</inspection_tool>
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
<inspection_tool class="UnusedProperty" enabled="false" level="WARNING" enabled_by_default="false" />
</profile>
</component>
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinCodeInsightWorkspaceSettings">
<option name="optimizeImportsOnTheFly" value="true" />
</component>
</project>
-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Kotlin2JsCompilerArguments">
<option name="sourceMapEmbedSources" />
<option name="sourceMapPrefix" />
</component>
<component name="Kotlin2JvmCompilerArguments">
<option name="jvmTarget" value="1.8" />
</component>
</project>
-57
View File
@@ -1,57 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<list size="10">
<item index="0" class="java.lang.String" itemvalue="chylex.hee.system.migration.forge.SubscribeEvent" />
<item index="1" class="java.lang.String" itemvalue="chylex.hee.system.migration.forge.SubscribeEvent" />
<item index="2" class="java.lang.String" itemvalue="net.minecraftforge.eventbus.api.SubscribeEvent" />
<item index="3" class="java.lang.String" itemvalue="net.minecraftforge.fml.common.Mod" />
<item index="4" class="java.lang.String" itemvalue="net.minecraftforge.fml.common.Mod.EventBusSubscriber" />
<item index="5" class="java.lang.String" itemvalue="net.minecraftforge.fml.common.Mod.EventBusSubscriber" />
<item index="6" class="java.lang.String" itemvalue="net.minecraftforge.fml.common.Mod.EventHandler" />
<item index="7" class="java.lang.String" itemvalue="net.minecraftforge.fml.common.eventhandler.SubscribeEvent" />
<item index="8" class="java.lang.String" itemvalue="net.minecraftforge.fml.common.network.NetworkCheckHandler" />
<item index="9" class="java.lang.String" itemvalue="net.minecraftforge.fml.relauncher.IFMLLoadingPlugin.Name" />
</list>
</component>
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="javax.annotation.Nullable" />
<option name="myDefaultNotNull" value="javax.annotation.Nonnull" />
<option name="myNullables">
<value>
<list size="11">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
<item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
<item index="10" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="10">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
<item index="6" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
<item index="9" class="java.lang.String" itemvalue="com.android.annotations.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/bin" />
</component>
</project>
-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/modules/Hardcore-Ender-Expansion-2.iml" filepath="$PROJECT_DIR$/.idea/modules/Hardcore-Ender-Expansion-2.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/Hardcore-Ender-Expansion-2.main.iml" filepath="$PROJECT_DIR$/.idea/modules/Hardcore-Ender-Expansion-2.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/Hardcore-Ender-Expansion-2.test.iml" filepath="$PROJECT_DIR$/.idea/modules/Hardcore-Ender-Expansion-2.test.iml" />
</modules>
</component>
</project>
-14
View File
@@ -1,14 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Unit Tests" type="JUnit" factoryName="JUnit" singleton="true">
<module name="Hardcore-Ender-Expansion-2_test" />
<option name="PACKAGE_NAME" value="chylex.hee.test" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="./run" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
-4
View File
@@ -1,4 +0,0 @@
<changelist name="Development" date="1579752205042" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Development/shelved.patch" />
<option name="DESCRIPTION" value="Development" />
</changelist>
File diff suppressed because one or more lines are too long
-4
View File
@@ -1,4 +0,0 @@
<changelist name="Ender_Eye" date="1579752352230" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Ender_Eye/shelved.patch" />
<option name="DESCRIPTION" value="Ender Eye" />
</changelist>
File diff suppressed because one or more lines are too long
-4
View File
@@ -1,4 +0,0 @@
<changelist name="Experience_Table" date="1579752469474" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Experience_Table/shelved.patch" />
<option name="DESCRIPTION" value="Experience Table" />
</changelist>
File diff suppressed because one or more lines are too long
-4
View File
@@ -1,4 +0,0 @@
<changelist name="Ideas" date="1579750085391" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Ideas/shelved.patch" />
<option name="DESCRIPTION" value="Ideas" />
</changelist>
-53
View File
File diff suppressed because one or more lines are too long
-4
View File
@@ -1,4 +0,0 @@
<changelist name="Later" date="1579750352473" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Later/shelved.patch" />
<option name="DESCRIPTION" value="Later" />
</changelist>
-54
View File
File diff suppressed because one or more lines are too long
-4
View File
@@ -1,4 +0,0 @@
<changelist name="Shulker_Box" date="1579752489313" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Shulker_Box/shelved.patch" />
<option name="DESCRIPTION" value="Shulker Box" />
</changelist>
File diff suppressed because one or more lines are too long
-4
View File
@@ -1,4 +0,0 @@
<changelist name="Territories" date="1579750362160" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Territories/shelved.patch" />
<option name="DESCRIPTION" value="Territories" />
</changelist>
File diff suppressed because one or more lines are too long
-39
View File
@@ -1,39 +0,0 @@
<changelist name="Tomb" date="1579750369609" recycled="false">
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Tomb/shelved.patch" />
<option name="DESCRIPTION" value="Tomb" />
<binary>
<option name="BEFORE_PATH" />
<option name="AFTER_PATH" value="src/main/resources/data/hee/structure/tombdungeon/corridor.stairs.end.nbt" />
<option name="SHELVED_PATH" value="$PROJECT_DIR$/.idea/shelf/Tomb/corridor.stairs.end.nbt" />
</binary>
<binary>
<option name="BEFORE_PATH" />
<option name="AFTER_PATH" value="src/main/resources/data/hee/structure/tombdungeon/corridor.stairs.middle.nbt" />
<option name="SHELVED_PATH" value="$PROJECT_DIR$/.idea/shelf/Tomb/corridor.stairs.middle.nbt" />
</binary>
<binary>
<option name="BEFORE_PATH" />
<option name="AFTER_PATH" value="src/main/resources/data/hee/structure/tombdungeon/corridor.stairs.start.nbt" />
<option name="SHELVED_PATH" value="$PROJECT_DIR$/.idea/shelf/Tomb/corridor.stairs.start.nbt" />
</binary>
<binary>
<option name="BEFORE_PATH" />
<option name="AFTER_PATH" value="src/main/resources/data/hee/structure/tombdungeon/main.end.nbt" />
<option name="SHELVED_PATH" value="$PROJECT_DIR$/.idea/shelf/Tomb/main.end.nbt" />
</binary>
<binary>
<option name="BEFORE_PATH" />
<option name="AFTER_PATH" value="src/main/resources/data/hee/structure/tombdungeon/tomb.multi2x4.narrow.nbt" />
<option name="SHELVED_PATH" value="$PROJECT_DIR$/.idea/shelf/Tomb/tomb.multi2x4.narrow.nbt" />
</binary>
<binary>
<option name="BEFORE_PATH" />
<option name="AFTER_PATH" value="src/main/resources/data/hee/structure/tombdungeon/tomb.multi2x4.spacious.nbt" />
<option name="SHELVED_PATH" value="$PROJECT_DIR$/.idea/shelf/Tomb/tomb.multi2x4.spacious.nbt" />
</binary>
<binary>
<option name="BEFORE_PATH" />
<option name="AFTER_PATH" value="src/main/resources/data/hee/structure/tombdungeon/tomb.single.narrow.nbt" />
<option name="SHELVED_PATH" value="$PROJECT_DIR$/.idea/shelf/Tomb/tomb.single.narrow.nbt" />
</binary>
</changelist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
-671
View File
@@ -1,671 +0,0 @@
Index: src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonCorridor_StraightTombs.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonCorridor_StraightTombs.kt (date 1579593033167)
+++ src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonCorridor_StraightTombs.kt (date 1579593033167)
@@ -0,0 +1,43 @@
+package chylex.hee.game.world.feature.tombdungeon.piece
+import chylex.hee.game.world.feature.tombdungeon.connection.TombDungeonConnection
+import chylex.hee.game.world.feature.tombdungeon.connection.TombDungeonConnectionType.CORRIDOR
+import chylex.hee.game.world.feature.tombdungeon.connection.TombDungeonConnectionType.TOMB_ENTRANCE
+import chylex.hee.game.world.structure.IBlockPicker.Single.Air
+import chylex.hee.game.world.structure.IStructureWorld
+import chylex.hee.game.world.structure.piece.IStructurePieceConnection
+import chylex.hee.game.world.util.Size
+import chylex.hee.system.migration.Facing.EAST
+import chylex.hee.system.migration.Facing.NORTH
+import chylex.hee.system.migration.Facing.SOUTH
+import chylex.hee.system.migration.Facing.WEST
+import chylex.hee.system.util.Pos
+
+class TombDungeonCorridor_StraightTombs(piece: TombDungeonRoom_Tomb, configuration: Configuration, tombsPerSide: Int, override val isFancy: Boolean) : TombDungeonAbstractPiece(){
+ enum class Configuration{
+ WEST, EAST, BOTH
+ }
+
+ override val size = Size(5, 5, 5 + ((tombsPerSide - 1) * piece.size.x))
+
+ override val connections = mutableListOf<IStructurePieceConnection>().also {
+ it.add(TombDungeonConnection(CORRIDOR, Pos(size.centerX, 0, size.maxZ), SOUTH))
+ it.add(TombDungeonConnection(CORRIDOR, Pos(size.centerX, 0, 0), NORTH))
+
+ val spacing = piece.size.x
+
+ for(tombIndex in 0 until tombsPerSide){
+ if (configuration == Configuration.WEST || configuration == Configuration.BOTH){
+ it.add(TombDungeonConnection(TOMB_ENTRANCE, Pos(0, 0, 2 + (tombIndex * spacing)), WEST))
+ }
+
+ if (configuration == Configuration.EAST || configuration == Configuration.BOTH){
+ it.add(TombDungeonConnection(TOMB_ENTRANCE, Pos(size.maxX, 0, 2 + (tombIndex * spacing)), EAST))
+ }
+ }
+ }.toTypedArray()
+
+ override fun generate(world: IStructureWorld, instance: Instance){
+ super.generate(world, instance)
+ world.placeCube(Pos(1, 1, 1), Pos(size.maxX - 1, size.maxY - 1, size.maxZ - 1), Air)
+ }
+}
Index: src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonCorridor_Straight.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonCorridor_Straight.kt (date 1579593033167)
+++ src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonCorridor_Straight.kt (date 1579593033167)
@@ -0,0 +1,24 @@
+package chylex.hee.game.world.feature.tombdungeon.piece
+import chylex.hee.game.world.feature.tombdungeon.connection.TombDungeonConnection
+import chylex.hee.game.world.feature.tombdungeon.connection.TombDungeonConnectionType.CORRIDOR
+import chylex.hee.game.world.structure.IBlockPicker.Single.Air
+import chylex.hee.game.world.structure.IStructureWorld
+import chylex.hee.game.world.structure.piece.IStructurePieceConnection
+import chylex.hee.game.world.util.Size
+import chylex.hee.system.migration.Facing.NORTH
+import chylex.hee.system.migration.Facing.SOUTH
+import chylex.hee.system.util.Pos
+
+class TombDungeonCorridor_Straight(length: Int, override val isFancy: Boolean) : TombDungeonAbstractPiece(){
+ override val size = Size(5, 5, length)
+
+ override val connections = arrayOf<IStructurePieceConnection>(
+ TombDungeonConnection(CORRIDOR, Pos(size.centerX, 0, size.maxZ), SOUTH),
+ TombDungeonConnection(CORRIDOR, Pos(size.centerX, 0, 0), NORTH)
+ )
+
+ override fun generate(world: IStructureWorld, instance: Instance){
+ super.generate(world, instance)
+ world.placeCube(Pos(1, 1, 1), Pos(size.maxX - 1, size.maxY - 1, size.maxZ - 1), Air)
+ }
+}
Index: src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonRoom_End.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonRoom_End.kt (date 1579594244672)
+++ src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonRoom_End.kt (date 1579594244672)
@@ -0,0 +1,108 @@
+package chylex.hee.game.world.feature.tombdungeon.piece
+import chylex.hee.game.block.BlockVoidPortalInner
+import chylex.hee.game.entity.item.EntityTokenHolder
+import chylex.hee.game.item.ItemPortalToken.TokenType.NORMAL
+import chylex.hee.game.world.feature.tombdungeon.connection.TombDungeonConnection
+import chylex.hee.game.world.feature.tombdungeon.connection.TombDungeonConnectionType.ROOM_ENTRANCE
+import chylex.hee.game.world.structure.IBlockPicker.Single.Air
+import chylex.hee.game.world.structure.IStructureWorld
+import chylex.hee.game.world.structure.piece.IStructurePieceConnection
+import chylex.hee.game.world.structure.trigger.EntityStructureTrigger
+import chylex.hee.game.world.structure.trigger.TileEntityStructureTrigger
+import chylex.hee.game.world.territory.TerritoryType.FORGOTTEN_TOMBS
+import chylex.hee.init.ModBlocks
+import chylex.hee.system.migration.Facing.EAST
+import chylex.hee.system.migration.Facing.NORTH
+import chylex.hee.system.migration.Facing.SOUTH
+import chylex.hee.system.migration.Facing.WEST
+import chylex.hee.system.migration.vanilla.Blocks
+import chylex.hee.system.util.Pos
+import chylex.hee.system.util.TagCompound
+import chylex.hee.system.util.allInCenteredBox
+import chylex.hee.system.util.with
+import chylex.hee.system.util.withFacing
+import net.minecraft.util.Direction
+import net.minecraft.util.math.BlockPos
+import kotlin.math.abs
+
+class TombDungeonRoom_End(file: String) : TombDungeonAbstractPieceFromFile(file, isFancy = true){
+ override val connections = arrayOf<IStructurePieceConnection>(
+ TombDungeonConnection(ROOM_ENTRANCE, Pos(centerX, 6, maxZ), SOUTH)
+ )
+
+ override fun generate(world: IStructureWorld, instance: Instance){
+ world.placeCube(Pos(1, 2, 1), Pos(maxX - 1, maxY - 1, maxZ - 1), Air)
+ super.generate(world, instance)
+
+ val portalCenter = Pos(centerX, 1, centerZ - 12)
+ val tombOffset = portalCenter.up(2)
+
+ for(pos in portalCenter.allInCenteredBox(1, 0, 1)){
+ world.addTrigger(pos, TileEntityStructureTrigger(ModBlocks.VOID_PORTAL_INNER.with(BlockVoidPortalInner.TYPE, BlockVoidPortalInner.Type.RETURN_INACTIVE), TagCompound()))
+ }
+
+ placeTokenHolders(world, tombOffset)
+ placeChests(world, tombOffset)
+ }
+
+ private fun placeTokenHolders(world: IStructureWorld, tombOffset: BlockPos){
+ val rand = world.rand
+ val tokenTombs = TOMBS.asList().shuffled(rand).take(2)
+
+ for(tokenTomb in tokenTombs){
+ val xOffset = (tokenTomb.offsetX1 + tokenTomb.offsetX2) * 0.5
+ val zOffset = (tokenTomb.offsetZ1 + tokenTomb.offsetZ2) * 0.5
+
+ val nudge = if (tokenTomb.isShortX) EAST else SOUTH
+ val trigger = EntityStructureTrigger({ realWorld -> EntityTokenHolder(realWorld, NORMAL, /*TODO*/FORGOTTEN_TOMBS) }, nudgeFacing = nudge, nudgeAmount = 0.5, yOffset = 0.35)
+
+ world.addTrigger(tombOffset.add(xOffset, 0.0, zOffset), trigger)
+ }
+ }
+
+ private fun placeChests(world: IStructureWorld, tombOffset: BlockPos){
+ val rand = world.rand
+ val chestTombs = TOMBS.flatMap { listOf(it to false, it to true) }.shuffled(rand).take(4)
+
+ for((chestTomb, offsetType) in chestTombs){
+ val x: IntArray
+ val z: IntArray
+ val facing: Direction
+
+ if (chestTomb.isShortX){
+ x = intArrayOf(chestTomb.offsetX1, chestTomb.offsetX2)
+ z = (if (offsetType) chestTomb.offsetZ1 else chestTomb.offsetZ2).let { intArrayOf(it, it) }
+ facing = if (offsetType) SOUTH else NORTH
+ }
+ else{
+ z = intArrayOf(chestTomb.offsetZ1, chestTomb.offsetZ2)
+ x = (if (offsetType) chestTomb.offsetX1 else chestTomb.offsetX2).let { intArrayOf(it, it) }
+ facing = if (offsetType) EAST else WEST
+ }
+
+ val picks = when(rand.nextInt(6)){
+ 0 -> intArrayOf(0)
+ 1 -> intArrayOf(1)
+ else -> intArrayOf(0, 1)
+ }
+
+ for(pick in picks){
+ world.setState(tombOffset.add(x[pick], 0, z[pick]), Blocks.CHEST.withFacing(facing))
+ // TODO loot
+ }
+ }
+ }
+
+ private companion object{
+ private class Tomb(val offsetX1: Int, val offsetZ1: Int, val offsetX2: Int, val offsetZ2: Int){
+ val isShortX = abs(offsetX1 - offsetX2) < abs(offsetZ1 - offsetZ2)
+ }
+
+ private val TOMBS = arrayOf(
+ Tomb(offsetX1 = -10, offsetZ1 = -2, offsetX2 = -9, offsetZ2 = 2),
+ Tomb(offsetX1 = 9, offsetZ1 = -2, offsetX2 = 10, offsetZ2 = 2),
+ Tomb(offsetX1 = 3, offsetZ1 = -9, offsetX2 = 7, offsetZ2 = -8),
+ Tomb(offsetX1 = -7, offsetZ1 = -9, offsetX2 = -3, offsetZ2 = -8)
+ )
+ }
+}
Index: src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonCorridor_Intersection.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonCorridor_Intersection.kt (date 1579593033167)
+++ src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonCorridor_Intersection.kt (date 1579593033167)
@@ -0,0 +1,28 @@
+package chylex.hee.game.world.feature.tombdungeon.piece
+import chylex.hee.game.world.feature.tombdungeon.connection.TombDungeonConnection
+import chylex.hee.game.world.feature.tombdungeon.connection.TombDungeonConnectionType.CORRIDOR
+import chylex.hee.game.world.structure.IBlockPicker.Single.Air
+import chylex.hee.game.world.structure.IStructureWorld
+import chylex.hee.game.world.structure.piece.IStructurePieceConnection
+import chylex.hee.game.world.util.Size
+import chylex.hee.system.migration.Facing.EAST
+import chylex.hee.system.migration.Facing.NORTH
+import chylex.hee.system.migration.Facing.SOUTH
+import chylex.hee.system.migration.Facing.WEST
+import chylex.hee.system.util.Pos
+
+class TombDungeonCorridor_Intersection(override val isFancy: Boolean) : TombDungeonAbstractPiece(){
+ override val size = Size(5, 5, 5)
+
+ override val connections = arrayOf<IStructurePieceConnection>(
+ TombDungeonConnection(CORRIDOR, Pos(size.centerX, 0, 0), NORTH),
+ TombDungeonConnection(CORRIDOR, Pos(size.centerX, 0, size.maxZ), SOUTH),
+ TombDungeonConnection(CORRIDOR, Pos(size.maxX, 0, size.centerZ), EAST),
+ TombDungeonConnection(CORRIDOR, Pos(0, 0, size.centerZ), WEST)
+ )
+
+ override fun generate(world: IStructureWorld, instance: Instance){
+ super.generate(world, instance)
+ world.placeCube(Pos(1, 1, 1), Pos(size.maxX - 1, size.maxY - 1, size.maxZ - 1), Air)
+ }
+}
Index: src/main/java/chylex/hee/game/world/feature/tombdungeon/TombDungeonLevel.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/chylex/hee/game/world/feature/tombdungeon/TombDungeonLevel.kt (date 1579593033167)
+++ src/main/java/chylex/hee/game/world/feature/tombdungeon/TombDungeonLevel.kt (date 1579593033167)
@@ -0,0 +1,16 @@
+package chylex.hee.game.world.feature.tombdungeon
+import chylex.hee.system.util.nextInt
+import java.util.Random
+
+@Suppress("unused")
+enum class TombDungeonLevel(val isFancy: Boolean, private val corridorFactor: Int){
+ FIRST (isFancy = false, corridorFactor = 1),
+ SECOND(isFancy = false, corridorFactor = 5),
+ THIRD (isFancy = false, corridorFactor = 2),
+ FOURTH(isFancy = true, corridorFactor = 4),
+ LAST (isFancy = true, corridorFactor = 6);
+
+ fun getCorridorLength(rand: Random): Int{
+ return rand.nextInt(43 + (corridorFactor * 2), 55) + ((corridorFactor - 1) * rand.nextInt(12, 14)) + (if (this == LAST) 10 else 0)
+ }
+}
Index: src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonCorridor_Stairs.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonCorridor_Stairs.kt (date 1579593033167)
+++ src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonCorridor_Stairs.kt (date 1579593033167)
@@ -0,0 +1,56 @@
+package chylex.hee.game.world.feature.tombdungeon.piece
+import chylex.hee.game.world.feature.tombdungeon.connection.TombDungeonConnection
+import chylex.hee.game.world.feature.tombdungeon.connection.TombDungeonConnectionType.STAIR_BOTTOM
+import chylex.hee.game.world.feature.tombdungeon.connection.TombDungeonConnectionType.STAIR_TOP
+import chylex.hee.game.world.structure.IStructureWorld
+import chylex.hee.game.world.structure.piece.IStructurePieceConnection
+import chylex.hee.init.ModBlocks
+import chylex.hee.system.migration.Facing.NORTH
+import chylex.hee.system.migration.Facing.SOUTH
+import chylex.hee.system.util.Pos
+import chylex.hee.system.util.nextInt
+
+sealed class TombDungeonCorridor_Stairs(file: String) : TombDungeonAbstractPieceFromFile(file, isFancy = false){
+ class Start(file: String) : TombDungeonCorridor_Stairs(file){
+ override val connections = arrayOf<IStructurePieceConnection>(
+ TombDungeonConnection(STAIR_TOP, Pos(centerX, 2, 0), NORTH),
+ TombDungeonConnection(STAIR_BOTTOM, Pos(centerX, 0, maxZ), SOUTH)
+ )
+
+ override fun generate(world: IStructureWorld, instance: Instance){
+ super.generate(world, instance)
+
+ val rand = world.rand
+
+ for(z in 0..maxZ){
+ if (rand.nextInt(5) <= 1){
+ world.setBlock(Pos(rand.nextInt(1, maxX - 1), 2 - z, z), ModBlocks.DUSTY_STONE_BRICK_SLAB)
+ }
+ }
+ }
+ }
+
+ class Middle(file: String) : TombDungeonCorridor_Stairs(file){
+ override val connections = arrayOf<IStructurePieceConnection>(
+ TombDungeonConnection(STAIR_TOP, Pos(centerX, 1, 0), NORTH),
+ TombDungeonConnection(STAIR_BOTTOM, Pos(centerX, 0, maxZ), SOUTH)
+ )
+
+ override fun generate(world: IStructureWorld, instance: Instance){
+ super.generate(world, instance)
+
+ val rand = world.rand
+
+ if (rand.nextInt(5) <= 1){
+ world.setBlock(Pos(rand.nextInt(1, maxX - 1), 1, 0), ModBlocks.DUSTY_STONE_BRICK_SLAB)
+ }
+ }
+ }
+
+ class End(file: String) : TombDungeonCorridor_Stairs(file){
+ override val connections = arrayOf<IStructurePieceConnection>(
+ TombDungeonConnection(STAIR_TOP, Pos(centerX, 0, 0), NORTH),
+ TombDungeonConnection(STAIR_BOTTOM, Pos(centerX, 0, maxZ), SOUTH)
+ )
+ }
+}
Index: src/main/java/chylex/hee/game/world/feature/tombdungeon/TombDungeonPieces.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+>package chylex.hee.game.world.feature.tombdungeon\r\nimport chylex.hee.game.world.structure.IBlockPicker.Weighted.Companion.Weighted\r\nimport chylex.hee.game.world.structure.IStructureDescription\r\nimport chylex.hee.game.world.structure.IStructureDescription.Companion.NULL_LOCATOR\r\nimport chylex.hee.game.world.structure.file.PaletteBuilder\r\nimport chylex.hee.game.world.structure.file.PaletteMappings\r\nimport chylex.hee.game.world.structure.piece.StructurePiece\r\nimport chylex.hee.game.world.util.Size\r\nimport chylex.hee.init.ModBlocks\r\nimport chylex.hee.system.migration.Facing.EAST\r\nimport chylex.hee.system.migration.Facing.NORTH\r\nimport chylex.hee.system.migration.Facing.SOUTH\r\nimport chylex.hee.system.migration.Facing.WEST\r\nimport chylex.hee.system.migration.vanilla.BlockSlab\r\nimport chylex.hee.system.migration.vanilla.BlockStairs\r\nimport chylex.hee.system.migration.vanilla.Blocks\r\nimport chylex.hee.system.util.with\r\nimport chylex.hee.system.util.withFacing\r\nimport net.minecraft.state.properties.Half\r\nimport net.minecraft.state.properties.SlabType\r\n\r\nobject TombDungeonPieces : IStructureDescription{\r\n\toverride val STRUCTURE_SIZE = Size(300, 110, 300)\r\n\t\r\n\toverride val STRUCTURE_BUILDER = TombDungeonBuilder\r\n\toverride val STRUCTURE_LOCATOR = NULL_LOCATOR\r\n\t\r\n\t// Palette\r\n\t\r\n\tval PALETTE_ENTRY_PLAIN_WALL_CEILING = Weighted(\r\n\t\t840 to ModBlocks.DUSTY_STONE_BRICKS,\r\n\t\t125 to ModBlocks.DUSTY_STONE,\r\n\t\t 35 to ModBlocks.DUSTY_STONE_CRACKED_BRICKS\r\n\t)\r\n\t\r\n\tval PALETTE_ENTRY_FANCY_WALL = Weighted(\r\n\t\t94 to ModBlocks.DUSTY_STONE_BRICKS,\r\n\t\t 6 to ModBlocks.DUSTY_STONE_CRACKED_BRICKS\r\n\t)\r\n\t\r\n\tval PALETTE_ENTRY_FANCY_CEILING = Weighted(\r\n\t\t860 to ModBlocks.DUSTY_STONE_BRICKS.defaultState,\r\n\t\t 82 to ModBlocks.DUSTY_STONE_CRACKED_BRICKS.defaultState,\r\n\t\t 30 to ModBlocks.DUSTY_STONE_BRICK_SLAB.with(BlockSlab.TYPE, SlabType.TOP),\r\n\t\t 7 to ModBlocks.DUSTY_STONE_BRICK_STAIRS.with(BlockStairs.HALF, Half.TOP).withFacing(NORTH),\r\n\t\t 7 to ModBlocks.DUSTY_STONE_BRICK_STAIRS.with(BlockStairs.HALF, Half.TOP).withFacing(SOUTH),\r\n\t\t 7 to ModBlocks.DUSTY_STONE_BRICK_STAIRS.with(BlockStairs.HALF, Half.TOP).withFacing(EAST),\r\n\t\t 7 to ModBlocks.DUSTY_STONE_BRICK_STAIRS.with(BlockStairs.HALF, Half.TOP).withFacing(WEST)\r\n\t)\r\n\t\r\n\tprivate val PALETTE_ENTRY_PLAIN_GRAVE = Weighted(\r\n\t\t74 to ModBlocks.GRAVE_DIRT_PLAIN,\r\n\t\t18 to ModBlocks.GRAVE_DIRT_SPIDERLING,\r\n\t\t 8 to ModBlocks.GRAVE_DIRT_LOOT\r\n\t)\r\n\t\r\n\tprivate val PALETTE_ENTRY_FANCY_GRAVE = Weighted(\r\n\t\t69 to ModBlocks.GRAVE_DIRT_PLAIN,\r\n\t\t27 to ModBlocks.GRAVE_DIRT_LOOT,\r\n\t\t 4 to ModBlocks.GRAVE_DIRT_SPIDERLING\r\n\t)\r\n\t\r\n\tprivate fun generateCommonPalette() = PaletteBuilder.Combined().apply {\r\n\t\tadd(\"air\", Blocks.AIR)\r\n\t\tadd(\"dustystone\", ModBlocks.DUSTY_STONE)\r\n\t\tadd(\"dustystone.bricks\", ModBlocks.DUSTY_STONE_BRICKS)\r\n\t\t\r\n\t\tadd(\"slab.dustystonebrick.*\", ModBlocks.DUSTY_STONE_BRICK_SLAB, PaletteMappings.SLAB_TYPE)\r\n\t\tadd(\"stairs.dustystonebrick.*.*\", ModBlocks.DUSTY_STONE_BRICK_STAIRS, listOf(PaletteMappings.STAIR_FLIP, PaletteMappings.FACING_HORIZONTAL)) // UPDATE migrate mappings\r\n\t\t\r\n\t\twith(forDevelopment){\r\n\t\t\tadd(\"dustystone.wall\", Blocks.LAPIS_BLOCK)\r\n\t\t\tadd(\"dustystone.ceiling\", Blocks.COAL_BLOCK)\r\n\t\t\tadd(\"gravedirt\", ModBlocks.GRAVE_DIRT_PLAIN)\r\n\t\t}\r\n\t}\r\n\t\r\n\toverride val PALETTE = with(generateCommonPalette()){\r\n\t\twith(forGeneration){\r\n\t\t\tadd(\"dustystone.wall\", PALETTE_ENTRY_PLAIN_WALL_CEILING)\r\n\t\t\tadd(\"dustystone.ceiling\", PALETTE_ENTRY_PLAIN_WALL_CEILING)\r\n\t\t\tadd(\"gravedirt\", PALETTE_ENTRY_PLAIN_GRAVE)\r\n\t\t}\r\n\t\t\r\n\t\tbuild()\r\n\t}\r\n\t\r\n\tval PALETTE_FANCY = with(generateCommonPalette()){\r\n\t\twith(forGeneration){\r\n\t\t\tadd(\"dustystone.wall\", PALETTE_ENTRY_FANCY_WALL)\r\n\t\t\tadd(\"dustystone.ceiling\", PALETTE_ENTRY_FANCY_CEILING)\r\n\t\t\tadd(\"gravedirt\", PALETTE_ENTRY_FANCY_GRAVE)\r\n\t\t}\r\n\t\t\r\n\t\tbuild()\r\n\t}\r\n\t\r\n\t// Pieces\r\n\t\r\n\toverride val ALL_PIECES\r\n\t\tget() = arrayOf<StructurePiece<*>>()\r\n}\r\n
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/chylex/hee/game/world/feature/tombdungeon/TombDungeonPieces.kt (revision 41aa0b6695a1ac98e2d75beae7cb260618fe1f25)
+++ src/main/java/chylex/hee/game/world/feature/tombdungeon/TombDungeonPieces.kt (date 1579594244682)
@@ -1,10 +1,15 @@
package chylex.hee.game.world.feature.tombdungeon
+import chylex.hee.game.world.feature.tombdungeon.piece.TombDungeonAbstractPiece
+import chylex.hee.game.world.feature.tombdungeon.piece.TombDungeonCorridor_Intersection
+import chylex.hee.game.world.feature.tombdungeon.piece.TombDungeonCorridor_Stairs
+import chylex.hee.game.world.feature.tombdungeon.piece.TombDungeonCorridor_Straight
+import chylex.hee.game.world.feature.tombdungeon.piece.TombDungeonRoom_End
+import chylex.hee.game.world.feature.tombdungeon.piece.TombDungeonRoom_Tomb
import chylex.hee.game.world.structure.IBlockPicker.Weighted.Companion.Weighted
import chylex.hee.game.world.structure.IStructureDescription
import chylex.hee.game.world.structure.IStructureDescription.Companion.NULL_LOCATOR
import chylex.hee.game.world.structure.file.PaletteBuilder
import chylex.hee.game.world.structure.file.PaletteMappings
-import chylex.hee.game.world.structure.piece.StructurePiece
import chylex.hee.game.world.util.Size
import chylex.hee.init.ModBlocks
import chylex.hee.system.migration.Facing.EAST
@@ -14,10 +19,13 @@
import chylex.hee.system.migration.vanilla.BlockSlab
import chylex.hee.system.migration.vanilla.BlockStairs
import chylex.hee.system.migration.vanilla.Blocks
+import chylex.hee.system.util.nextInt
import chylex.hee.system.util.with
import chylex.hee.system.util.withFacing
import net.minecraft.state.properties.Half
import net.minecraft.state.properties.SlabType
+import java.util.Random
+import kotlin.math.min
object TombDungeonPieces : IStructureDescription{
override val STRUCTURE_SIZE = Size(300, 110, 300)
@@ -68,6 +76,13 @@
add("slab.dustystonebrick.*", ModBlocks.DUSTY_STONE_BRICK_SLAB, PaletteMappings.SLAB_TYPE)
add("stairs.dustystonebrick.*.*", ModBlocks.DUSTY_STONE_BRICK_STAIRS, listOf(PaletteMappings.STAIR_FLIP, PaletteMappings.FACING_HORIZONTAL)) // UPDATE migrate mappings
+ add("torch", Blocks.TORCH)
+ add("torch.*", Blocks.WALL_TORCH, PaletteMappings.FACING_HORIZONTAL)
+ add("redstonetorch", Blocks.REDSTONE_TORCH)
+ add("redstonetorch.*", Blocks.REDSTONE_WALL_TORCH, PaletteMappings.FACING_HORIZONTAL)
+
+ add("voidportal.frame", ModBlocks.VOID_PORTAL_FRAME)
+
with(forDevelopment){
add("dustystone.wall", Blocks.LAPIS_BLOCK)
add("dustystone.ceiling", Blocks.COAL_BLOCK)
@@ -97,6 +112,56 @@
// Pieces
+ //val PIECE_ROOM_TOMB_NARROW = TombDungeonRoom_Tomb("tomb.single.narrow.nbt", isFancy = false)
+
+ val PIECE_ROOM_END = TombDungeonRoom_End("main.end.nbt")
+
+ private val PIECES_STAIRS = arrayOf(
+ TombDungeonCorridor_Stairs.Start("corridor.stairs.start.nbt"),
+ TombDungeonCorridor_Stairs.Middle("corridor.stairs.middle.nbt"),
+ TombDungeonCorridor_Stairs.End("corridor.stairs.end.nbt")
+ )
+
+ fun PIECES_STAIRCASE(middle: Int): List<TombDungeonCorridor_Stairs>{
+ return listOf(PIECES_STAIRS[0], *Array(middle){ PIECES_STAIRS[1] }, PIECES_STAIRS[2])
+ }
+
+ fun PIECES_MAIN_CORRIDOR(rand: Random, level: TombDungeonLevel, cornerCount: Int): List<TombDungeonAbstractPiece>{
+ return mutableListOf<TombDungeonAbstractPiece>().apply {
+ val isFancy = level.isFancy
+ var lengthRemaining = level.getCorridorLength(rand)
+
+ while(lengthRemaining > 0){
+ val nextLength = if (level == TombDungeonLevel.LAST)
+ rand.nextInt(1, min(lengthRemaining, (lengthRemaining / 5) + 3))
+ else
+ rand.nextInt(1, min(lengthRemaining, (lengthRemaining / 3) + 5))
+
+ lengthRemaining -= nextLength
+ add(TombDungeonCorridor_Straight(nextLength, isFancy))
+ }
+
+ repeat(cornerCount){
+ add(TombDungeonCorridor_Intersection(isFancy))
+ }
+ }
+ }
+
override val ALL_PIECES
- get() = arrayOf<StructurePiece<*>>()
+ get() = arrayOf(
+ TombDungeonCorridor_Straight(length = 5, isFancy = false),
+ TombDungeonCorridor_Intersection(isFancy = false),
+
+ *PIECES_STAIRS,
+
+ // TODO
+ TombDungeonRoom_Tomb("tomb.single.narrow.nbt", entranceY = 2, isFancy = false),
+ TombDungeonRoom_Tomb("tomb.single.narrow.nbt", entranceY = 2, isFancy = true),
+ TombDungeonRoom_Tomb("tomb.multi2x4.narrow.nbt", entranceY = 1, isFancy = false),
+ TombDungeonRoom_Tomb("tomb.multi2x4.narrow.nbt", entranceY = 1, isFancy = true),
+ TombDungeonRoom_Tomb("tomb.multi2x4.spacious.nbt", entranceY = 3, isFancy = false),
+ TombDungeonRoom_Tomb("tomb.multi2x4.spacious.nbt", entranceY = 3, isFancy = true),
+
+ PIECE_ROOM_END
+ )
}
Index: src/main/java/chylex/hee/game/world/feature/tombdungeon/TombDungeonBuilder.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+>package chylex.hee.game.world.feature.tombdungeon\r\nimport chylex.hee.game.world.feature.tombdungeon.TombDungeonPieces.STRUCTURE_SIZE\r\nimport chylex.hee.game.world.feature.tombdungeon.piece.TombDungeonStart\r\nimport chylex.hee.game.world.structure.piece.IStructureBuild\r\nimport chylex.hee.game.world.structure.piece.IStructureBuilder\r\nimport chylex.hee.game.world.structure.piece.StructureBuild\r\nimport chylex.hee.game.world.structure.piece.StructureBuild.PositionedPiece\r\nimport chylex.hee.game.world.util.Size.Alignment.CENTER\r\nimport chylex.hee.game.world.util.Size.Alignment.MAX\r\nimport chylex.hee.game.world.util.Transform\r\nimport net.minecraft.util.math.BlockPos\r\nimport java.util.Random\r\n\r\nobject TombDungeonBuilder : IStructureBuilder{\r\n\tval ENTRANCE_POS: BlockPos = STRUCTURE_SIZE.getPos(CENTER, MAX, MAX).add(-TombDungeonStart.size.centerX, -TombDungeonStart.size.y, -STRUCTURE_SIZE.x / 3)\r\n\t\r\n\toverride fun build(rand: Random): IStructureBuild?{\r\n\t\tval startingPiece = TombDungeonStart.MutableInstance(Transform.NONE)\r\n\t\tval startingPiecePos = ENTRANCE_POS\r\n\t\t\r\n\t\tval build = StructureBuild(STRUCTURE_SIZE, PositionedPiece(startingPiece, startingPiecePos))\r\n\t\t// TODO\r\n\t\treturn build.freeze()\r\n\t}\r\n}\r\n
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/chylex/hee/game/world/feature/tombdungeon/TombDungeonBuilder.kt (revision 41aa0b6695a1ac98e2d75beae7cb260618fe1f25)
+++ src/main/java/chylex/hee/game/world/feature/tombdungeon/TombDungeonBuilder.kt (date 1579593033167)
@@ -1,13 +1,21 @@
package chylex.hee.game.world.feature.tombdungeon
import chylex.hee.game.world.feature.tombdungeon.TombDungeonPieces.STRUCTURE_SIZE
+import chylex.hee.game.world.feature.tombdungeon.piece.TombDungeonAbstractPiece
+import chylex.hee.game.world.feature.tombdungeon.piece.TombDungeonCorridor_Straight
import chylex.hee.game.world.feature.tombdungeon.piece.TombDungeonStart
import chylex.hee.game.world.structure.piece.IStructureBuild
import chylex.hee.game.world.structure.piece.IStructureBuilder
+import chylex.hee.game.world.structure.piece.IStructureBuilder.ProcessBase
import chylex.hee.game.world.structure.piece.StructureBuild
+import chylex.hee.game.world.structure.piece.StructureBuild.AddMode
+import chylex.hee.game.world.structure.piece.StructureBuild.AddMode.APPEND
import chylex.hee.game.world.structure.piece.StructureBuild.PositionedPiece
+import chylex.hee.game.world.structure.piece.StructurePiece
import chylex.hee.game.world.util.Size.Alignment.CENTER
import chylex.hee.game.world.util.Size.Alignment.MAX
import chylex.hee.game.world.util.Transform
+import chylex.hee.system.util.nextInt
+import chylex.hee.system.util.removeItem
import net.minecraft.util.math.BlockPos
import java.util.Random
@@ -19,7 +27,81 @@
val startingPiecePos = ENTRANCE_POS
val build = StructureBuild(STRUCTURE_SIZE, PositionedPiece(startingPiece, startingPiecePos))
- // TODO
+ val process = Process(build, rand)
+
+ var lastPiece = build.generatedPieces.last()
+
+ run {
+ val stairLengths = mutableListOf<Int>().apply {
+ add(rand.nextInt(4, 7))
+ add(rand.nextInt(6, 13))
+ add(rand.nextInt(27, 28) - sum())
+ shuffle(rand)
+ }
+
+ for((index, stairLength) in stairLengths.withIndex()){
+ lastPiece = process.appendPieces(lastPiece, TombDungeonPieces.PIECES_STAIRCASE(stairLength)) ?: return null
+
+ val corridorLength = if (index == stairLengths.lastIndex) rand.nextInt(11, 13) else rand.nextInt(2, rand.nextInt(4, 5))
+ val corridorPiece = TombDungeonCorridor_Straight(corridorLength, isFancy = false)
+
+ lastPiece = process.appendPiece(lastPiece, corridorPiece) ?: return null
+ }
+ }
+
+ run {
+ val cornerCounts = mutableListOf(
+ rand.nextInt(2, 3),
+ rand.nextInt(4, 5),
+ rand.nextInt(5, 7),
+ rand.nextInt(6, 8)
+ )
+
+ for(level in TombDungeonLevel.values().dropLast(1)){
+ val corridorPieces = TombDungeonPieces.PIECES_MAIN_CORRIDOR(rand, level, rand.removeItem(cornerCounts))
+
+ if (!build.guardChain(10){
+ lastPiece = process.appendPieces(lastPiece, corridorPieces.shuffled(rand)) ?: return@guardChain false
+ lastPiece = process.appendPieces(lastPiece, TombDungeonPieces.PIECES_STAIRCASE(rand.nextInt(9, 17))) ?: return@guardChain false
+ return@guardChain true
+ }){
+ return null
+ }
+ }
+ }
+
+ run {
+ val cornerCount = rand.nextInt(10, 11)
+ val corridorPieces = TombDungeonPieces.PIECES_MAIN_CORRIDOR(rand, TombDungeonLevel.LAST, cornerCount)
+
+ if (!build.guardChain(10){
+ lastPiece = process.appendPieces(lastPiece, corridorPieces.shuffled(rand)) ?: return@guardChain false
+ return@guardChain true
+ }){
+ return null
+ }
+ }
+
+ process.appendPiece(lastPiece, TombDungeonPieces.PIECE_ROOM_END) ?: return null
return build.freeze()
}
+
+ private class Process(build: StructureBuild<StructurePiece<Unit>.MutableInstance>, rand: Random) : ProcessBase<StructurePiece<Unit>.MutableInstance>(build, rand){
+
+ // Piece placement
+
+ fun appendPiece(targetPiece: PositionedPiece<StructurePiece<Unit>.MutableInstance>, generatedPiece: TombDungeonAbstractPiece): PositionedPiece<StructurePiece<Unit>.MutableInstance>?{
+ return addPiece(targetPiece, generatedPiece)
+ }
+
+ fun appendPieces(targetPiece: PositionedPiece<StructurePiece<Unit>.MutableInstance>, generatedPieces: List<TombDungeonAbstractPiece>): PositionedPiece<StructurePiece<Unit>.MutableInstance>?{
+ return generatedPieces.fold(targetPiece){ lastPiece, nextPiece -> addPiece(lastPiece, nextPiece) ?: return null }
+ }
+
+ // Helpers
+
+ private fun addPiece(targetPiece: PositionedPiece<StructurePiece<Unit>.MutableInstance>, generatedPiece: TombDungeonAbstractPiece, mode: AddMode = APPEND): PositionedPiece<StructurePiece<Unit>.MutableInstance>?{
+ return baseAddPiece(mode, targetPiece, generatedPiece::MutableInstance)
+ }
+ }
}
Index: src/main/java/chylex/hee/game/world/territory/descriptions/Territory_ForgottenTombs.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
<+>package chylex.hee.game.world.territory.descriptions\r\nimport chylex.hee.client.render.territory.lightmaps.ILightmap\r\nimport chylex.hee.client.render.territory.lightmaps.ILightmap.Companion.calcLightFactor\r\nimport chylex.hee.client.util.MC\r\nimport chylex.hee.game.world.territory.ITerritoryDescription\r\nimport chylex.hee.game.world.territory.properties.TerritoryColors\r\nimport chylex.hee.game.world.territory.properties.TerritoryEnvironment\r\nimport chylex.hee.system.migration.forge.Side\r\nimport chylex.hee.system.migration.forge.Sided\r\nimport chylex.hee.system.migration.vanilla.Potions\r\nimport chylex.hee.system.util.Pos\r\nimport chylex.hee.system.util.allInCenteredBoxMutable\r\nimport chylex.hee.system.util.color.IntColor.Companion.RGB\r\nimport chylex.hee.system.util.lookPosVec\r\nimport chylex.hee.system.util.math.LerpedFloat\r\nimport chylex.hee.system.util.nextFloat\r\nimport net.minecraft.util.math.Vec3d\r\nimport net.minecraft.world.LightType.BLOCK\r\nimport net.minecraft.world.LightType.SKY\r\nimport java.util.Random\r\nimport kotlin.math.max\r\nimport kotlin.math.pow\r\n\r\nobject Territory_ForgottenTombs : ITerritoryDescription{\r\n\toverride val colors = object : TerritoryColors(){\r\n\t\toverride val tokenTop = RGB(211, 212, 152)\r\n\t\toverride val tokenBottom = RGB(160, 151, 116)\r\n\t\t\r\n\t\toverride val portalSeed = 410L\r\n\t\t\r\n\t\toverride fun nextPortalColor(rand: Random, color: FloatArray){\r\n\t\t\tif (rand.nextBoolean()){\r\n\t\t\t\tcolor[0] = rand.nextFloat(0.65F, 0.9F)\r\n\t\t\t\tcolor[1] = rand.nextFloat(0.45F, 0.7F)\r\n\t\t\t\tcolor[2] = rand.nextFloat(0.15F, 0.4F)\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tcolor.fill(rand.nextFloat(0.95F, 1F))\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tprivate const val MAX_FOG_DENSITY = 0.069F\r\n\t\r\n\toverride val environment = object : TerritoryEnvironment(){\r\n\t\toverride val fogColor\r\n\t\t\tget() = (fogDensity / 0.275F).let { Vec3d(0.15 + it, 0.08 + it, 0.03) }\r\n\t\t\r\n\t\toverride val fogDensity\r\n\t\t\tget() = currentFogDensity.get(MC.partialTicks)\r\n\t\t\r\n\t\toverride val skyLight = 15\r\n\t\t\r\n\t\toverride val voidRadiusMpXZ = 1.35F\r\n\t\toverride val voidRadiusMpY = 0.975F\r\n\t\toverride val voidCenterOffset = Vec3d(0.0, -8.0, 0.0)\r\n\t\t\r\n\t\toverride val lightmap = object : ILightmap{\r\n\t\t\toverride fun update(colors: FloatArray, sunBrightness: Float, skyLight: Float, blockLight: Float, partialTicks: Float){\r\n\t\t\t\tval blockFactor = calcLightFactor(blockLight)\r\n\t\t\t\t\r\n\t\t\t\tcolors[0] = (blockLight * 0.9F) + skyLight + 0.12F\r\n\t\t\t\tcolors[1] = (blockFactor * 0.7F) + (skyLight * 0.8F) + 0.08F\r\n\t\t\t\tcolors[2] = (blockFactor * 0.5F) + (skyLight * 1.2F) + (0.09F * nightVisionFactor)\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tprivate val currentFogDensity = LerpedFloat(MAX_FOG_DENSITY)\r\n\t\tprivate var nightVisionFactor = 0F\r\n\t\t\r\n\t\t@Sided(Side.CLIENT)\r\n\t\toverride fun setupClient(){\r\n\t\t\ttickClient()\r\n\t\t\tcurrentFogDensity.updateImmediately(MAX_FOG_DENSITY * 0.8F)\r\n\t\t}\r\n\t\t\r\n\t\t@Sided(Side.CLIENT)\r\n\t\toverride fun tickClient(){\r\n\t\t\tval player = MC.player\r\n\t\t\tval pos = player?.lookPosVec?.let(::Pos)\r\n\t\t\t\r\n\t\t\tval light: Float\r\n\t\t\t\r\n\t\t\tif (pos == null){\r\n\t\t\t\tlight = 1F\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tval world = player.world\r\n\t\t\t\t\r\n\t\t\t\tvar levelBlock = 0\r\n\t\t\t\tvar levelSky = 0\r\n\t\t\t\t\r\n\t\t\t\tfor(offset in pos.allInCenteredBoxMutable(1, 1, 1)){\r\n\t\t\t\t\tlevelBlock = max(levelBlock, world.getLightFor(BLOCK, offset))\r\n\t\t\t\t\tlevelSky = max(levelSky, world.getLightFor(SKY, offset))\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tlight = max(levelBlock / 15F, levelSky / 12F)\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tval prev = currentFogDensity.currentValue\r\n\t\t\tval next = MAX_FOG_DENSITY - (light.pow(0.2F) * 0.85F * MAX_FOG_DENSITY)\r\n\t\t\tval speed = if (next > prev) 0.025F else 0.055F\r\n\t\t\t\r\n\t\t\tcurrentFogDensity.update(prev + (next - prev) * speed)\r\n\t\t\tnightVisionFactor = if (player?.isPotionActive(Potions.NIGHT_VISION) == true) 1F else 0F\r\n\t\t}\r\n\t}\r\n}\r\n
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/chylex/hee/game/world/territory/descriptions/Territory_ForgottenTombs.kt (revision 41aa0b6695a1ac98e2d75beae7cb260618fe1f25)
+++ src/main/java/chylex/hee/game/world/territory/descriptions/Territory_ForgottenTombs.kt (date 1579593955530)
@@ -1,4 +1,5 @@
package chylex.hee.game.world.territory.descriptions
+import chylex.hee.client.render.territory.EnvironmentRenderer
import chylex.hee.client.render.territory.lightmaps.ILightmap
import chylex.hee.client.render.territory.lightmaps.ILightmap.Companion.calcLightFactor
import chylex.hee.client.util.MC
@@ -7,6 +8,7 @@
import chylex.hee.game.world.territory.properties.TerritoryEnvironment
import chylex.hee.system.migration.forge.Side
import chylex.hee.system.migration.forge.Sided
+import chylex.hee.system.migration.vanilla.EntityPlayer
import chylex.hee.system.migration.vanilla.Potions
import chylex.hee.system.util.Pos
import chylex.hee.system.util.allInCenteredBoxMutable
@@ -55,6 +57,14 @@
override val voidRadiusMpY = 0.975F
override val voidCenterOffset = Vec3d(0.0, -8.0, 0.0)
+ override val renderer = EnvironmentRenderer(
+ /* TODO SkyCubeStatic(
+ texture = Resource.Vanilla("textures/environment/end_sky.png"),
+ color = Vec3d(0.99, 0.5, 0.7),
+ alpha = 1F
+ )*/
+ )
+
override val lightmap = object : ILightmap{
override fun update(colors: FloatArray, sunBrightness: Float, skyLight: Float, blockLight: Float, partialTicks: Float){
val blockFactor = calcLightFactor(blockLight)
@@ -69,41 +79,32 @@
private var nightVisionFactor = 0F
@Sided(Side.CLIENT)
- override fun setupClient(){
- tickClient()
+ override fun setupClient(player: EntityPlayer){
+ tickClient(player)
currentFogDensity.updateImmediately(MAX_FOG_DENSITY * 0.8F)
}
@Sided(Side.CLIENT)
- override fun tickClient(){
- val player = MC.player
- val pos = player?.lookPosVec?.let(::Pos)
-
- val light: Float
-
- if (pos == null){
- light = 1F
- }
- else{
- val world = player.world
-
- var levelBlock = 0
- var levelSky = 0
-
- for(offset in pos.allInCenteredBoxMutable(1, 1, 1)){
- levelBlock = max(levelBlock, world.getLightFor(BLOCK, offset))
- levelSky = max(levelSky, world.getLightFor(SKY, offset))
- }
-
- light = max(levelBlock / 15F, levelSky / 12F)
- }
+ override fun tickClient(player: EntityPlayer){
+ val world = player.world
+ val pos = Pos(player.lookPosVec)
+
+ var levelBlock = 0
+ var levelSky = 0
+
+ for(offset in pos.allInCenteredBoxMutable(1, 1, 1)){
+ levelBlock = max(levelBlock, world.getLightFor(BLOCK, offset))
+ levelSky = max(levelSky, world.getLightFor(SKY, offset))
+ }
+
+ val light = max(levelBlock / 15F, levelSky / 12F)
val prev = currentFogDensity.currentValue
val next = MAX_FOG_DENSITY - (light.pow(0.2F) * 0.85F * MAX_FOG_DENSITY)
val speed = if (next > prev) 0.025F else 0.055F
currentFogDensity.update(prev + (next - prev) * speed)
- nightVisionFactor = if (player?.isPotionActive(Potions.NIGHT_VISION) == true) 1F else 0F
+ nightVisionFactor = if (player.isPotionActive(Potions.NIGHT_VISION)) 1F else 0F
}
}
}
Index: src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonRoom_Tomb.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonRoom_Tomb.kt (date 1579593033167)
+++ src/main/java/chylex/hee/game/world/feature/tombdungeon/piece/TombDungeonRoom_Tomb.kt (date 1579593033167)
@@ -0,0 +1,18 @@
+package chylex.hee.game.world.feature.tombdungeon.piece
+import chylex.hee.game.world.feature.tombdungeon.connection.TombDungeonConnection
+import chylex.hee.game.world.feature.tombdungeon.connection.TombDungeonConnectionType.TOMB_ENTRANCE
+import chylex.hee.game.world.structure.IStructureWorld
+import chylex.hee.game.world.structure.piece.IStructurePieceConnection
+import chylex.hee.system.migration.Facing.SOUTH
+import chylex.hee.system.util.Pos
+
+class TombDungeonRoom_Tomb(file: String, entranceY: Int, isFancy: Boolean) : TombDungeonAbstractPieceFromFile(file, isFancy){
+ override val connections = arrayOf<IStructurePieceConnection>(
+ TombDungeonConnection(TOMB_ENTRANCE, Pos(centerX, entranceY, maxZ), SOUTH)
+ )
+
+ override fun generate(world: IStructureWorld, instance: Instance){
+ super.generate(world, instance)
+ // TODO
+ }
+}
Binary file not shown.
Binary file not shown.
Binary file not shown.
-18
View File
@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Statistic">
<option name="fileTypes" value="cfg;info;md" />
<option name="separateTabsFileTypes" value="java;json;kt;lang;mcmeta;py" />
<option name="excludedDirectories">
<list>
<option value="$PROJECT_DIR$/.gradle" />
<option value="$PROJECT_DIR$/gradle" />
<option value="$PROJECT_DIR$/.idea" />
<option value="$PROJECT_DIR$/run" />
<option value="$PROJECT_DIR$/bin" />
<option value="$PROJECT_DIR$/assets" />
<option value="$PROJECT_DIR$/build" />
</list>
</option>
</component>
</project>
Generated
-11
View File
@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitSharedSettings">
<option name="FORCE_PUSH_PROHIBITED_PATTERNS">
<list />
</option>
</component>
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
+1
View File
@@ -1,2 +1,3 @@
# Hardcore Ender Expansion 2 # Hardcore Ender Expansion 2
Work in progress. PRs will not be accepted before release. Work in progress. PRs will not be accepted before release.
Binary file not shown.
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"meta":{"format_version":"3.0","model_format":"modded_entity","box_uv":true},"name":"ender_eye","geo_name":"EnderEye","resolution":{"width":128,"height":64},"elements":[{"name":"head","from":[-9,0,-9],"to":[9,18,9],"autouv":0,"color":6,"origin":[0,0.5,0],"uuid":"fb9acb7e-e386-2daf-51e7-e487f7edb51e"},{"name":"eye","from":[-8,1,-9],"to":[8,17,-8],"autouv":0,"color":5,"origin":[0,0,0],"uv_offset":[15,47],"uuid":"0f34925f-0ce7-73d1-b6bc-3ebc6b954619"},{"name":"left","from":[9,-17,-2],"to":[12,10,1],"autouv":0,"color":3,"origin":[0,0,0],"uv_offset":[73,0],"uuid":"683a14b0-c7d3-ee33-e790-ec456d2eafa1"},{"name":"right","from":[-12,-17,-2],"to":[-9,10,1],"autouv":0,"color":6,"shade":false,"origin":[0,0,0],"uv_offset":[73,0],"uuid":"edc957d9-62dd-52d4-82a3-9db5f0f81fee"}],"outliner":[{"name":"head","uuid":"2a0767df-d550-08ea-5bef-585cc941b58f","export":true,"isOpen":true,"visibility":true,"autouv":0,"origin":[0,9,0],"children":["fb9acb7e-e386-2daf-51e7-e487f7edb51e"]},{"name":"eye","uuid":"3ed25df7-6cab-0a5f-3900-39521430d664","export":true,"isOpen":true,"visibility":true,"autouv":0,"origin":[0,9,0],"children":["0f34925f-0ce7-73d1-b6bc-3ebc6b954619"]},{"name":"arms","uuid":"50918f7b-a888-8c07-5851-72c157cac008","export":true,"isOpen":true,"visibility":true,"autouv":0,"origin":[0,8.5,-0.5],"children":["683a14b0-c7d3-ee33-e790-ec456d2eafa1","edc957d9-62dd-52d4-82a3-9db5f0f81fee"]}],"textures":[{"path":"C:\\Dan\\Projekty\\Hardcore-Ender-Expansion-2\\src\\main\\resources\\assets\\hee\\textures\\entity\\ender_eye.png","name":"ender_eye.png","folder":"entity","namespace":"hee","id":"0","particle":false,"mode":"link","saved":true,"uuid":"43e48689-95e3-8430-06f8-1c61b6f96c9d"}]}
Binary file not shown.
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"meta":{"format_version":"3.0","model_format":"modded_entity","box_uv":true},"name":"IgneousPlate","geo_name":"IgneousPlate","resolution":{"width":32,"height":16},"elements":[{"name":"cube","from":[-14,-12,0],"to":[-12,-4,2],"autouv":0,"color":3,"origin":[3.5,8,1],"uv_offset":[0,6],"uuid":"90291b85-56cc-94f2-58ac-e37c867ac90a"},{"name":"cube","from":[-4,-12,0],"to":[-2,-4,2],"autouv":0,"color":1,"origin":[0,0,0],"uv_offset":[8,6],"uuid":"cf15a4d3-d9cb-be21-c49a-1e2cf8ba68e9"},{"name":"cube","from":[-14,-4,0],"to":[-2,-2,2],"autouv":0,"color":7,"origin":[0,0,0],"uuid":"5e21b956-681a-3556-7acd-a7098ee9fb5c"},{"name":"cube","from":[-14,-14,0],"to":[-2,-12,2],"autouv":0,"color":4,"origin":[0,0,0],"uv_offset":[0,4],"uuid":"e944760c-3ee1-ca95-0a38-f470471948ba"},{"name":"cube","from":[-12,-12,0.5],"to":[-4,-4,1.5],"autouv":0,"color":3,"origin":[0,0,0],"uv_offset":[14,7],"uuid":"0566d9d0-a1b5-e435-e234-caa759b3aec4"}],"outliner":[{"name":"outerBox","uuid":"a5f25de6-2619-4ae4-2de8-c1cdec9112b7","export":true,"isOpen":true,"visibility":true,"autouv":0,"origin":[0,0,0],"children":["90291b85-56cc-94f2-58ac-e37c867ac90a","cf15a4d3-d9cb-be21-c49a-1e2cf8ba68e9","5e21b956-681a-3556-7acd-a7098ee9fb5c","e944760c-3ee1-ca95-0a38-f470471948ba"]},{"name":"innerBox","uuid":"62290e42-d30b-2154-940b-a50c3c127698","export":true,"isOpen":true,"visibility":true,"autouv":0,"origin":[0,0,0],"children":["0566d9d0-a1b5-e435-e234-caa759b3aec4"]}],"textures":[{"path":"C:\\Dan\\Projekty\\Hardcore-Ender-Expansion-2\\src\\main\\resources\\assets\\hee\\textures\\entity\\igneous_plate.png","name":"igneous_plate.png","folder":"entity","namespace":"hee","id":"0","particle":false,"mode":"link","saved":true,"uuid":"f1c8b220-6b45-6f19-175d-ba78fba868a3"}]}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-131
View File
@@ -1,131 +0,0 @@
buildscript{
ext.kotlin_version = "1.3.61"
repositories{
jcenter()
mavenCentral()
maven{
url = "https://files.minecraftforge.net/maven"
}
}
dependencies{
classpath(group: "net.minecraftforge.gradle", name: "ForgeGradle", version: "3.+", changing: true){
exclude group: "trove", module: "trove"
}
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:" + kotlin_version
}
}
repositories{
maven{
url = "https://minecraft.curseforge.com/api/maven"
}
}
apply plugin: "net.minecraftforge.gradle"
apply plugin: "eclipse"
apply plugin: "kotlin"
def mcversion = "1.14.4"
def forgeversion = "28.1.116"
def kottleversion = "1.4.0"
def prefixName = "displayName = "
def prefixVersion = "version = "
def metaLines = file("src/main/resources/META-INF/mods.toml").readLines()
def metaName = metaLines.find { line -> line.startsWith(prefixName) }.substring(prefixName.length())[1..-2]
def metaVersion = metaLines.find { line -> line.startsWith(prefixVersion) }.substring(prefixVersion.length())[1..-2]
group = "chylex.hee"
version = metaVersion
archivesBaseName = metaName.replaceAll("\\s", "")
sourceCompatibility = targetCompatibility = "1.8"
tasks.withType(JavaCompile){
sourceCompatibility = targetCompatibility = "1.8"
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile){
kotlinOptions{
jvmTarget = "1.8"
apiVersion = "1.3"
languageVersion = "1.3"
freeCompilerArgs = [
"-Xno-call-assertions",
"-Xno-param-assertions",
"-Xno-receiver-assertions",
"-Xjvm-default=enable",
"-Xuse-experimental=kotlin.ExperimentalUnsignedTypes",
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts",
"-XXLanguage:+InlineClasses"
]
}
}
minecraft{
mappings channel: "snapshot", version: "20200119-1.14.4"
accessTransformer = file("src/main/resources/META-INF/accesstransformer.cfg")
runs{
client{
properties "hee.debug": ""
workingDirectory file("run")
mods{
hee{
source sourceSets.main
}
}
}
server{
properties "hee.debug": ""
workingDirectory file("run")
mods{
hee{
source sourceSets.main
}
}
}
}
}
dependencies{
minecraft "net.minecraftforge:forge:" + mcversion + "-" + forgeversion
implementation "kottle:Kottle:" + kottleversion
testImplementation "org.junit.jupiter:junit-jupiter-api:5.3.0-RC1"
}
test{
systemProperty "junit.jupiter.testinstance.lifecycle.default", "per_class"
}
jar{
archiveName = archivesBaseName + "-" + mcversion + "-v" + version + ".jar"
from("./"){
include "LICENSE"
}
manifest{
attributes([
"Specification-Title" : "bettersprinting",
"Specification-Version": "1",
"Specification-Vendor" : "chylex",
"Implementation-Title" : metaName,
"Implementation-Version": metaVersion,
"Implementation-Vendor" : "chylex",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
+13
View File
@@ -0,0 +1,13 @@
plugins {
idea
}
idea {
module {
excludeDirs.add(file("gradle"))
excludeDirs.add(file("run"))
isDownloadSources = true
isDownloadJavadoc = true
}
}
+17 -2
View File
@@ -1,3 +1,18 @@
# Sets default memory used for gradle commands. Can be overridden by user or command line properties. # Mod
# This is required to provide enough memory for the Minecraft decompilation process. group=com.chylex.hee
version=2.0.0-dev
# Dependencies
javaVersion=21
neoForgeVersion=20.6.13-beta
kotlinForForgeVersion=5.0.2
# Constraints
minecraftVersionRange=[1.20.6,)
neoForgeVersionRange=[20.6.13-beta,)
kotlinForForgeVersionRange=[5.0.0,)
# Gradle
org.gradle.jvmargs=-Xmx3G org.gradle.jvmargs=-Xmx3G
org.gradle.caching=true
org.gradle.parallel=true
+10
View File
@@ -0,0 +1,10 @@
# IntelliJ
/.idea/
*.iml
*.ipr
*.iws
# Gradle
/gradle/wrapper/gradle-wrapper.jar
+34
View File
@@ -0,0 +1,34 @@
plugins {
idea
`kotlin-dsl`
`maven-publish`
}
group = "com.chylex.hee.gradle"
version = "1"
idea {
module {
excludeDirs.add(file("gradle"))
excludeDirs.add(file("repository"))
isDownloadSources = true
isDownloadJavadoc = true
}
}
repositories {
gradlePluginPortal()
maven(url = "https://maven.neoforged.net/releases") { name = "NeoForge" }
}
dependencies {
implementation(group = "net.neoforged.gradle", name = "userdev", version = "7.0.120")
implementation(group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version = "1.9.22")
}
publishing {
repositories {
maven(url = projectDir.resolve("repository"))
}
}
+6
View File
@@ -0,0 +1,6 @@
# Gradle
org.gradle.caching=true
org.gradle.parallel=true
# Publishing
systemProp.org.gradle.internal.publish.checksums.insecure=true
+7
View File
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
+249
View File
@@ -0,0 +1,249 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"
+92
View File
@@ -0,0 +1,92 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@@ -0,0 +1 @@
8c53620c5692edaa922df99e88aa7451
@@ -0,0 +1 @@
bd66e0beeaa9a4e476515c12572e29e3d561b7b2
@@ -0,0 +1,80 @@
{
"formatVersion": "1.1",
"component": {
"group": "com.chylex.hee.gradle",
"module": "hee-gradle-plugins",
"version": "1",
"attributes": {
"org.gradle.status": "release"
}
},
"createdBy": {
"gradle": {
"version": "8.7"
}
},
"variants": [
{
"name": "apiElements",
"attributes": {
"org.gradle.category": "library",
"org.gradle.dependency.bundling": "external",
"org.gradle.jvm.environment": "standard-jvm",
"org.gradle.jvm.version": 21,
"org.gradle.libraryelements": "jar",
"org.gradle.usage": "java-api",
"org.jetbrains.kotlin.platform.type": "jvm"
},
"files": [
{
"name": "hee-gradle-plugins-1.jar",
"url": "hee-gradle-plugins-1.jar",
"size": 733108,
"sha512": "8c1ba78307aa2c515f26f83f9266500bd68ca6333c7cff829c2a76796424269d8863cfd702d399c795adfdae94b7bcdf72f07b8c6bd8152bf060c78a43283407",
"sha256": "171ba9a326baa942164ec9c6399a50c27b71edce473f08cfa2add54ce467c2ec",
"sha1": "bd66e0beeaa9a4e476515c12572e29e3d561b7b2",
"md5": "8c53620c5692edaa922df99e88aa7451"
}
]
},
{
"name": "runtimeElements",
"attributes": {
"org.gradle.category": "library",
"org.gradle.dependency.bundling": "external",
"org.gradle.jvm.environment": "standard-jvm",
"org.gradle.jvm.version": 21,
"org.gradle.libraryelements": "jar",
"org.gradle.usage": "java-runtime",
"org.jetbrains.kotlin.platform.type": "jvm"
},
"dependencies": [
{
"group": "net.neoforged.gradle",
"module": "userdev",
"version": {
"requires": "7.0.120"
}
},
{
"group": "org.jetbrains.kotlin",
"module": "kotlin-gradle-plugin",
"version": {
"requires": "1.9.22"
}
}
],
"files": [
{
"name": "hee-gradle-plugins-1.jar",
"url": "hee-gradle-plugins-1.jar",
"size": 733108,
"sha512": "8c1ba78307aa2c515f26f83f9266500bd68ca6333c7cff829c2a76796424269d8863cfd702d399c795adfdae94b7bcdf72f07b8c6bd8152bf060c78a43283407",
"sha256": "171ba9a326baa942164ec9c6399a50c27b71edce473f08cfa2add54ce467c2ec",
"sha1": "bd66e0beeaa9a4e476515c12572e29e3d561b7b2",
"md5": "8c53620c5692edaa922df99e88aa7451"
}
]
}
]
}
@@ -0,0 +1 @@
bfc6d663eb698b5e372348b870c7b951
@@ -0,0 +1 @@
adcd08fa9b6d9aa94d2a69258a89bdab23c7ace4
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- This module was also published with a richer model, Gradle metadata, -->
<!-- which should be used instead. Do not delete the following line which -->
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
<!-- that they should prefer consuming it instead. -->
<!-- do_not_remove: published-with-gradle-metadata -->
<modelVersion>4.0.0</modelVersion>
<groupId>com.chylex.hee.gradle</groupId>
<artifactId>hee-gradle-plugins</artifactId>
<version>1</version>
<dependencies>
<dependency>
<groupId>net.neoforged.gradle</groupId>
<artifactId>userdev</artifactId>
<version>7.0.120</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-gradle-plugin</artifactId>
<version>1.9.22</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
@@ -0,0 +1 @@
91b6a4aa191ec0c4dce4abefeb00f72e
@@ -0,0 +1 @@
1e6a80349a017a5a53816cf61cf5fc7fc5ba4fc1
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>com.chylex.hee.gradle</groupId>
<artifactId>hee-gradle-plugins</artifactId>
<versioning>
<latest>1</latest>
<release>1</release>
<versions>
<version>1</version>
</versions>
<lastUpdated>20240511075855</lastUpdated>
</versioning>
</metadata>
@@ -0,0 +1 @@
ab01f51b197eabf9037f94777a6ae9d9
@@ -0,0 +1 @@
7a4d2163a1d3f6a015b51bc76bd29d214595dea7
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>hee.java</groupId>
<artifactId>hee.java.gradle.plugin</artifactId>
<version>1</version>
<packaging>pom</packaging>
<dependencies>
<dependency>
<groupId>com.chylex.hee.gradle</groupId>
<artifactId>hee-gradle-plugins</artifactId>
<version>1</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1 @@
f196bd1a3bc41dee8da6f62de657232d
@@ -0,0 +1 @@
28057427bd53cdd856eaf9ee66a132d9a1125be1
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>hee.java</groupId>
<artifactId>hee.java.gradle.plugin</artifactId>
<versioning>
<latest>1</latest>
<release>1</release>
<versions>
<version>1</version>
</versions>
<lastUpdated>20240511075854</lastUpdated>
</versioning>
</metadata>
@@ -0,0 +1 @@
603d48970b1cad2e907a1b070f20247a
@@ -0,0 +1 @@
22b4ca491774244c91f60f429b8c4dfd6a6bda42
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>hee.kotlin</groupId>
<artifactId>hee.kotlin.gradle.plugin</artifactId>
<version>1</version>
<packaging>pom</packaging>
<dependencies>
<dependency>
<groupId>com.chylex.hee.gradle</groupId>
<artifactId>hee-gradle-plugins</artifactId>
<version>1</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1 @@
8c4f03e97711738d21870d5a9918bc7e
@@ -0,0 +1 @@
32e486aa78a2b3428b3f1151dbc7fbf674d4b009
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>hee.kotlin</groupId>
<artifactId>hee.kotlin.gradle.plugin</artifactId>
<versioning>
<latest>1</latest>
<release>1</release>
<versions>
<version>1</version>
</versions>
<lastUpdated>20240511075854</lastUpdated>
</versioning>
</metadata>
@@ -0,0 +1 @@
6f57bf2093a89c9c5035915b9fc8dabc
@@ -0,0 +1 @@
86d0ca44e770726163d46cbb481dd035d6a86f01
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>hee.library</groupId>
<artifactId>hee.library.gradle.plugin</artifactId>
<version>1</version>
<packaging>pom</packaging>
<dependencies>
<dependency>
<groupId>com.chylex.hee.gradle</groupId>
<artifactId>hee-gradle-plugins</artifactId>
<version>1</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1 @@
03c0e6be358b44308048f2cf90e69e02
@@ -0,0 +1 @@
88fbfa80926a52378fa2f3e98d1ebbbb4e444a90
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>hee.library</groupId>
<artifactId>hee.library.gradle.plugin</artifactId>
<versioning>
<latest>1</latest>
<release>1</release>
<versions>
<version>1</version>
</versions>
<lastUpdated>20240511075854</lastUpdated>
</versioning>
</metadata>
@@ -0,0 +1 @@
a69c3149cf17aa90ac5624e667a6c137
@@ -0,0 +1 @@
a011445613d78360085a8987a5e5cbf40659e77a
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>hee.minecraft</groupId>
<artifactId>hee.minecraft.gradle.plugin</artifactId>
<version>1</version>
<packaging>pom</packaging>
<dependencies>
<dependency>
<groupId>com.chylex.hee.gradle</groupId>
<artifactId>hee-gradle-plugins</artifactId>
<version>1</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1 @@
e600fee6a3545c69c77dc076b28eb823
@@ -0,0 +1 @@
7e65b2d10962b59d1ddc7cfcf54b6db6c21c384b
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>hee.minecraft</groupId>
<artifactId>hee.minecraft.gradle.plugin</artifactId>
<versioning>
<latest>1</latest>
<release>1</release>
<versions>
<version>1</version>
</versions>
<lastUpdated>20240511075854</lastUpdated>
</versioning>
</metadata>
@@ -0,0 +1 @@
0c7b43bd121d8eff6d3ca077903238a4
@@ -0,0 +1 @@
bb3dbbbaf4629a499f56623e9e38d41fe7a79408
+1
View File
@@ -0,0 +1 @@
rootProject.name = "hee-gradle-plugins"
@@ -0,0 +1,22 @@
val javaVersion: String by project
plugins {
java
}
sourceSets {
configureEach {
java.setSrcDirs(listOf(file("./$name/java")))
resources.setSrcDirs(listOf(file("./$name/resources")))
}
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(javaVersion))
}
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
@@ -0,0 +1,24 @@
val kotlinForForgeVersion: String by project
plugins {
id("hee.java")
kotlin("jvm")
}
sourceSets {
configureEach {
java.setSrcDirs(emptyList<File>())
kotlin.setSrcDirs(listOf(file("./$name/kotlin")))
}
}
repositories {
maven(url = "https://thedarkcolour.github.io/KotlinForForge") {
name = "KotlinForForge"
content { includeGroup("thedarkcolour") }
}
}
dependencies {
implementation("thedarkcolour:kotlinforforge-neoforge:${kotlinForForgeVersion}")
}
@@ -0,0 +1,27 @@
plugins {
id("hee.java")
}
val generateManifest = tasks.register("generateManifest") {
val outputDir = layout.buildDirectory.dir("generateManifest")
outputs.dir(outputDir).withPropertyName("outputDir")
doLast {
val outputDirFile = outputDir.get().asFile
outputDirFile.mkdir()
outputDirFile.resolve("MANIFEST.MF").writeText(
"""
Automatic-Module-Name: com.chylex.hee.${project.name}
FMLModType: GAMELIBRARY
""".trimIndent()
)
}
}
tasks.processResources {
from(generateManifest) {
into("META-INF")
}
}
@@ -0,0 +1,12 @@
val neoForgeVersion: String by project
plugins {
id("hee.java")
id("net.neoforged.gradle.userdev")
}
dependencies {
implementation("net.neoforged:neoforge:$neoForgeVersion")
}
runs.clear()

Some files were not shown because too many files have changed in this diff Show More