mirror of
https://github.com/chylex/Hardcore-Ender-Expansion-2.git
synced 2025-11-19 08:22:35 +01:00
Compare commits
28 Commits
1.16
...
components
| Author | SHA1 | Date | |
|---|---|---|---|
| b64005357e | |||
| 3279dde625 | |||
| a9df51e315 | |||
| 322c005648 | |||
| 5211731e62 | |||
| 08d2fcb19c | |||
| e9077c680f | |||
| 276df76979 | |||
| 14788dd9ad | |||
| 5b69abf29e | |||
| dd6f4fa4d1 | |||
| 414b11aa0d | |||
| 14fbcac4e0 | |||
| 3e0aedc039 | |||
| 20c21f9afa | |||
| f4fac58b32 | |||
| f21a4fbf3f | |||
| c9ad94bcb4 | |||
| 1a11754bad | |||
| 421cadb545 | |||
| 596042b255 | |||
| f4bfd0f8e3 | |||
| 373087e33c | |||
| a46524e518 | |||
| ecd48ec345 | |||
| 8c21bcad67 | |||
| 7b54a8885a | |||
| e587f212eb |
2
.idea/gradle.xml
generated
2
.idea/gradle.xml
generated
@@ -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
1
.idea/misc.xml
generated
@@ -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>
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
# Hardcore Ender Expansion 2
|
||||
|
||||
Work in progress. PRs will not be accepted before release.
|
||||
|
||||
12
build.gradle
12
build.gradle
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package chylex.hee.datagen
|
||||
|
||||
import chylex.hee.HEE
|
||||
import chylex.hee.datagen.client.BlockItemModels
|
||||
import chylex.hee.datagen.client.BlockModels
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package chylex.hee.datagen
|
||||
|
||||
import chylex.hee.HEE
|
||||
import chylex.hee.system.facades.Resource
|
||||
import net.minecraft.block.Block
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package chylex.hee.datagen.server
|
||||
|
||||
import chylex.hee.init.ModItems
|
||||
import net.minecraft.data.DataGenerator
|
||||
import net.minecraft.data.ItemTagsProvider
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package chylex.hee.datagen.server.util
|
||||
|
||||
import net.minecraft.tags.Tag
|
||||
|
||||
fun <T> Tag.Builder<T>.add(items: List<T>) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package chylex.hee.client
|
||||
|
||||
import chylex.hee.HEE
|
||||
import chylex.hee.system.facades.Resource
|
||||
import chylex.hee.system.migration.supply
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package chylex.hee.commands
|
||||
|
||||
import chylex.hee.HEE
|
||||
import chylex.hee.client.MC
|
||||
import chylex.hee.commands.client.CommandClientHelp
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package chylex.hee.commands.server
|
||||
|
||||
import chylex.hee.commands.ICommand
|
||||
import chylex.hee.commands.executes
|
||||
import chylex.hee.commands.getInt
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package chylex.hee.commands.server
|
||||
|
||||
import chylex.hee.HEE
|
||||
import chylex.hee.commands.ICommand
|
||||
import chylex.hee.commands.executes
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package chylex.hee.commands.server
|
||||
|
||||
import chylex.hee.commands.CommandExecutionFunction
|
||||
import chylex.hee.commands.ICommand
|
||||
import chylex.hee.commands.returning
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package chylex.hee.commands.server
|
||||
|
||||
import chylex.hee.commands.CommandExecutionFunctionCtx
|
||||
import chylex.hee.commands.ICommand
|
||||
import chylex.hee.commands.executes
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package chylex.hee.commands.server
|
||||
|
||||
import chylex.hee.commands.ICommand
|
||||
import chylex.hee.commands.exception
|
||||
import chylex.hee.commands.getPos
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user