1
0
mirror of https://github.com/chylex/Hardcore-Ender-Expansion-2.git synced 2025-11-19 08:22:35 +01:00

28 Commits

Author SHA1 Message Date
b64005357e [WIP] Components 2021-02-28 14:33:35 +01:00
3279dde625 Add a component system 2021-02-28 13:29:18 +01:00
a9df51e315 Refactor Ender Eye spawner particle data to use FxVecData 2021-02-27 23:57:40 +01:00
322c005648 Implement Tomb Dungeon mob spawn triggers 2021-02-27 23:16:27 +01:00
5211731e62 Tweak Dusty Stone crumble behavior for light mobs 2021-02-27 20:57:13 +01:00
08d2fcb19c Fix overriding canCreatureSpawn instead of canEntitySpawn 2021-02-07 14:00:13 +01:00
e9077c680f Move unit tests and add main methods with special tests 2021-01-23 14:18:46 +01:00
276df76979 Fix Transform mirroring entity yaw incorrectly 2021-01-02 22:23:18 +01:00
14788dd9ad Fix invisible bottom layer in Jar o' Dust when placed on transparent block 2020-12-31 21:25:57 +01:00
5b69abf29e Make Jar o' Dust layers more visible & add dust compression effect 2020-12-31 21:25:28 +01:00
dd6f4fa4d1 Implement Jar o' Dust generation in Tomb Dungeon 2020-12-31 21:16:07 +01:00
414b11aa0d Implement Undread spawning in Forgotten Tombs 2020-12-30 00:11:12 +01:00
14fbcac4e0 Make Undreads avoid unsupported Dusty Stone when not in aggro 2020-12-29 21:36:22 +01:00
3e0aedc039 Add entity ground navigator that supports custom node processors 2020-12-29 21:33:38 +01:00
20c21f9afa Fix overriding wrong overload of getBlockPathWeight in entities 2020-12-29 19:49:45 +01:00
f4fac58b32 Add special handler for entities colliding with full blocks instead of making collision boxes slightly shorter 2020-12-29 17:38:00 +01:00
f21a4fbf3f Replace broken EntitySelector.inDimension 2020-12-29 17:24:49 +01:00
c9ad94bcb4 Fix portal rendering in fog 2020-12-29 15:11:14 +01:00
1a11754bad Reformat code 2020-12-25 09:15:22 +01:00
421cadb545 Fix IntelliJ folder exclusions in build.gradle 2020-12-25 00:05:27 +01:00
596042b255 Work on Forgotten Tombs environment (dust particles, Grave Dirt sounds) 2020-12-20 19:27:06 +01:00
f4bfd0f8e3 Add IntColor properties for RGBA as floats 2020-12-20 15:43:45 +01:00
373087e33c Fix debug mode not removing territory fog 2020-12-19 12:57:07 +01:00
a46524e518 Finalize The Hub environment 2020-12-19 12:40:50 +01:00
ecd48ec345 Address a few technical TODOs and tweak code 2020-12-15 20:44:36 +01:00
8c21bcad67 Partially fix rendering issues with lightmaps and fog after updating from 1.14 2020-12-15 20:27:00 +01:00
7b54a8885a IntelliJ folder exclusions are fucked... 2020-12-11 17:03:00 +01:00
e587f212eb Refactor Vec3d uses to simplify eventual 1.16 transition 2020-12-08 05:37:13 +01:00
897 changed files with 11863 additions and 9627 deletions

2
.idea/gradle.xml generated
View File

@@ -4,6 +4,8 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="delegatedBuild" value="true" />
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">

1
.idea/misc.xml generated
View File

@@ -14,7 +14,6 @@
<item index="9" class="java.lang.String" itemvalue="net.minecraftforge.fml.relauncher.IFMLLoadingPlugin.Name" />
</list>
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</component>

View File

@@ -1,2 +1,3 @@
# Hardcore Ender Expansion 2
Work in progress. PRs will not be accepted before release.

View File

@@ -49,8 +49,16 @@ archivesBaseName = metaName.replaceAll("\\s", "")
idea {
module {
[".idea", ".settings", ".classpath", ".project", "gradle", "out", "run"].each {
excludeDirs << file(it)
[".idea", ".settings", ".gradle", "build", "gradle", "out", "run", "src/main/kotlin", "src/test/kotlin"].each {
excludeDirs += file(it)
}
["out", "src/main/kotlin", "src/test/kotlin"].each {
excludeDirs += file("src/system/" + it)
}
["src/main/kotlin", "src/test/kotlin"].each {
excludeDirs += file("data/" + it)
}
}
}

View File

@@ -1,4 +1,5 @@
package chylex.hee.datagen
import chylex.hee.HEE
import chylex.hee.datagen.client.BlockItemModels
import chylex.hee.datagen.client.BlockModels

View File

@@ -1,4 +1,5 @@
package chylex.hee.datagen
import chylex.hee.HEE
import chylex.hee.system.facades.Resource
import net.minecraft.block.Block

View File

@@ -1,4 +1,5 @@
package chylex.hee.datagen.client
import chylex.hee.datagen.client.util.block
import chylex.hee.datagen.client.util.multi
import chylex.hee.datagen.client.util.override

View File

@@ -1,4 +1,5 @@
package chylex.hee.datagen.client
import chylex.hee.datagen.client.util.cauldron
import chylex.hee.datagen.client.util.cross
import chylex.hee.datagen.client.util.cube
@@ -185,20 +186,26 @@ class BlockModels(generator: DataGenerator, modid: String, existingFileHelper: E
}
}
parent(ModBlocks.TABLE_BASE_TIER_1, Resource.Custom("block/table_tier_1")).then { Resource.Custom("block/transparent").let {
parent(ModBlocks.TABLE_BASE_TIER_1, Resource.Custom("block/table_tier_1")).then {
Resource.Custom("block/transparent").let {
texture("overlay_top", it)
texture("overlay_side", it)
}}
}
}
parent(ModBlocks.TABLE_BASE_TIER_2, Resource.Custom("block/table_tier_2")).then { Resource.Custom("block/transparent").let {
parent(ModBlocks.TABLE_BASE_TIER_2, Resource.Custom("block/table_tier_2")).then {
Resource.Custom("block/transparent").let {
texture("overlay_top", it)
texture("overlay_side", it)
}}
}
}
parent(ModBlocks.TABLE_BASE_TIER_3, Resource.Custom("block/table_tier_3")).then { Resource.Custom("block/transparent").let {
parent(ModBlocks.TABLE_BASE_TIER_3, Resource.Custom("block/table_tier_3")).then {
Resource.Custom("block/transparent").let {
texture("overlay_top", it)
texture("overlay_side", it)
}}
}
}
table(ModBlocks.ACCUMULATION_TABLE_TIER_1)
table(ModBlocks.ACCUMULATION_TABLE_TIER_2)

