Skip to content

Commit 9e1ce7b

Browse files
[datagen] 2.0.5
1 parent 41abf7f commit 9e1ce7b

File tree

11 files changed

+249
-28
lines changed

11 files changed

+249
-28
lines changed

Diff for: CHANGELOG.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
### Create: Enchantment Industry 2.0.4
1+
### Create: Enchantment Industry 2.0.5
22

33
Requires Create: Dragons Plus 1.3.1, which contains an important bugfix
44

55
#### Update
6-
* Improve ponder to explain Super Enchanting Material more clearly
6+
* Add Russian Translation (by @Korben)
7+
* Update Japanese Translation (by @YukkuriOfuton)
8+
* Add config to Crushing Wheel killed entities drop exp
79

810
#### Fix
9-
* Fix Spouting liquid experience onto mending tools duplicates the tool
10-
* Fix Mechanical Grindstone does not drop processing item when be destoryed
11+
* Fix render crash issue with Ayame PaperDoll
12+
* Fix render crash issue with cobblemon
13+
* Fix Crushing Wheel killed entities do not drop exp

Diff for: build.gradle

+5
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ dependencies {
104104

105105
compileOnly("top.theillusivec4.curios:curios-neoforge:${curios_version}+${curios_minecraft_version}:api")
106106
localRuntime("top.theillusivec4.curios:curios-neoforge:${curios_version}+${curios_minecraft_version}")
107+
108+
// Check render crash issue
109+
// runtimeOnly("curse.maven:ayame-paperdoll-1133652:6089792")
110+
// runtimeOnly("curse.maven:cobblemon-687131:6125026")
111+
// runtimeOnly("curse.maven:kotlin-for-forge-351264:5978393")
107112
}
108113

