Skip to content

Commit

Permalink
Port to Minecraft 1.15.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mrapplexz committed Apr 16, 2020
1 parent b70f3df commit 3c52380
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 31 deletions.
4 changes: 2 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CraftDumper [![CurseForge Downloads](http://cf.way2muchnoise.eu/full_354281_downloads.svg)](https://www.curseforge.com/minecraft/mc-mods/craftdumper)
[![Discord](https://img.shields.io/discord/136085738151346176?color=7289DA&logo=discord&logoColor=white)](https://discord.gg/tkDUmpQ)
[![Build Status](https://ci.pearx.net/job/pearxteam/job/craftdumper/job/1.14-master/badge/icon?subject=1.14-master)](https://ci.pearx.net/job/pearxteam/job/craftdumper/job/1.14-master/)
[![Build Status](https://ci.pearx.net/job/pearxteam/job/craftdumper/job/1.14-develop/badge/icon?subject=1.14-develop)](https://ci.pearx.net/job/pearxteam/job/craftdumper/job/1.14-develop/)
[![Build Status](https://ci.pearx.net/job/pearxteam/job/craftdumper/job/1.15-master/badge/icon?subject=1.15-master)](https://ci.pearx.net/job/pearxteam/job/craftdumper/job/1.15-master/)
[![Build Status](https://ci.pearx.net/job/pearxteam/job/craftdumper/job/1.15-develop/badge/icon?subject=1.15-develop)](https://ci.pearx.net/job/pearxteam/job/craftdumper/job/1.15-develop/)

A Minecraft Forge mod that allows you to dump game information such as blocks, items and many more.

Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ val modAcceptedMcVersions: String by project
val forgeVersion: String by project
val minecraftVersion: String by project
val mcpMappingsChannel: String by project
val mcpMappingsMinecraftVersion: String by project
val mcpMappingsVersion: String by project

val jeiVersion: String by project
Expand Down Expand Up @@ -64,7 +65,7 @@ dependencies {
}

configure<MinecraftExtension> {
mappings(mcpMappingsChannel, "$mcpMappingsVersion-$minecraftVersion")
mappings(mcpMappingsChannel, "$mcpMappingsVersion-$mcpMappingsMinecraftVersion")
accessTransformer(file("src/main/resources/META-INF/accesstransformer.cfg"))

runs {
Expand Down
27 changes: 14 additions & 13 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
org.gradle.jvmargs=-Xmx3G

modVersion=2.0.0
modChangelog=Port to 1.14.4
modVersion=3.0.0
modChangelog=Port to 1.15.2
modDescription=A Minecraft Forge mod that can create dumps of various game stuff, such as blocks, items, entities and many more.
modAcceptedMcVersions=[1.14]
modAcceptedMcVersions=[1.15]

curseGradleVersion=1.4.0
curseMavenVersion=2.1.1
curseforgeProjectId=354281
curseforgeReleaseType=beta

githubReleaseVersion=2.2.12
githubReleaseBranch=1.14-master
githubReleaseBranch=1.15-master

forgeGradleVersion=3.0.168
forgeVersion=28.2.3
minecraftVersion=1.14.4
mcpMappingsChannel=stable
mcpMappingsVersion=58
forgeGradleVersion=3.0.169
forgeVersion=31.1.46
minecraftVersion=1.15.2
mcpMappingsChannel=snapshot
mcpMappingsMinecraftVersion=1.15.1
mcpMappingsVersion=20200416

jeiVersion=6.0.0.27
jeiMcVersion=1.14.4
projectEFileId=2855942
kottleFileId=2838583
jeiVersion=6.0.0.3
jeiMcVersion=1.15.2
projectEFileId=2898245
kottleFileId=2895068

kotlinVersion=1.3.61
jdkVersion=8
7 changes: 4 additions & 3 deletions src/main/kotlin/net/pearx/craftdumper/client/DumperToast.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package net.pearx.craftdumper.client

import com.mojang.blaze3d.platform.GlStateManager.color3f
import com.mojang.blaze3d.platform.GlStateManager.enableBlend
import com.mojang.blaze3d.systems.RenderSystem.color3f
import com.mojang.blaze3d.systems.RenderSystem.enableBlend
import net.minecraft.client.gui.AbstractGui
import net.minecraft.client.gui.toasts.IToast
import net.minecraft.client.gui.toasts.IToast.TEXTURE_TOASTS
import net.minecraft.client.gui.toasts.ToastGui
import net.minecraft.util.math.MathHelper.clampedLerp
import net.minecraft.util.text.ITextComponent
Expand All @@ -20,7 +21,7 @@ class DumperToast(private val token: Int, @Volatile var progress: Float = 0F, va
with(toastGui) {
with(minecraft.textureManager) {
with(minecraft.fontRenderer) {
bindTexture(IToast.TEXTURE_TOASTS)
bindTexture(TEXTURE_TOASTS)
color3f(1.0f, 1.0f, 1.0f)
toastGui.blit(0, 0, 0, 96, 160, 32)
enableBlend()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ val DumperBiomes = dumperTable {
"Under Block",
"River Biome",
"Spawning Chance",
*enumValues<EntityClassification>().mapArray { classification -> "${classification.func_220363_a().capitalize()} Spawn List: Entity*(Min Group-Max Group):Weight" }
*enumValues<EntityClassification>().mapArray { classification -> "${classification.getName().capitalize()} Spawn List: Entity*(Min Group-Max Group):Weight" }
)
amounts { +ForgeRegistries.BIOMES.keys }
count { ForgeRegistries.BIOMES.count() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ val DumperEntities = dumperTable {
add { registryName.toString() }
add { name.unformattedComponentText }
add { create(defaultWorld)?.let { it::class.java.name } ?: "<unknown>" }
add { classification.func_220363_a() }
add { classification.getName() }
add { isSerializable.toPlusMinusString() }
add { isSummonable.toPlusMinusString() }
add { isImmuneToFire.toPlusMinusString() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ val DumperFluids = dumperTable {
with(attributes) {
add { getDisplayName(stack).unformattedComponentText }
add { getTranslationKey(stack) }
add { getStill(stack)?.toTexturesPath().orEmpty() }
add { getFlowing(stack)?.toTexturesPath().orEmpty() }
add { getStillTexture(stack)?.toTexturesPath().orEmpty() }
add { getFlowingTexture(stack)?.toTexturesPath().orEmpty() }
add { overlayTexture?.toTexturesPath().orEmpty() }
add { getFillSound(stack)?.registryName?.toString().orEmpty() }
add { getEmptySound(stack)?.registryName?.toString().orEmpty() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ val DumperModels = dumperTableClient {
with(model) {
val quads = getQuads(null, null, Random(0), EmptyModelData.INSTANCE)
add {
getParticleTexture(EmptyModelData.INSTANCE)?.iconName?.toTexturesPath().orEmpty()
getParticleTexture(EmptyModelData.INSTANCE)?.name?.toTexturesPath().orEmpty()
}
add {
val textures = mutableListOf<TextureAtlasSprite>()
for (quad in quads) {
if (quad.sprite !in textures)
textures.add(quad.sprite)
if (quad.func_187508_a() !in textures)
textures.add(quad.func_187508_a())
}
textures.joinToString(separator = System.lineSeparator()) { it.iconName.toTexturesPath() }
textures.joinToString(separator = System.lineSeparator()) { it.name.toTexturesPath() }
}
add { quads.size.toString() }
add { this::class.java.name }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ val DumperVillagerProfessions = dumperTable {

val DumperVillagerPointsOfInterest = dumperTable {
registryName = craftdumper("villager_points_of_interest")
header = listOf("ID", "Name", "BlockStates", "Max Tickets", "Work Sound", "Valid Range")
header = listOf("ID", "Name", "BlockStates", "Max Tickets", /*"Work Sound", */"Valid Range")
amounts { +ForgeRegistries.POI_TYPES.keys }
count { ForgeRegistries.POI_TYPES.count() }
table {
Expand All @@ -43,7 +43,7 @@ val DumperVillagerPointsOfInterest = dumperTable {
add { toString() }
add {
val result = mutableListOf<String>()
val states = field_221075_w.toMutableSet()
val states = blockStates.toMutableSet()

while(states.isNotEmpty()) {
val first = states.first()
Expand All @@ -60,7 +60,7 @@ val DumperVillagerPointsOfInterest = dumperTable {
result.joinToString(System.lineSeparator())
}
add { maxFreeTickets.toString() }
add { workSound?.registryName?.toString().orEmpty() }
// add { workSound?.registryName?.toString().orEmpty() }
add { func_225478_d().toString() }
}
}
Expand Down Expand Up @@ -116,7 +116,7 @@ val DumperVillagerSchedules = dumperTable {
for((activity, schedule) in field_221387_e) {
for(time in schedule.field_221396_a) {
if(time.func_221389_b() > 0)
sched[time.func_221388_a()] = activity
sched[time.duration] = activity
}
}
sched.entries.joinToString(System.lineSeparator()) { (key, value) -> "$key - ${value.registryName}" }
Expand Down

0 comments on commit 3c52380

Please sign in to comment.