View File

@@ -1,4 +1,5 @@
package chylex.hee.datagen.client
import chylex.hee.datagen.client.util.cube
import chylex.hee.datagen.client.util.log
import chylex.hee.datagen.client.util.pillar

View File

@@ -1,4 +1,5 @@
package chylex.hee.datagen.client
import chylex.hee.datagen.client.util.layers
import chylex.hee.datagen.client.util.multi
import chylex.hee.datagen.client.util.override

View File

@@ -1,4 +1,5 @@
package chylex.hee.datagen.client.util
import chylex.hee.datagen.Callback
import chylex.hee.datagen.path
import chylex.hee.datagen.r

View File

@@ -1,4 +1,5 @@
package chylex.hee.datagen.client.util
import chylex.hee.datagen.r
import chylex.hee.datagen.safeUnit
import chylex.hee.system.migration.BlockLog

View File

@@ -1,4 +1,5 @@
package chylex.hee.datagen.client.util
import chylex.hee.datagen.Callback
import chylex.hee.datagen.path
import chylex.hee.datagen.r

View File

@@ -1,4 +1,5 @@
package chylex.hee.datagen.server
import chylex.hee.datagen.server.util.BlockLootTableProvider
import chylex.hee.init.ModBlocks
import chylex.hee.init.ModItems

View File

@@ -1,4 +1,5 @@
package chylex.hee.datagen.server
import chylex.hee.datagen.server.util.add
import chylex.hee.game.block.BlockWhitebarkSapling
import chylex.hee.init.ModBlocks

View File

@@ -1,4 +1,5 @@
package chylex.hee.datagen.server
import chylex.hee.init.ModItems
import net.minecraft.data.DataGenerator
import net.minecraft.data.ItemTagsProvider

View File

@@ -1,4 +1,5 @@
package chylex.hee.datagen.server.util
import chylex.hee.system.migration.BlockFlowerPot
import com.mojang.datafixers.util.Pair
import net.minecraft.block.Block

View File

