Skip to content

Commit

Permalink
Merge pull request #9 from GTNewHorizons/fix/fakeplayer
Browse files Browse the repository at this point in the history
neid compat attempt
  • Loading branch information
Connor-Colenso authored Aug 13, 2024
2 parents 2fed41d + 73a4958 commit 327fc7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/sk89q/worldedit/blocks/BaseBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class BaseBlock extends Block implements TileEntityBlock {
* Indicates the maximum data value (inclusive) that can be used. A future
* version of Minecraft may abolish block data values.
*/
public static final int MAX_DATA = 15;
public static int MAX_DATA = 15;

// Instances of this class should be _as small as possible_ because there will
// be millions of instances of this object.
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.WorldVector;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.blocks.BaseItemStack;
import com.sk89q.worldedit.event.platform.PlatformReadyEvent;
import com.sk89q.worldedit.extension.platform.Platform;
Expand Down Expand Up @@ -119,6 +120,10 @@ public void preInit(FMLPreInitializationEvent event) {
FMLCommonHandler.instance()
.bus()
.register(ThreadSafeCache.getInstance());

if (Loader.isModLoaded("neid")) {
BaseBlock.MAX_DATA = (2 << 16) - 1;
}
}

@EventHandler
Expand Down

0 comments on commit 327fc7f

Please sign in to comment.