mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-24 10:34:29 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c620a87819 | ||
|
|
0a1895370b | ||
|
|
7220faae24 | ||
|
|
36cb1b4b32 |
No files matched your search
+4
-4
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("com.falsepattern.fpgradle-mc") version ("0.17.1")
|
||||
id("com.falsepattern.fpgradle-mc") version ("1.0.0")
|
||||
}
|
||||
|
||||
group = "com.falsepattern"
|
||||
@@ -64,9 +64,9 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
// region Our deps
|
||||
implementationSplit("com.falsepattern:falsepatternlib-mc1.7.10:1.7.0")
|
||||
implementation("it.unimi.dsi:fastutil:8.5.15")
|
||||
implementationSplit("com.falsepattern:chunkapi-mc1.7.10:0.6.3")
|
||||
implementationSplit("com.falsepattern:falsepatternlib-mc1.7.10:1.8.1")
|
||||
compileOnly("it.unimi.dsi:fastutil:8.5.16")
|
||||
implementationSplit("com.falsepattern:chunkapi-mc1.7.10:0.6.4")
|
||||
// endregion
|
||||
|
||||
// region maintained mods
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
org.gradle.configuration-cache=true
|
||||
org.gradle.caching=true
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -42,8 +42,8 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
version = Tags.VERSION,
|
||||
name = Tags.MODNAME,
|
||||
acceptedMinecraftVersions = "[1.7.10]",
|
||||
dependencies = "required-after:chunkapi@[0.6.3,);" +
|
||||
"required-after:falsepatternlib@[1.7.0,);" +
|
||||
dependencies = "required-after:chunkapi@[0.6.4,);" +
|
||||
"required-after:falsepatternlib@[1.8.1,);" +
|
||||
"after:antiidconflict")
|
||||
public class EndlessIDs {
|
||||
public static final byte[] ZERO_LENGTH_BIOME_ARRAY_PLACEHOLDER = new byte[0];
|
||||
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2025 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.worldedit;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import com.sk89q.worldedit.Vector2D;
|
||||
import com.sk89q.worldedit.forge.ForgeWorld;
|
||||
import com.sk89q.worldedit.world.biome.BaseBiome;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
@Mixin(ForgeWorld.class)
|
||||
public abstract class ForgeWorldMixin {
|
||||
@Shadow(remap = false) public abstract World getWorld();
|
||||
|
||||
/**
|
||||
* @author FalsePattern
|
||||
* @reason ID Extension
|
||||
*/
|
||||
@Overwrite(remap = false)
|
||||
public boolean setBiome(Vector2D position, BaseBiome biome) {
|
||||
checkNotNull(position);
|
||||
checkNotNull(biome);
|
||||
|
||||
Chunk chunk = getWorld().getChunkFromBlockCoords(position.getBlockX(), position.getBlockZ());
|
||||
if ((chunk != null) && (chunk.isChunkLoaded)) {
|
||||
((ChunkBiomeHook)chunk).getBiomeShortArray()[((position.getBlockZ() & 0xF) << 4 | position.getBlockX() & 0xF)] = (short) biome.getId();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -251,6 +251,8 @@ public class Mixin {
|
||||
|
||||
biome_witchery_WorldChunkManagerMirrorMixin(EXT_BIOME, require(WITCHERY)),
|
||||
biome_witchery_BrewActionBiomeChangeMixin(EXT_BIOME, require(WITCHERY)),
|
||||
|
||||
biome_worldedit_ForgeWorldMixin(EXT_BIOME, require(WORLDEDIT)),
|
||||
//endregion
|
||||
|
||||
//region blockitem
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"dependencies": {
|
||||
"always": {
|
||||
"common": [
|
||||
"it.unimi.dsi:fastutil:8.5.15"
|
||||
"it.unimi.dsi:fastutil:8.5.16"
|
||||
],
|
||||
"client": [],
|
||||
"server": []
|
||||
|
||||
Reference in new issue
Block a user