109114
var generateModMetadata = tasks.register("generateModMetadata", ProcessResources) {

Diff for: gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ mod_id = create_enchantment_industry
1717
mod_artifact_id = create-enchantment-industry
1818
mod_name = Create: Enchantment Industry
1919
mod_license = LGPL-3.0-or-later
20-
mod_version = 2.0.4
20+
mod_version = 2.0.5
2121
mod_group_id = plus.dragons.createenchantmentindustry
2222
mod_authors = DragonsPlus
2323
mod_description = Automatic Enchanting with Create.

Diff for: src/generated/resources/assets/create_enchantment_industry/lang/ru_ru.json

+184
Large diffs are not rendered by default.

Diff for: src/main/java/plus/dragons/createenchantmentindustry/client/model/CEIPartialModels.java

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
package plus.dragons.createenchantmentindustry.client.model;
2020

21-
import com.simibubi.create.Create;
2221
import dev.engine_room.flywheel.lib.model.baked.PartialModel;
2322
import plus.dragons.createenchantmentindustry.common.CEICommon;
2423

Diff for: src/main/java/plus/dragons/createenchantmentindustry/common/fluids/experience/BlazeExperienceBlockEntity.java

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import java.util.List;
2828
import java.util.Optional;
2929
import java.util.function.Consumer;
30-
import net.createmod.catnip.animation.LerpedFloat;
3130
import net.createmod.catnip.lang.LangBuilder;
3231
import net.minecraft.ChatFormatting;
3332
import net.minecraft.core.BlockPos;

Diff for: src/main/java/plus/dragons/createenchantmentindustry/common/processing/enchanter/BlazeEnchanterBlockEntity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ public void rotate(LevelAccessor level, BlockPos pos, BlockState state, PoseStac
329329

330330
@Override
331331
public boolean testHit(LevelAccessor level, BlockPos pos, BlockState state, Vec3 localHit) {
332-
if(!isSideActive(state, getSide())) return false;
332+
if (!isSideActive(state, getSide())) return false;
333333
Vec3 location = VecHelper.voxelSpace(8, 8, 13.5);
334334
location = VecHelper.rotateCentered(location, AngleHelper.horizontalAngle(getSide()), Direction.Axis.Y);
335335
location = VecHelper.rotateCentered(location, AngleHelper.verticalAngle(getSide()), Direction.Axis.X);

Diff for: src/main/java/plus/dragons/createenchantmentindustry/common/processing/enchanter/EnchanterBehaviorTemplateItemRenderer.java

+21-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
* Copyright (C) 2025 DragonsPlus
3+
* SPDX-License-Identifier: LGPL-3.0-or-later
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*/
18+
119
package plus.dragons.createenchantmentindustry.common.processing.enchanter;
220

321
import com.mojang.blaze3d.vertex.PoseStack;
@@ -18,8 +36,7 @@
1836

1937
public class EnchanterBehaviorTemplateItemRenderer {
2038
public static void renderOnBlockEntity(SmartBlockEntity be, float partialTicks, PoseStack ms,
21-
MultiBufferSource buffer, int light, int overlay) {
22-
39+
MultiBufferSource buffer, int light, int overlay) {
2340
if (be == null || be.isRemoved())
2441
return;
2542

@@ -40,9 +57,9 @@ public static void renderOnBlockEntity(SmartBlockEntity be, float partialTicks,
4057
if (target == null || !(target instanceof BlockHitResult result))
4158
return;
4259
Vec3 localHit = target.getLocation().subtract(Vec3.atLowerCornerOf(be.getBlockPos()));
43-
boolean highlight = behaviour.templateItemTransform.testHit(level,blockPos,be.getBlockState(),localHit);
60+
boolean highlight = behaviour.templateItemTransform.testHit(level, blockPos, be.getBlockState(), localHit);
4461
behaviour.templateItemTransform.fromSide(result.getDirection());
45-
if(!highlight) return;
62+
if (!highlight) return;
4663

4764
ValueBoxTransform slotPositioning = behaviour.getTemplateItemSlotPositioning();
4865
BlockState blockState = be.getBlockState();

Diff for: src/main/java/plus/dragons/createenchantmentindustry/common/processing/enchanter/EnchanterBehaviour.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@
2929
import com.simibubi.create.foundation.blockEntity.behaviour.ValueSettingsFormatter;
3030
import com.simibubi.create.foundation.blockEntity.behaviour.scrollValue.ScrollValueBehaviour;
3131
import com.simibubi.create.foundation.utility.CreateLang;
32-
import java.util.List;
33-
3432
import com.simibubi.create.infrastructure.config.AllConfigs;
33+
import java.util.List;
3534
import net.createmod.catnip.lang.LangBuilder;
3635
import net.minecraft.ChatFormatting;
3736
import net.minecraft.core.Direction;

Diff for: src/main/java/plus/dragons/createenchantmentindustry/config/CEIKineticsConfig.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public class CEIKineticsConfig extends ConfigBase {
2929
public final ConfigBool deployerMendItem = b(true, "deployerMendItem", Comments.deployerMendItem);
3030
public final ConfigBool deployerSweepAttack = b(true, "deployerSweepAttack", Comments.deployerSweepAttack);
3131
public final ConfigBool crushingWheelKillDropXp = b(true, "crushingWheelKillDropXp", Comments.crushingWheelKillDropXp);
32-
public final ConfigFloat crushingWheelKillDropXpRate = f(0.3f,0,1, "crushingWheelKillDropXpRate", Comments.crushingWheelKillDropXpRate);
33-
public final ConfigFloat crushingWheelKillDropXpScale = f(0.34f,0,1, "crushingWheelKillDropXpScale", Comments.crushingWheelKillDropXpScale);
32+
public final ConfigFloat crushingWheelKillDropXpRate = f(0.3f, 0, 1, "crushingWheelKillDropXpRate", Comments.crushingWheelKillDropXpRate);
33+
public final ConfigFloat crushingWheelKillDropXpScale = f(0.34f, 0, 1, "crushingWheelKillDropXpScale", Comments.crushingWheelKillDropXpScale);
3434
public final CEIStressConfig stressValues = nested(0, CEIStressConfig::new, Comments.stress);
3535

3636
@Override

Diff for: src/main/java/plus/dragons/createenchantmentindustry/mixin/CrushingWheelControllerBlockEntityMixin.java

+27-12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
* Copyright (C) 2025 DragonsPlus
3+
* SPDX-License-Identifier: LGPL-3.0-or-later
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*/
18+
119
package plus.dragons.createenchantmentindustry.mixin;
220

321
import com.simibubi.create.AllItems;
@@ -21,20 +39,18 @@
2139

2240
@Mixin(CrushingWheelControllerBlockEntity.class)
2341
public class CrushingWheelControllerBlockEntityMixin {
24-
2542
@Shadow(remap = false)
2643
public Entity processingEntity;
2744

28-
@Inject(method = "tick",
29-
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/Entity;setPos(DDD)V", shift = At.Shift.AFTER))
45+
@Inject(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/Entity;setPos(DDD)V", shift = At.Shift.AFTER))
3046
private void injected(CallbackInfo ci) {
31-
if(CEIConfig.kinetics().crushingWheelKillDropXp.get() && !processingEntity.isAlive() && processingEntity instanceof LivingEntity livingEntity){
32-
if(!(processingEntity.level() instanceof ServerLevel serverLevel)) return;
33-
int reward = Math.max((int) Math.floor(livingEntity.getExperienceReward(serverLevel,processingEntity) * CEIConfig.kinetics().crushingWheelKillDropXpScale.get()),1);
34-
if(reward >= 1000 || Math.random( ) < CEIConfig.kinetics().crushingWheelKillDropXpRate.get()){
35-
int count = reward/3 + ((Math.random()<(reward%3/3f))? 1: 0);
36-
if(count!=0){
37-
var self = (CrushingWheelControllerBlockEntity)(Object)this;
47+
if (CEIConfig.kinetics().crushingWheelKillDropXp.get() && !processingEntity.isAlive() && processingEntity instanceof LivingEntity livingEntity) {
48+
if (!(processingEntity.level() instanceof ServerLevel serverLevel)) return;
49+
int reward = Math.max((int) Math.floor(livingEntity.getExperienceReward(serverLevel, processingEntity) * CEIConfig.kinetics().crushingWheelKillDropXpScale.get()), 1);
50+
if (reward >= 1000 || Math.random() < CEIConfig.kinetics().crushingWheelKillDropXpRate.get()) {
51+
int count = reward / 3 + ((Math.random() < (reward % 3 / 3f)) ? 1 : 0);
52+
if (count != 0) {
53+
var self = (CrushingWheelControllerBlockEntity) (Object) this;
3854
Vec3 centerPos = VecHelper.getCenterOf(self.getBlockPos());
3955
Direction facing = self.getBlockState().getValue(CrushingWheelControllerBlock.FACING);
4056
int offset = facing.getAxisDirection()
@@ -44,14 +60,13 @@ private void injected(CallbackInfo ci) {
4460
(facing.getAxis() == Direction.Axis.Z ? 0.25D : 0.0D) * offset);
4561
Vec3 outPos = centerPos.add((facing.getAxis() == Direction.Axis.X ? .55f * offset : 0f),
4662
(facing.getAxis() == Direction.Axis.Y ? .55f * offset : 0f), (facing.getAxis() == Direction.Axis.Z ? .55f * offset : 0f));
47-
var expItem = new ItemEntity(processingEntity.level(),outPos.x(),outPos.y(),outPos.z(), new ItemStack(AllItems.EXP_NUGGET.get(),count));
63+
var expItem = new ItemEntity(processingEntity.level(), outPos.x(), outPos.y(), outPos.z(), new ItemStack(AllItems.EXP_NUGGET.get(), count));
4864
expItem.setDeltaMovement(outSpeed);
4965
expItem.getPersistentData()
5066
.put("BypassCrushingWheel", NbtUtils.writeBlockPos(self.getBlockPos()));
5167
processingEntity.level().addFreshEntity(expItem);
5268
}
5369
}
5470
}
55-
5671
}
5772
}

0 commit comments

Comments
 (0)