Removed the Mixin used for coral
This commit is contained in:
parent
d7d5a89beb
commit
b9c877b881
|
@ -0,0 +1,90 @@
|
||||||
|
@if "%DEBUG%" == "" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if "%ERRORLEVEL%" == "0" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:init
|
||||||
|
@rem Get command-line arguments, handling Windowz variants
|
||||||
|
|
||||||
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
|
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||||
|
|
||||||
|
:win9xME_args
|
||||||
|
@rem Slurp the command line arguments.
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
set _SKIP=2
|
||||||
|
|
||||||
|
:win9xME_args_slurp
|
||||||
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
|
set CMD_LINE_ARGS=%*
|
||||||
|
goto execute
|
||||||
|
|
||||||
|
:4NT_args
|
||||||
|
@rem Get arguments from the 4NT Shell from JP Software
|
||||||
|
set CMD_LINE_ARGS=%$
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
|
@ -65,21 +65,11 @@ public abstract class BOPBlock extends Block
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IProperty[] getHiddenProperties()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean hasPresetProperties()
|
public boolean hasPresetProperties()
|
||||||
{
|
{
|
||||||
return getPresetProperties() != null;
|
return getPresetProperties() != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasHiddenProperties()
|
|
||||||
{
|
|
||||||
return getHiddenProperties() != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStateName(IBlockState state, boolean fullName)
|
public String getStateName(IBlockState state, boolean fullName)
|
||||||
{
|
{
|
||||||
String unlocalizedName = state.getBlock().getUnlocalizedName();
|
String unlocalizedName = state.getBlock().getUnlocalizedName();
|
||||||
|
|
|
@ -86,12 +86,6 @@ public class BlockCoral extends BOPPlant
|
||||||
return new IProperty[] { VARIANT_PROP };
|
return new IProperty[] { VARIANT_PROP };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IProperty[] getHiddenProperties()
|
|
||||||
{
|
|
||||||
return new IProperty[] { LEVEL };
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getStateName(IBlockState state, boolean fullName)
|
public String getStateName(IBlockState state, boolean fullName)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright 2014, the Biomes O' Plenty Team
|
|
||||||
*
|
|
||||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
|
||||||
*
|
|
||||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
package biomesoplenty.common.handler;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockLiquid;
|
|
||||||
import net.minecraft.block.properties.IProperty;
|
|
||||||
import net.minecraft.client.renderer.BlockModelShapes;
|
|
||||||
import net.minecraft.client.renderer.block.statemap.StateMap;
|
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
|
||||||
import biomesoplenty.api.block.BOPBlocks;
|
|
||||||
import biomesoplenty.common.event.BlockModelRegisterEvent;
|
|
||||||
|
|
||||||
public class BlockModelRegisterEventHandler
|
|
||||||
{
|
|
||||||
private static Map<Block, Set<IProperty>> hiddenProperties = Maps.newHashMap();
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public void onBlockModelRegister(BlockModelRegisterEvent event)
|
|
||||||
{
|
|
||||||
BlockModelShapes modelShapes = event.modelShapes;
|
|
||||||
|
|
||||||
for (Entry<Block, Set<IProperty>> entry : hiddenProperties.entrySet())
|
|
||||||
{
|
|
||||||
modelShapes.registerBlockWithStateMapper(entry.getKey(), (new StateMap.Builder()).addPropertiesToIgnore(entry.getValue().toArray(new IProperty[] {})).build());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void addHiddenProperties(Block block, IProperty... properties)
|
|
||||||
{
|
|
||||||
hiddenProperties.put(block, Sets.newHashSet(properties));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -34,7 +34,6 @@ import biomesoplenty.common.block.BlockCoral;
|
||||||
import biomesoplenty.common.block.BlockGem;
|
import biomesoplenty.common.block.BlockGem;
|
||||||
import biomesoplenty.common.block.BlockGemOre;
|
import biomesoplenty.common.block.BlockGemOre;
|
||||||
import biomesoplenty.common.block.BlockHive;
|
import biomesoplenty.common.block.BlockHive;
|
||||||
import biomesoplenty.common.handler.BlockModelRegisterEventHandler;
|
|
||||||
import biomesoplenty.common.handler.DrawScreenEventHandler;
|
import biomesoplenty.common.handler.DrawScreenEventHandler;
|
||||||
import biomesoplenty.common.item.ItemBlockWithVariants;
|
import biomesoplenty.common.item.ItemBlockWithVariants;
|
||||||
import biomesoplenty.common.util.block.BlockStateUtils;
|
import biomesoplenty.common.util.block.BlockStateUtils;
|
||||||
|
@ -93,9 +92,6 @@ public class ModBlocks
|
||||||
DrawScreenEventHandler.blockCount++;
|
DrawScreenEventHandler.blockCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (block.hasHiddenProperties())
|
|
||||||
BlockModelRegisterEventHandler.addHiddenProperties(block, block.getHiddenProperties());
|
|
||||||
|
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
package biomesoplenty.common.init;
|
package biomesoplenty.common.init;
|
||||||
|
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import biomesoplenty.common.handler.BlockModelRegisterEventHandler;
|
|
||||||
import biomesoplenty.common.handler.DrawScreenEventHandler;
|
import biomesoplenty.common.handler.DrawScreenEventHandler;
|
||||||
import biomesoplenty.common.handler.decoration.DecorateBiomeEventHandler;
|
import biomesoplenty.common.handler.decoration.DecorateBiomeEventHandler;
|
||||||
|
|
||||||
|
@ -18,7 +17,6 @@ public class ModHandlers
|
||||||
public static void init()
|
public static void init()
|
||||||
{
|
{
|
||||||
MinecraftForge.TERRAIN_GEN_BUS.register(new DecorateBiomeEventHandler());
|
MinecraftForge.TERRAIN_GEN_BUS.register(new DecorateBiomeEventHandler());
|
||||||
MinecraftForge.EVENT_BUS.register(new BlockModelRegisterEventHandler());
|
|
||||||
MinecraftForge.EVENT_BUS.register(new DrawScreenEventHandler());
|
MinecraftForge.EVENT_BUS.register(new DrawScreenEventHandler());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,84 @@
|
||||||
{
|
{
|
||||||
"variants": {
|
"variants": {
|
||||||
"variant=kelp_bottom": { "model": "biomesoplenty:kelp_bottom" },
|
"level=0,variant=pink": { "model": "biomesoplenty:pink_coral" },
|
||||||
"variant=kelp_middle": { "model": "biomesoplenty:kelp_middle" },
|
"level=1,variant=pink": { "model": "biomesoplenty:pink_coral" },
|
||||||
"variant=kelp_top": { "model": "biomesoplenty:kelp_top" },
|
"level=2,variant=pink": { "model": "biomesoplenty:pink_coral" },
|
||||||
"variant=kelp": { "model": "biomesoplenty:kelp" },
|
"level=3,variant=pink": { "model": "biomesoplenty:pink_coral" },
|
||||||
"variant=pink": { "model": "biomesoplenty:pink_coral" },
|
"level=4,variant=pink": { "model": "biomesoplenty:pink_coral" },
|
||||||
"variant=orange": { "model": "biomesoplenty:orange_coral" },
|
"level=5,variant=pink": { "model": "biomesoplenty:pink_coral" },
|
||||||
"variant=blue": { "model": "biomesoplenty:blue_coral" },
|
"level=6,variant=pink": { "model": "biomesoplenty:pink_coral" },
|
||||||
"variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
"level=7,variant=pink": { "model": "biomesoplenty:pink_coral" },
|
||||||
"variant=algae": { "model": "biomesoplenty:algae" }
|
"level=8,variant=pink": { "model": "biomesoplenty:pink_coral" },
|
||||||
|
"level=9,variant=pink": { "model": "biomesoplenty:pink_coral" },
|
||||||
|
"level=10,variant=pink": { "model": "biomesoplenty:pink_coral" },
|
||||||
|
"level=11,variant=pink": { "model": "biomesoplenty:pink_coral" },
|
||||||
|
"level=12,variant=pink": { "model": "biomesoplenty:pink_coral" },
|
||||||
|
"level=13,variant=pink": { "model": "biomesoplenty:pink_coral" },
|
||||||
|
"level=14,variant=pink": { "model": "biomesoplenty:pink_coral" },
|
||||||
|
"level=15,variant=pink": { "model": "biomesoplenty:pink_coral" },
|
||||||
|
"level=0,variant=orange": { "model": "biomesoplenty:orange_coral" },
|
||||||
|
"level=1,variant=orange": { "model": "biomesoplenty:orange_coral" },
|
||||||
|
"level=2,variant=orange": { "model": "biomesoplenty:orange_coral" },
|
||||||
|
"level=3,variant=orange": { "model": "biomesoplenty:orange_coral" },
|
||||||
|
"level=4,variant=orange": { "model": "biomesoplenty:orange_coral" },
|
||||||
|
"level=5,variant=orange": { "model": "biomesoplenty:orange_coral" },
|
||||||
|
"level=6,variant=orange": { "model": "biomesoplenty:orange_coral" },
|
||||||
|
"level=7,variant=orange": { "model": "biomesoplenty:orange_coral" },
|
||||||
|
"level=8,variant=orange": { "model": "biomesoplenty:orange_coral" },
|
||||||
|
"level=9,variant=orange": { "model": "biomesoplenty:orange_coral" },
|
||||||
|
"level=10,variant=orange": { "model": "biomesoplenty:orange_coral" },
|
||||||
|
"level=11,variant=orange": { "model": "biomesoplenty:orange_coral" },
|
||||||
|
"level=12,variant=orange": { "model": "biomesoplenty:orange_coral" },
|
||||||
|
"level=13,variant=orange": { "model": "biomesoplenty:orange_coral" },
|
||||||
|
"level=14,variant=orange": { "model": "biomesoplenty:orange_coral" },
|
||||||
|
"level=15,variant=orange": { "model": "biomesoplenty:orange_coral" },
|
||||||
|
"level=0,variant=blue": { "model": "biomesoplenty:blue_coral" },
|
||||||
|
"level=1,variant=blue": { "model": "biomesoplenty:blue_coral" },
|
||||||
|
"level=2,variant=blue": { "model": "biomesoplenty:blue_coral" },
|
||||||
|
"level=3,variant=blue": { "model": "biomesoplenty:blue_coral" },
|
||||||
|
"level=4,variant=blue": { "model": "biomesoplenty:blue_coral" },
|
||||||
|
"level=5,variant=blue": { "model": "biomesoplenty:blue_coral" },
|
||||||
|
"level=6,variant=blue": { "model": "biomesoplenty:blue_coral" },
|
||||||
|
"level=7,variant=blue": { "model": "biomesoplenty:blue_coral" },
|
||||||
|
"level=8,variant=blue": { "model": "biomesoplenty:blue_coral" },
|
||||||
|
"level=9,variant=blue": { "model": "biomesoplenty:blue_coral" },
|
||||||
|
"level=10,variant=blue": { "model": "biomesoplenty:blue_coral" },
|
||||||
|
"level=11,variant=blue": { "model": "biomesoplenty:blue_coral" },
|
||||||
|
"level=12,variant=blue": { "model": "biomesoplenty:blue_coral" },
|
||||||
|
"level=13,variant=blue": { "model": "biomesoplenty:blue_coral" },
|
||||||
|
"level=14,variant=blue": { "model": "biomesoplenty:blue_coral" },
|
||||||
|
"level=15,variant=blue": { "model": "biomesoplenty:blue_coral" },
|
||||||
|
"level=0,variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
||||||
|
"level=1,variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
||||||
|
"level=2,variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
||||||
|
"level=3,variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
||||||
|
"level=4,variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
||||||
|
"level=5,variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
||||||
|
"level=6,variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
||||||
|
"level=7,variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
||||||
|
"level=8,variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
||||||
|
"level=9,variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
||||||
|
"level=10,variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
||||||
|
"level=11,variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
||||||
|
"level=12,variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
||||||
|
"level=13,variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
||||||
|
"level=14,variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
||||||
|
"level=15,variant=glowing": { "model": "biomesoplenty:glowing_coral" },
|
||||||
|
"level=0,variant=algae": { "model": "biomesoplenty:algae" },
|
||||||
|
"level=1,variant=algae": { "model": "biomesoplenty:algae" },
|
||||||
|
"level=2,variant=algae": { "model": "biomesoplenty:algae" },
|
||||||
|
"level=3,variant=algae": { "model": "biomesoplenty:algae" },
|
||||||
|
"level=4,variant=algae": { "model": "biomesoplenty:algae" },
|
||||||
|
"level=5,variant=algae": { "model": "biomesoplenty:algae" },
|
||||||
|
"level=6,variant=algae": { "model": "biomesoplenty:algae" },
|
||||||
|
"level=7,variant=algae": { "model": "biomesoplenty:algae" },
|
||||||
|
"level=8,variant=algae": { "model": "biomesoplenty:algae" },
|
||||||
|
"level=9,variant=algae": { "model": "biomesoplenty:algae" },
|
||||||
|
"level=10,variant=algae": { "model": "biomesoplenty:algae" },
|
||||||
|
"level=11,variant=algae": { "model": "biomesoplenty:algae" },
|
||||||
|
"level=12,variant=algae": { "model": "biomesoplenty:algae" },
|
||||||
|
"level=13,variant=algae": { "model": "biomesoplenty:algae" },
|
||||||
|
"level=14,variant=algae": { "model": "biomesoplenty:algae" },
|
||||||
|
"level=15,variant=algae": { "model": "biomesoplenty:algae" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue