Skip to content

Commit 03346b8

Browse files
committed
merge commits from catroom's bouncedpad branch. so, i believe it will works
2 parents 6bdb1ac + 2902a8a commit 03346b8

55 files changed

Lines changed: 1301 additions & 675 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/BuildTest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ jobs:
9494
with:
9595
name: installer-jar-${{ env.CLEANROOM_VERSION }}
9696
path: projects/cleanroom/build/libs/*-installer.jar
97+
if-no-files-found: error
9798

9899
# - name: Upload MMC pack zip
99100
# uses: actions/upload-artifact@v4.6.2

FIXED_UPSTREAM_ISSUES.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Fixed upstream issues
2+
3+
### Modpacks
4+
5+
- Cannot launch MC Eternal[(CatServer#904)](https://github.com/Luohuayu/CatServer/issues/904)
6+
7+
### Forge-Bukkit
8+
9+
- Some mod explosions cannot be handled by Bukkit plugins(e.g. Tinkers' Construct EFLN)
10+
11+
## More
12+
13+
- It is recommended to install [HybridFix](https://github.com/HaHaWTH/HybridFix), which aims to improve Forge+Bukkit compatibility and fix behaviour inconsistencies.

README.md

Lines changed: 11 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
1-
# Cleanroom Minecraft
1+
<img src="./images/catroom.png" height="160" alt="CatRoom" align="right">
22

3-
## Features
4-
### Implemented
3+
# CatRoom
54

6-
- 1.12.2 on Java 21
7-
- *Latest* LWJGL3
8-
- A working *mod development template/kit*
9-
- Patches for loading incompatible mods
10-
- Built-in Mixin w/ handy bootstrapping
11-
- Develop using Scala 3 + Kotlin 2
12-
- Compatibility to 99% of Forge mods
5+
CatRoom is a Cleanroom+Bukkit+Spigot server software forked from [CatServer](https://github.com/Luohuayu/CatServer).
136

14-
### Planning
7+
## Features:
158

16-
- CleanroomGradle to replace ForgeGradle
17-
- Classfile API
18-
- Actually useful APIs (See [here](https://github.com/orgs/CleanroomMC/projects/4/))
19-
- Optimized
9+
- Replaced Forge with Cleanroom
10+
- Enhanced mod compatibility
11+
- Built-in Forge-Bukkit permission bridge
12+
- Make use of modern Java features
13+
- Optimized plugin performance
14+
15+
For all fixes, see [fixed upstream issues](FIXED_UPSTREAM_ISSUES.md)
2016

2117
## Components:
2218

@@ -30,29 +26,6 @@
3026
- [Scalar](https://www.curseforge.com/minecraft/mc-mods/scalar-legacy), a Scala provider. We made Scala libraries become a standalone mod so it can be updated.
3127
- [Forgelin-Continuous](https://www.curseforge.com/minecraft/mc-mods/forgelin-continuous) and [LibrarianLib-Continuous](https://www.curseforge.com/minecraft/mc-mods/librarianlib-continuous)
3228

33-
## Download & Installation:
34-
35-
- For MultiMC-based launchers (PolyMC, PrismLauncher), download the MMC instance from [release](https://github.com/CleanroomMC/Cleanroom/releases), import it in your launcher(alternatively unzip patches and json inside to your 1.12 instance).
36-
- For regular launcher (official launcher, AT launcher, FTB, HMCL), install the [relauncher](https://www.curseforge.com/minecraft/mc-mods/cleanroom-relauncher), launch the game and follow instructions.
37-
- **WARNING:** Only MultiMC-based launchers are officially supported. This is because of the limit on removing vanilla libraries in other launchers.
38-
- **Remember to install [Fugue](https://www.curseforge.com/minecraft/mc-mods/fugue)!**
39-
- **And [Scalar](https://www.curseforge.com/minecraft/mc-mods/scalar-legacy)!**
40-
- If you were told to use **action builds** (aka bleeding edge), here: [Cleanroom](https://github.com/CleanroomMC/Cleanroom/actions), [Fugue](https://github.com/CleanroomMC/Fugue/actions)
41-
- You need to log in your GitHub account to download action artifacts.
42-
43-
## Cleanroom on Server
44-
45-
- Cleanroom can be installed on server.
46-
- Just use the installer mentioned in previous section, and run the jar with `--intallServer`. See [this page](https://minecraft.fandom.com/wiki/Tutorials/Setting_up_a_Minecraft_Forge_server) for more detail.
47-
48-
## Pack-making with Cleanroom
49-
50-
### Steps of Migrating to Cleanroom
51-
52-
1. Add Scalar and Fugue in your pack.
53-
2. Add Relauncher (optional, this will make your pack a full Cleanroom pack)
54-
3. Test launching and remove incompatible mods
55-
5629
### About Cross-compat Between Forge and Cleanroom
5730

5831
- Cleanroom mods (Fugue, Scalar) will be ignored by Forge, so then won't crash existed players

build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ def jvm_arguments = [
8282

8383
def compiler_jvm_arguments = [
8484
'--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED',
85-
'--add-exports=java.base/jdk.internal.reflect=ALL-UNNAMED'
85+
'--add-exports=java.base/jdk.internal.reflect=ALL-UNNAMED',
86+
'-Xlint:-removal', // Suppress Timings deprecation warnings
87+
'--add-modules=jdk.incubator.vector' // CatRoom - SIMD support
8688
]
8789
// Projects
8890

@@ -528,6 +530,7 @@ project(':cleanroom') {
528530
installer 'net.openhft:affinity:3.23.3'
529531
installer 'org.slf4j:slf4j-api:2.1.0-alpha1' // Affinity
530532
installer 'org.slf4j:slf4j-simple:2.1.0-alpha1' // Affinity
533+
installer 'com.github.ben-manes.caffeine:caffeine:3.2.2'
531534

532535
/*
533536
forgeGradleMcDeps

gradle.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,8 @@ org.gradle.caching=true
3333
# org.gradle.java.home=/usr/lib/jvm/java-1.17.0-openjdk-amd64
3434
# Daemon
3535
org.gradle.daemon=false
36+
37+
#systemProp.http.proxyHost=127.0.0.1
38+
#systemProp.http.proxyPort=7890
39+
#systemProp.https.proxyHost=127.0.0.1
40+
#systemProp.https.proxyPort=7890

images/catroom.png

122 KB
Loading

patches/minecraft/net/minecraft/block/BlockStaticLiquid.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
if (this.func_176369_e(p_180650_1_, blockpos))
4949
{
5050
- p_180650_1_.func_175656_a(blockpos, Blocks.field_150480_ab.func_176223_P());
51-
+ if (p_180650_1_.func_180495_p(blockpos) != Blocks.field_150480_ab) {
51+
+ if (p_180650_1_.func_180495_p(blockpos).func_177230_c() != Blocks.field_150480_ab) {
5252
+ if (CraftEventFactory.callBlockIgniteEvent(p_180650_1_, blockpos.func_177958_n(), blockpos.func_177956_o(), blockpos.func_177952_p(), p_180650_2_.func_177958_n(), p_180650_2_.func_177956_o(), p_180650_2_.func_177952_p()).isCancelled()) {
5353
+ continue;
5454
+ }

patches/minecraft/net/minecraft/entity/ai/EntityAIMate.java.patch

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
--- before/net/minecraft/entity/ai/EntityAIMate.java
22
+++ after/net/minecraft/entity/ai/EntityAIMate.java
3-
@@ -6,6 +6,7 @@
3+
@@ -2,10 +2,13 @@
4+
5+
import java.util.List;
6+
import java.util.Random;
7+
+
8+
+import catserver.server.utils.ModFixUtils;
9+
import net.minecraft.advancements.CriteriaTriggers;
410
import net.minecraft.entity.EntityAgeable;
511
import net.minecraft.entity.item.EntityXPOrb;
612
import net.minecraft.entity.passive.EntityAnimal;
713
+import net.minecraft.entity.passive.EntityTameable;
814
import net.minecraft.entity.player.EntityPlayerMP;
915
import net.minecraft.stats.StatList;
1016
import net.minecraft.util.EnumParticleTypes;
11-
@@ -22,7 +23,7 @@
17+
@@ -22,7 +25,7 @@
1218

1319
public EntityAIMate(EntityAnimal p_i1619_1_, double p_i1619_2_)
1420
{
@@ -17,15 +23,15 @@
1723
}
1824

1925
public EntityAIMate(EntityAnimal p_i47306_1_, double p_i47306_2_, Class <? extends EntityAnimal > p_i47306_4_)
20-
@@ -34,7 +35,6 @@
26+
@@ -34,7 +37,6 @@
2127
this.func_75248_a(3);
2228
}
2329

2430
- @Override
2531
public boolean func_75250_a()
2632
{
2733
if (!this.field_75390_d.func_70880_s())
28-
@@ -48,27 +48,24 @@
34+
@@ -48,27 +50,24 @@
2935
}
3036
}
3137

@@ -55,7 +61,7 @@
5561
{
5662
this.func_75388_i();
5763
}
58-
@@ -76,7 +73,7 @@
64+
@@ -76,7 +75,7 @@
5965

6066
private EntityAnimal func_75389_f()
6167
{
@@ -64,7 +70,7 @@
6470
double d0 = Double.MAX_VALUE;
6571
EntityAnimal entityanimal = null;
6672

67-
@@ -96,8 +93,23 @@
73+
@@ -96,8 +95,23 @@
6874
{
6975
EntityAgeable entityageable = this.field_75390_d.func_90011_a(this.field_75391_e);
7076

@@ -88,11 +94,11 @@
8894
EntityPlayerMP entityplayermp = this.field_75390_d.func_191993_do();
8995

9096
if (entityplayermp == null && this.field_75391_e.func_191993_do() != null)
91-
@@ -105,6 +117,13 @@
97+
@@ -105,6 +119,13 @@
9298
entityplayermp = this.field_75391_e.func_191993_do();
9399
}
94100

95-
+ int experience = this.field_75390_d.func_70681_au().nextInt(7) + 1;
101+
+ int experience = this.field_75390_d.func_70681_au().nextInt(ModFixUtils.fixNetherAPI()) + 1; // CatRoom - Fix NetherAPI
96102
+ org.bukkit.event.entity.EntityBreedEvent entityBreedEvent = org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callEntityBreedEvent(entityageable, field_75390_d, field_75391_e, entityplayermp, this.field_75390_d.breedItem, experience);
97103
+ if (entityBreedEvent.isCancelled()) {
98104
+ return;
@@ -102,7 +108,7 @@
102108
if (entityplayermp != null)
103109
{
104110
entityplayermp.func_71029_a(StatList.field_151186_x);
105-
@@ -117,41 +136,24 @@
111+
@@ -117,41 +138,24 @@
106112
this.field_75391_e.func_70875_t();
107113
entityageable.func_70873_a(-24000);
108114
entityageable.func_70012_b(this.field_75390_d.field_70165_t, this.field_75390_d.field_70163_u, this.field_75390_d.field_70161_v, 0.0F, 0.0F);

0 commit comments

Comments
 (0)