@@ -1,4 +1,5 @@
package chylex.hee.datagen.server.util
import net.minecraft.tags.Tag
fun <T> Tag.Builder<T>.add(items: List<T>) {

View File

@@ -1,4 +1,5 @@
package chylex.hee
import chylex.hee.game.block.BlockBrewingStandCustom
import chylex.hee.game.block.BlockEndPortalOverride
import chylex.hee.game.block.BlockShulkerBoxOverride

View File

@@ -1,4 +1,5 @@
package chylex.hee.client
import chylex.hee.HEE
import chylex.hee.system.facades.Resource
import chylex.hee.system.migration.supply

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.gui
import chylex.hee.client.gui.base.GuiBaseChestContainer
import chylex.hee.game.container.ContainerAmuletOfRecovery
import chylex.hee.network.server.PacketServerContainerEvent

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.gui
import chylex.hee.client.MC
import chylex.hee.client.render.gl.GL
import chylex.hee.game.block.entity.TileEntityBrewingStandCustom

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.gui
import chylex.hee.client.gui.base.GuiBaseChestContainer
import chylex.hee.game.block.entity.TileEntityLootChest
import chylex.hee.game.container.ContainerLootChest

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.gui
import chylex.hee.client.gui.base.GuiBaseChestContainer
import chylex.hee.game.container.ContainerPortalTokenStorage
import chylex.hee.system.forge.Side

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.gui
import chylex.hee.client.gui.base.GuiBaseChestContainer
import chylex.hee.game.container.ContainerShulkerBox
import chylex.hee.system.forge.Side

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.gui
import chylex.hee.client.gui.base.GuiBaseCustomInventory
import chylex.hee.game.container.ContainerTrinketPouch
import chylex.hee.game.container.base.ContainerBaseCustomInventory

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.gui.base
import chylex.hee.client.render.gl.GL
import chylex.hee.game.inventory.size
import chylex.hee.system.color.IntColor.Companion.RGB

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.gui.base
import chylex.hee.client.render.gl.GL
import chylex.hee.game.container.base.ContainerBaseCustomInventory
import chylex.hee.system.color.IntColor.Companion.RGB

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.model.block
import chylex.hee.client.model.beginBox
import chylex.hee.client.render.gl.translateZ
import chylex.hee.system.forge.Side

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.model.entity
import chylex.hee.client.model.FACE_FRONT
import chylex.hee.client.model.beginBox
import chylex.hee.client.model.retainFace

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.model.entity
import chylex.hee.client.MC
import chylex.hee.client.model.FACE_FRONT
import chylex.hee.client.model.beginBox
@@ -56,9 +57,9 @@ object ModelEntityMobBlobby : EntityModel<EntityMobBlobby>(){
override fun setLivingAnimations(entity: EntityMobBlobby, limbSwing: Float, limbSwingAmount: Float, partialTicks: Float) {
entity.color.let {
r = it.red / 255F
g = it.green / 255F
b = it.blue / 255F
r = it.redF
g = it.greenF
b = it.blueF
}
}

View File

@@ -1,11 +1,12 @@
package chylex.hee.client.model.entity
import chylex.hee.game.entity.living.EntityMobUndread
import chylex.hee.system.forge.Side
import chylex.hee.system.forge.Sided
import net.minecraft.client.renderer.entity.model.AbstractZombieModel
@Sided(Side.CLIENT)
class ModelEntityUndread private constructor(modelSize: Float, textureWidth: Int, textureHeight: Int) : AbstractZombieModel<EntityMobUndread>(modelSize, 0F, textureWidth, textureHeight){
class ModelEntityMobUndread private constructor(modelSize: Float, textureWidth: Int, textureHeight: Int) : AbstractZombieModel<EntityMobUndread>(modelSize, 0F, textureWidth, textureHeight) {
constructor(modelSize: Float, tallTexture: Boolean) : this(modelSize, 64, if (tallTexture) 32 else 64)
constructor() : this(0F, false)

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.model.entity
import chylex.hee.client.model.beginBox
import chylex.hee.game.entity.item.EntityTokenHolder
import chylex.hee.system.forge.Side

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.model.item
import chylex.hee.HEE
import chylex.hee.client.MC
import chylex.hee.system.facades.Resource

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render
import chylex.hee.HEE
import chylex.hee.client.MC
import chylex.hee.client.render.gl.DF_ONE_MINUS_SRC_ALPHA

View File

@@ -1,11 +1,14 @@
package chylex.hee.client.render
import chylex.hee.HEE
import chylex.hee.client.MC
import chylex.hee.client.render.gl.DF_ONE_MINUS_SRC_ALPHA
import chylex.hee.client.render.gl.DF_ZERO
import chylex.hee.client.render.gl.FOG_EXP2
import chylex.hee.client.render.gl.GL
import chylex.hee.client.render.gl.SF_ONE
import chylex.hee.client.render.gl.SF_SRC_ALPHA
import chylex.hee.client.render.territory.AbstractEnvironmentRenderer
import chylex.hee.game.entity.lookDirVec
import chylex.hee.game.entity.posVec
import chylex.hee.game.particle.ParticleVoid
@@ -15,6 +18,7 @@ import chylex.hee.game.particle.spawner.properties.IShape.Point
import chylex.hee.game.world.WorldProviderEndCustom
import chylex.hee.game.world.territory.TerritoryType
import chylex.hee.game.world.territory.TerritoryVoid
import chylex.hee.game.world.territory.properties.TerritoryEnvironment
import chylex.hee.system.Debug
import chylex.hee.system.color.IntColor
import chylex.hee.system.color.IntColor.Companion.RGB
@@ -23,10 +27,13 @@ import chylex.hee.system.forge.Side
import chylex.hee.system.forge.SubscribeAllEvents
import chylex.hee.system.forge.SubscribeEvent
import chylex.hee.system.math.LerpedFloat
import chylex.hee.system.math.Vec3
import chylex.hee.system.math.floorToInt
import chylex.hee.system.math.scale
import chylex.hee.system.migration.EntityPlayer
import net.minecraft.client.resources.I18n
import net.minecraft.world.dimension.DimensionType
import net.minecraftforge.client.event.EntityViewRenderEvent.RenderFogEvent
import net.minecraftforge.client.event.RenderGameOverlayEvent
import net.minecraftforge.common.MinecraftForge
import net.minecraftforge.event.TickEvent.ClientTickEvent
@@ -37,6 +44,17 @@ import kotlin.math.pow
@SubscribeAllEvents(Side.CLIENT, modid = HEE.ID)
object TerritoryRenderer {
@JvmStatic
val environment
get() = MC.player?.let { TerritoryType.fromX(it.posX.floorToInt()) }?.desc?.environment
@JvmStatic
val skyColor
get() = (environment?.let(TerritoryEnvironment::fogColor) ?: Vec3.ZERO).let {
// use fog color because vanilla blends fog into sky color based on chunk render distance
RGB((it.x * 255).floorToInt(), (it.y * 255).floorToInt(), (it.z * 255).floorToInt()).i
}
private var prevChunkX = Int.MAX_VALUE
private var prevTerritory: TerritoryType? = null
@@ -79,6 +97,25 @@ object TerritoryRenderer{
}
}
@SubscribeEvent(priority = EventPriority.LOWEST)
fun onFog(@Suppress("UNUSED_PARAMETER") e: RenderFogEvent) {
val player = MC.player?.takeIf { it.world.dimension.type == DimensionType.THE_END } ?: return
val territory = TerritoryType.fromPos(player)
if (territory == null || WorldProviderEndCustom.debugMode) {
GL.setFogMode(FOG_EXP2)
GL.setFogDensity(0F)
}
else {
val env = territory.desc.environment
val density = env.fogDensity * AbstractEnvironmentRenderer.currentFogDensityMp
val modifier = env.fogRenderDistanceModifier * AbstractEnvironmentRenderer.currentRenderDistanceMp
GL.setFogMode(FOG_EXP2)
GL.setFogDensity(density + modifier)
}
}
// Void handling
val VOID_FACTOR_VALUE

View File

@@ -1,8 +1,10 @@
package chylex.hee.client.render.block
import chylex.hee.client.MC
import chylex.hee.client.render.gl.DF_ONE
import chylex.hee.client.render.gl.DF_ONE_MINUS_SRC_ALPHA
import chylex.hee.client.render.gl.RenderStateBuilder
import chylex.hee.client.render.gl.RenderStateBuilder.Companion.FOG_BLACK
import chylex.hee.client.render.gl.RenderStateBuilder.Companion.FOG_ENABLED
import chylex.hee.client.render.gl.SF_SRC_ALPHA
import chylex.hee.game.block.BlockAbstractPortal
@@ -54,7 +56,7 @@ abstract class RenderTileAbstractPortal<T : TileEntityPortalInner, C : IPortalCo
private val RENDER_TYPE_LAYER = Array(16) {
with(RenderStateBuilder()) {
tex(TEX_PARTICLE_LAYER)
fog(FOG_ENABLED)
fog(FOG_BLACK)
blend(SF_SRC_ALPHA, DF_ONE)
buildType("hee:portal_layer_${it}", DefaultVertexFormats.POSITION_COLOR_TEX, GL11.GL_QUADS, bufferSize = 256)
}

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.block
import chylex.hee.game.block.entity.TileEntityDarkChest
import chylex.hee.init.ModAtlases
import chylex.hee.system.facades.Resource

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.block
import chylex.hee.HEE
import chylex.hee.game.block.BlockAbstractPortal
import chylex.hee.game.block.BlockAbstractPortal.IPortalController

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.block
import chylex.hee.HEE
import chylex.hee.client.render.gl.RenderStateBuilder
import chylex.hee.client.render.gl.RenderStateBuilder.Companion.ALPHA_CUTOUT

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.block
import chylex.hee.client.model.block.ModelBlockIgneousPlate
import chylex.hee.client.render.gl.RenderStateBuilder
import chylex.hee.client.render.gl.RenderStateBuilder.Companion.BLEND_NONE

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.block
import chylex.hee.HEE
import chylex.hee.client.MC
import chylex.hee.client.render.gl.RenderStateBuilder
@@ -34,6 +35,7 @@ import net.minecraftforge.client.model.ModelLoader
import net.minecraftforge.client.model.data.EmptyModelData
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus.MOD
import org.lwjgl.opengl.GL11
import kotlin.math.sqrt
@Sided(Side.CLIENT)
class RenderTileJarODust(dispatcher: TileEntityRendererDispatcher) : TileEntityRenderer<TileEntityJarODust>(dispatcher) {
@@ -53,8 +55,10 @@ class RenderTileJarODust(dispatcher: TileEntityRendererDispatcher) : TileEntityR
private val AABB = BlockJarODust.AABB
private const val EPSILON_Y = 0.025
private const val EPSILON_Y_BOTTOM = 0.02
private const val EPSILON_Y_TOP = 0.04
private const val EPSILON_XZ = 0.005
private const val FIRST_LAYER_HEIGHT = 0.0325
@SubscribeEvent
fun onTextureStitchPre(e: TextureStitchEvent.Pre) {
@@ -70,9 +74,10 @@ class RenderTileJarODust(dispatcher: TileEntityRendererDispatcher) : TileEntityR
}
}
private fun renderLayers(layers: DustLayers, matrix: MatrixStack, buffer: IRenderTypeBuffer, combinedLight: Int, combinedOverlay: Int, renderBottom: Boolean){
private fun renderLayers(layers: DustLayers, matrix: MatrixStack, buffer: IRenderTypeBuffer, combinedLight: Int, combinedOverlay: Int) {
val contents = layers.contents.takeUnless { it.isEmpty() } ?: return
val unit = AABB.let { it.maxY - it.minY - (EPSILON_Y * 2) } / layers.totalCapacity
val squish = 0.775F + (0.225F * sqrt(contents.sumBy { it.second.toInt() }.toDouble() / layers.totalCapacity))
val unit = AABB.let { it.maxY - it.minY - EPSILON_Y_BOTTOM - EPSILON_Y_TOP - FIRST_LAYER_HEIGHT } / layers.totalCapacity / squish
val builder = buffer.getBuffer(RENDER_TYPE_LAYERS)
val mat = matrix.last.matrix
@@ -95,12 +100,12 @@ class RenderTileJarODust(dispatcher: TileEntityRendererDispatcher) : TileEntityR
val (dustType, dustAmount) = info
val color = dustType.color
val height = dustAmount * unit
val height = (if (index == 0) FIRST_LAYER_HEIGHT else 0.0) + (dustAmount * unit)
val texMin = minU + ((0.01 + relY * TEX_MP) * texHalfSize).toFloat()
val texMax = minU + ((0.01 + (relY + height) * TEX_MP) * texHalfSize).toFloat()
val minY = (relY + AABB.minY + EPSILON_Y).toFloat()
val minY = (relY + AABB.minY + EPSILON_Y_BOTTOM).toFloat()
val maxY = (minY + height).toFloat()
val sideR = (color[0] / 1.125F).floorToInt().coerceAtLeast(0)
@@ -129,7 +134,7 @@ class RenderTileJarODust(dispatcher: TileEntityRendererDispatcher) : TileEntityR
pos(mat, minX, maxY, maxZ).color(sideR, sideG, sideB, 255).tex(texMax, minV).lightmap(combinedLight).overlay(combinedOverlay).endVertex()
}
if (index == 0 && renderBottom){
if (index == 0) {
val bottomR = color[0]
val bottomG = color[1]
val bottomB = color[2]
@@ -161,7 +166,7 @@ class RenderTileJarODust(dispatcher: TileEntityRendererDispatcher) : TileEntityR
}
override fun render(tile: TileEntityJarODust, partialTicks: Float, matrix: MatrixStack, buffer: IRenderTypeBuffer, combinedLight: Int, combinedOverlay: Int) {
renderLayers(tile.layers, matrix, buffer, combinedLight, combinedOverlay, renderBottom = false)
renderLayers(tile.layers, matrix, buffer, combinedLight, combinedOverlay)
}
@SubscribeAllEvents(Side.CLIENT, modid = HEE.ID, bus = MOD)
@@ -186,7 +191,7 @@ class RenderTileJarODust(dispatcher: TileEntityRendererDispatcher) : TileEntityR
if (nbt != null) {
layers.deserializeNBT(nbt)
renderLayers(layers, matrix, buffer, combinedLight, combinedOverlay, renderBottom = true)
renderLayers(layers, matrix, buffer, combinedLight, combinedOverlay)
}
MC.instance.blockRendererDispatcher.blockModelRenderer.renderModel(matrix.last, buffer.getBuffer(Atlases.getTranslucentCullBlockType()), null, MODEL, 1F, 1F, 1F, combinedLight, combinedOverlay, EmptyModelData.INSTANCE)

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.block
import chylex.hee.game.block.entity.TileEntityLootChest
import chylex.hee.init.ModAtlases
import chylex.hee.system.facades.Resource

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.block
import chylex.hee.client.MC
import chylex.hee.client.model.ModelHelper
import chylex.hee.client.render.gl.rotateX

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.block
import net.minecraft.client.renderer.entity.model.ShulkerModel
import net.minecraft.client.renderer.tileentity.ShulkerBoxTileEntityRenderer
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.block
import chylex.hee.client.MC
import chylex.hee.client.render.gl.rotateX
import chylex.hee.client.render.gl.rotateY

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.block
import chylex.hee.client.MC
import chylex.hee.client.model.ModelHelper
import chylex.hee.client.model.getQuads

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.block
import chylex.hee.client.MC
import chylex.hee.client.model.ModelHelper
import chylex.hee.client.render.gl.DF_ONE_MINUS_SRC_ALPHA

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.block
import chylex.hee.game.block.BlockAbstractPortal
import chylex.hee.game.block.BlockVoidPortalInner.Companion.TYPE
import chylex.hee.game.block.BlockVoidPortalInner.ITerritoryInstanceFactory

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.entity
import chylex.hee.client.model.entity.ModelEntityBossEnderEye
import chylex.hee.client.model.entity.ModelEntityBossEnderEye.SCALE
import chylex.hee.client.render.entity.layer.LayerEnderEyeLaser

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.entity
import chylex.hee.client.MC
import chylex.hee.system.forge.Side
import chylex.hee.system.forge.Sided

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.entity
import chylex.hee.client.MC
import chylex.hee.system.forge.Side
import chylex.hee.system.forge.Sided

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.entity
import chylex.hee.client.render.gl.DF_ONE_MINUS_SRC_ALPHA
import chylex.hee.client.render.gl.RenderStateBuilder
import chylex.hee.client.render.gl.RenderStateBuilder.Companion.CULL_DISABLED

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.entity
import chylex.hee.game.entity.living.EntityMobAbstractEnderman
import chylex.hee.system.forge.Side
import chylex.hee.system.forge.Sided

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.entity
import chylex.hee.client.MC
import chylex.hee.client.model.ModelHelper
import chylex.hee.client.model.entity.ModelEntityMobBlobby

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.entity
import chylex.hee.client.render.entity.layer.LayerSpiderlingEyes
import chylex.hee.client.render.gl.scale
import chylex.hee.game.entity.living.EntityMobSpiderling

View File

@@ -1,5 +1,6 @@
package chylex.hee.client.render.entity
import chylex.hee.client.model.entity.ModelEntityUndread
import chylex.hee.client.model.entity.ModelEntityMobUndread
import chylex.hee.game.entity.living.EntityMobUndread
import chylex.hee.system.facades.Resource
import chylex.hee.system.forge.Side
@@ -12,11 +13,11 @@ import net.minecraft.client.renderer.entity.model.AbstractZombieModel
import net.minecraft.util.ResourceLocation
@Sided(Side.CLIENT)
class RenderEntityMobUndread(manager: EntityRendererManager) : BipedRenderer<EntityMobUndread, AbstractZombieModel<EntityMobUndread>>(manager, ModelEntityUndread(), 0.5F){
class RenderEntityMobUndread(manager: EntityRendererManager) : BipedRenderer<EntityMobUndread, AbstractZombieModel<EntityMobUndread>>(manager, ModelEntityMobUndread(), 0.5F) {
private val texture = Resource.Custom("textures/entity/undread.png")
init {
addLayer(BipedArmorLayer(this, ModelEntityUndread(0.5125F, true), ModelEntityUndread(1F, true)))
addLayer(BipedArmorLayer(this, ModelEntityMobUndread(0.5125F, true), ModelEntityMobUndread(1F, true)))
}
override fun preRenderCallback(entity: EntityMobUndread, matrix: MatrixStack, partialTicks: Float) {

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.entity
import chylex.hee.system.facades.Resource
import chylex.hee.system.forge.Side
import chylex.hee.system.forge.Sided

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.entity
import chylex.hee.client.MC
import chylex.hee.client.render.gl.scale
import chylex.hee.game.entity.living.EntityMobVillagerDying

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.entity
import chylex.hee.system.forge.Side
import chylex.hee.system.forge.Sided
import net.minecraft.client.renderer.culling.ClippingHelperImpl

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.entity
import chylex.hee.client.MC
import chylex.hee.client.model.ModelHelper
import chylex.hee.client.render.gl.rotateY

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.entity
import chylex.hee.client.MC
import chylex.hee.system.forge.Side
import chylex.hee.system.forge.Sided

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.entity
import chylex.hee.game.entity.effect.EntityTerritoryLightningBolt
import chylex.hee.system.forge.Side
import chylex.hee.system.forge.Sided

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.entity
import chylex.hee.client.model.entity.ModelEntityTokenHolder
import chylex.hee.client.render.gl.rotateX
import chylex.hee.client.render.gl.rotateY

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.entity.layer
import chylex.hee.client.model.entity.ModelEntityBossEnderEye
import chylex.hee.client.render.gl.RenderStateBuilder
import chylex.hee.client.render.gl.RenderStateBuilder.Companion.CULL_DISABLED
@@ -52,28 +53,28 @@ class LayerEnderEyeLaser(entity: IEntityRenderer<EntityBossEnderEye, ModelEntity
builder.pos(mat, -hw, -hw, 0F).color().tex(0F, 0F).endVertex()
builder.pos(mat, -hw, -hw, -len).color().tex(0F, tex).endVertex()
builder.pos(mat, hw, -hw, -len).color().tex(1F, tex).endVertex()
builder.pos(mat, hw, -hw, 0F).color().tex(1F, 0F).endVertex()
builder.pos(mat, +hw, -hw, -len).color().tex(1F, tex).endVertex()
builder.pos(mat, +hw, -hw, 0F).color().tex(1F, 0F).endVertex()
builder.pos(mat, -hw, hw, 0F).color().tex(0F, 0F).endVertex()
builder.pos(mat, -hw, hw, -len).color().tex(0F, tex).endVertex()
builder.pos(mat, -hw, +hw, 0F).color().tex(0F, 0F).endVertex()
builder.pos(mat, -hw, +hw, -len).color().tex(0F, tex).endVertex()
builder.pos(mat, -hw, -hw, -len).color().tex(1F, tex).endVertex()
builder.pos(mat, -hw, -hw, 0F).color().tex(1F, 0F).endVertex()
builder.pos(mat, hw, -hw, 0F).color().tex(0F, 0F).endVertex()
builder.pos(mat, hw, -hw, -len).color().tex(0F, tex).endVertex()
builder.pos(mat, hw, hw, -len).color().tex(1F, tex).endVertex()
builder.pos(mat, hw, hw, 0F).color().tex(1F, 0F).endVertex()
builder.pos(mat, hw, +hw, -len).color().tex(1F, tex).endVertex()
builder.pos(mat, hw, +hw, 0F).color().tex(1F, 0F).endVertex()
builder.pos(mat, hw, hw, 0F).color().tex(0F, 0F).endVertex()
builder.pos(mat, hw, hw, -len).color().tex(0F, tex).endVertex()
builder.pos(mat, +hw, hw, 0F).color().tex(0F, 0F).endVertex()
builder.pos(mat, +hw, hw, -len).color().tex(0F, tex).endVertex()
builder.pos(mat, -hw, hw, -len).color().tex(1F, tex).endVertex()
builder.pos(mat, -hw, hw, 0F).color().tex(1F, 0F).endVertex()
builder.pos(mat, -hw, -hw, -len).color().tex(0F, 0F).endVertex()
builder.pos(mat, -hw, hw, -len).color().tex(0F, 0F).endVertex()
builder.pos(mat, hw, hw, -len).color().tex(0F, 0F).endVertex()
builder.pos(mat, hw, -hw, -len).color().tex(0F, 0F).endVertex()
builder.pos(mat, -hw, +hw, -len).color().tex(0F, 0F).endVertex()
builder.pos(mat, +hw, +hw, -len).color().tex(0F, 0F).endVertex()
builder.pos(mat, +hw, -hw, -len).color().tex(0F, 0F).endVertex()
matrix.pop()
}

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.entity.layer
import chylex.hee.client.render.entity.RenderEntityMobSpiderling
import chylex.hee.client.render.gl.scale
import chylex.hee.game.entity.living.EntityMobSpiderling

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.item
import chylex.hee.system.forge.Side
import chylex.hee.system.forge.Sided
import com.mojang.blaze3d.matrix.MatrixStack

View File

@@ -1,10 +1,12 @@
package chylex.hee.client.render.territory
import chylex.hee.client.MC
import chylex.hee.client.render.TerritoryRenderer
import chylex.hee.client.render.gl.GL
import chylex.hee.system.facades.Resource
import chylex.hee.system.forge.Side
import chylex.hee.system.forge.Sided
import chylex.hee.system.math.Vec3
import chylex.hee.system.math.remapRange
import com.mojang.blaze3d.matrix.MatrixStack
import net.minecraft.client.Minecraft
@@ -12,7 +14,6 @@ import net.minecraft.client.renderer.RenderHelper
import net.minecraft.client.renderer.Tessellator
import net.minecraft.client.renderer.vertex.DefaultVertexFormats
import net.minecraft.client.world.ClientWorld
import net.minecraft.util.math.Vec3d
import net.minecraftforge.client.SkyRenderHandler
import org.lwjgl.opengl.GL11.GL_QUADS
import kotlin.math.pow
@@ -32,7 +33,7 @@ abstract class AbstractEnvironmentRenderer : SkyRenderHandler{
get() = MC.settings.renderDistanceChunks.let { if (it > 12) 0F else (1F - (it / 16.5F)).pow((it - 1) * 0.25F) }
val DEFAULT_TEXTURE = Resource.Custom("textures/environment/white.png")
val DEFAULT_COLOR = Vec3d(1.0, 1.0, 1.0)
val DEFAULT_COLOR = Vec3.xyz(1.0)
const val DEFAULT_ALPHA = 1F
fun renderPlane(matrix: MatrixStack, y: Float, size: Float, rescale: Float) {

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.territory
import chylex.hee.system.forge.Side
import chylex.hee.system.forge.Sided
import com.mojang.blaze3d.matrix.MatrixStack

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.territory.components
import chylex.hee.client.MC
import chylex.hee.client.render.gl.DF_ONE_MINUS_SRC_ALPHA
import chylex.hee.client.render.gl.DF_ZERO
@@ -44,10 +45,10 @@ abstract class SkyCubeBase : AbstractEnvironmentRenderer(){
matrix.push()
when(side) {
1 -> matrix.rotateX( 90F)
1 -> matrix.rotateX(+90F)
2 -> matrix.rotateX(-90F)
3 -> matrix.rotateX(180F)
4 -> matrix.rotateZ( 90F)
4 -> matrix.rotateZ(+90F)
5 -> matrix.rotateZ(-90F)
}

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.territory.components
import net.minecraft.util.ResourceLocation
import net.minecraft.util.math.Vec3d
@@ -7,5 +8,5 @@ class SkyCubeStatic(
override val color: Vec3d = DEFAULT_COLOR,
override val alpha: Float = DEFAULT_ALPHA,
override val rescale: Float = DEFAULT_RESCALE,
override val distance: Float = DEFAULT_DISTANCE
override val distance: Float = DEFAULT_DISTANCE,
) : SkyCubeBase()

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.territory.components
import chylex.hee.client.render.gl.DF_ONE_MINUS_SRC_ALPHA
import chylex.hee.client.render.gl.GL
import chylex.hee.client.render.gl.SF_SRC_ALPHA

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.territory.components
import net.minecraft.util.ResourceLocation
import net.minecraft.util.math.Vec3d
@@ -7,7 +8,7 @@ class SkyDomeStatic(
override val color1: Vec3d = DEFAULT_COLOR,
override val color2: Vec3d = DEFAULT_COLOR,
override val alpha1: Float = DEFAULT_ALPHA,
override val alpha2: Float = DEFAULT_ALPHA
override val alpha2: Float = DEFAULT_ALPHA,
) : SkyDomeBase() {
constructor(texture: ResourceLocation = DEFAULT_TEXTURE, color: Vec3d = DEFAULT_COLOR, alpha: Float = DEFAULT_ALPHA) : this(texture, color, color, alpha, alpha)
constructor(texture: ResourceLocation = DEFAULT_TEXTURE, color1: Vec3d, color2: Vec3d, alpha: Float = DEFAULT_ALPHA) : this(texture, color1, color2, alpha, alpha)

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.territory.components
import chylex.hee.client.MC
import chylex.hee.client.render.gl.DF_ONE_MINUS_SRC_ALPHA
import chylex.hee.client.render.gl.DF_ZERO
@@ -20,7 +21,7 @@ class SkyPlaneTopFoggy(
override val alpha: Float = DEFAULT_ALPHA,
override val rescale: Float = DEFAULT_RESCALE,
override val distance: Float = DEFAULT_DISTANCE,
private val width: Float = distance
private val width: Float = distance,
) : SkyCubeBase() {
@Sided(Side.CLIENT)
override fun render(world: ClientWorld, matrix: MatrixStack, partialTicks: Float) {
@@ -31,6 +32,7 @@ class SkyPlaneTopFoggy(
GL.blendFunc(SF_SRC_ALPHA, DF_ONE_MINUS_SRC_ALPHA, SF_ONE, DF_ZERO)
GL.enableAlpha()
GL.alphaFunc(GL_GREATER, 0F)
GL.enableFog()
GL.color(color, alpha * currentSkyAlpha)
GL.bindTexture(texture)

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.territory.components
import chylex.hee.client.render.gl.DF_ONE
import chylex.hee.client.render.gl.DF_ZERO
import chylex.hee.client.render.gl.GL

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.render.territory.components
import net.minecraft.util.ResourceLocation
import net.minecraft.util.math.Vec3d
@@ -7,5 +8,5 @@ class SunStatic(
override val color: Vec3d = DEFAULT_COLOR,
override val alpha: Float = DEFAULT_ALPHA,
override val size: Float,
override val distance: Float = DEFAULT_DISTANCE
override val distance: Float = DEFAULT_DISTANCE,
) : SunBase()

View File

@@ -1,4 +1,5 @@
package chylex.hee.client.sound
import chylex.hee.game.entity.projectile.EntityProjectileSpatialDash
import chylex.hee.system.migration.Sounds
import chylex.hee.system.random.nextFloat

View File

@@ -1,4 +1,5 @@
package chylex.hee.commands
import chylex.hee.HEE
import chylex.hee.client.MC
import chylex.hee.commands.client.CommandClientHelp

View File

@@ -1,4 +1,5 @@
package chylex.hee.commands.client
import chylex.hee.commands.ClientCommandHandler
import chylex.hee.commands.IClientCommand
import chylex.hee.commands.server.CommandServerHelp

View File

@@ -1,4 +1,5 @@
package chylex.hee.commands.client
import chylex.hee.commands.IClientCommand
import chylex.hee.commands.server.CommandDebugStructure
import net.minecraft.command.CommandSource

View File

@@ -1,4 +1,5 @@
package chylex.hee.commands.client
import chylex.hee.commands.IClientCommand
import chylex.hee.game.world.WorldProviderEndCustom
import chylex.hee.init.ModBlocks

View File

@@ -1,4 +1,5 @@
package chylex.hee.commands.server
import chylex.hee.commands.ICommand
import chylex.hee.commands.executes
import chylex.hee.commands.getInt

View File

@@ -1,4 +1,5 @@
package chylex.hee.commands.server
import chylex.hee.commands.ICommand
import chylex.hee.commands.arguments.ValidatedStringArgument.Companion.validatedString
import chylex.hee.commands.executes

View File

@@ -1,4 +1,5 @@
package chylex.hee.commands.server
import chylex.hee.HEE
import chylex.hee.commands.ICommand
import chylex.hee.commands.executes

View File

@@ -1,4 +1,5 @@
package chylex.hee.commands.server
import chylex.hee.commands.CommandExecutionFunction
import chylex.hee.commands.ICommand
import chylex.hee.commands.returning

View File

@@ -1,4 +1,5 @@
package chylex.hee.commands.server
import chylex.hee.commands.ICommand
import chylex.hee.commands.arguments.EnumArgument.Companion.enum
import chylex.hee.commands.executes

View File

@@ -1,4 +1,5 @@
package chylex.hee.commands.server
import chylex.hee.commands.CommandExecutionFunctionCtx
import chylex.hee.commands.ICommand
import chylex.hee.commands.executes

View File

@@ -1,4 +1,5 @@
package chylex.hee.commands.server
import chylex.hee.commands.ICommand
import chylex.hee.commands.arguments.EnumArgument.Companion.enum
import chylex.hee.commands.exception

View File

@@ -1,4 +1,5 @@
package chylex.hee.commands.server
import chylex.hee.commands.ICommand
import chylex.hee.commands.exception
import chylex.hee.commands.getPos

View File

@@ -1,4 +1,5 @@
package chylex.hee.commands.server
import chylex.hee.commands.CommandExecutionFunctionCtx
import chylex.hee.commands.ICommand
import chylex.hee.commands.arguments.EnumArgument.Companion.enum

View File

@@ -1,4 +1,5 @@
package chylex.hee.game.block
import chylex.hee.HEE
import chylex.hee.game.block.properties.BlockBuilder
import chylex.hee.game.inventory.isNotEmpty

View File

@@ -1,4 +1,5 @@
package chylex.hee.game.block
import chylex.hee.game.block.entity.base.TileEntityBaseChest
import chylex.hee.game.block.properties.BlockBuilder
import chylex.hee.game.entity.living.ai.AIOcelotSitOverride.IOcelotCanSitOn

View File

@@ -1,4 +1,5 @@
package chylex.hee.game.block
import chylex.hee.game.block.fluid.FlowingFluid5
import chylex.hee.game.block.fluid.FluidBase
import chylex.hee.game.block.logic.BlockCollisionLimiter
@@ -26,7 +27,7 @@ import net.minecraft.world.World
abstract class BlockAbstractGoo(
private val fluid: FluidBase,
material: Material
material: Material,
) : BlockFlowingFluid(supply(fluid.still), Properties.create(material, fluid.mapColor).hardnessAndResistance(fluid.resistance).doesNotBlockMovement().noDrops()) {
protected companion object {
private const val LAST_TIME_TAG = "Time"

View File

@@ -1,4 +1,5 @@
package chylex.hee.game.block
import chylex.hee.game.block.properties.BlockBuilder
import chylex.hee.game.world.allInBox
import chylex.hee.game.world.allInBoxMutable

View File

@@ -1,4 +1,5 @@
package chylex.hee.game.block
import chylex.hee.client.render.block.IBlockLayerCutout
import chylex.hee.game.block.properties.BlockBuilder
import chylex.hee.system.forge.Side

View File

@@ -1,4 +1,5 @@
package chylex.hee.game.block
import chylex.hee.game.block.entity.base.TileEntityBaseTable
import chylex.hee.game.block.properties.BlockBuilder
import chylex.hee.game.world.getTile

View File

@@ -1,8 +1,10 @@
package chylex.hee.game.block
import chylex.hee.client.render.block.IBlockLayerCutout
import chylex.hee.game.block.properties.BlockBuilder
import chylex.hee.game.world.breakBlock
import chylex.hee.system.forge.SubscribeEvent
import chylex.hee.system.math.Vec3
import chylex.hee.system.migration.BlockWeb
import chylex.hee.system.migration.EntityItem
import chylex.hee.system.migration.EntityLivingBase
@@ -14,7 +16,6 @@ import chylex.hee.system.migration.ItemSword
import net.minecraft.block.BlockState
import net.minecraft.entity.Entity
import net.minecraft.util.math.BlockPos
import net.minecraft.util.math.Vec3d
import net.minecraft.util.math.shapes.ISelectionContext
import net.minecraft.util.math.shapes.VoxelShape
import net.minecraft.util.math.shapes.VoxelShapes
@@ -52,7 +53,7 @@ class BlockAncientCobweb(builder: BlockBuilder) : BlockWeb(builder.p), IBlockLay
override fun onEntityCollision(state: BlockState, world: World, pos: BlockPos, entity: Entity) {
if (entity is EntityItem) {
entity.setMotionMultiplier(state, Vec3d(0.6, 0.6, 0.6))
entity.setMotionMultiplier(state, Vec3.xyz(0.6))
}
else if (!world.isRemote) {
val canBreak = when(entity) {

View File

@@ -1,4 +1,5 @@
package chylex.hee.game.block
import chylex.hee.client.render.block.IBlockLayerCutout
import chylex.hee.game.block.entity.TileEntityBrewingStandCustom
import chylex.hee.game.block.properties.BlockBuilder

View File

@@ -1,4 +1,5 @@
package chylex.hee.game.block
import chylex.hee.game.block.properties.BlockBuilder
import net.minecraft.item.ItemStack
import net.minecraft.item.Items

View File

@@ -1,4 +1,5 @@
package chylex.hee.game.block
import chylex.hee.game.block.properties.BlockBuilder
import chylex.hee.game.potion.brewing.PotionItems
import chylex.hee.system.migration.PotionTypes

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