This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public MinecraftVersion getMinecraftVersion() { | |
return new MinecraftVersion() { | |
@Override | |
public String getName() { | |
return "@MC_VERSION@"; | |
} | |
@Override | |
public boolean isLegacy() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MinecraftVersionImpl implements MinecraftVersion { | |
private final static String NAME = "@MC_VERSION@"; | |
private final static boolean LEGACY = false; | |
private MinecraftVersionImpl() {} | |
@Override | |
public String getName() { | |
return MinecraftVersionImpl.NAME; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* <p>Internal implementation of the SynchronousScheduler interface.</p> | |
* | |
* @see {@link org.spongepowered.api.service.scheduler.SynchronousScheduler} API reference | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
mavenCentral() | |
maven { | |
name = "forge" | |
url = "http://files.minecraftforge.net/maven" | |
} | |
maven { | |
name = "sonatype" | |
url = "https://oss.sonatype.org/content/repositories/snapshots/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mordrum.mcore.client.gui; | |
import com.google.common.base.Optional; | |
import com.google.common.eventbus.Subscribe; | |
import cpw.mods.fml.client.FMLClientHandler; | |
import net.malisis.core.client.gui.Anchor; | |
import net.malisis.core.client.gui.GuiTexture; | |
import net.malisis.core.client.gui.MalisisGui; | |
import net.malisis.core.client.gui.component.UIComponent; | |
import net.malisis.core.client.gui.component.container.UIBackgroundContainer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private MinecraftVersion determineMCVersion() { | |
int protocolVersion; | |
boolean legacy = false; | |
// Determine protocol version based on MC version, see http://wiki.vg/Protocol_version_numbers | |
if (Loader.MC_VERSION.equals("1.7.2") || Loader.MC_VERSION.equals("1.7.4") || Loader.MC_VERSION.equals("1.7.5")) protocolVersion = 4; | |
else if (Loader.MC_VERSION.equals("1.7.6") || Loader.MC_VERSION.equals("1.7.7") || Loader.MC_VERSION.equals("1.7.8") || Loader.MC_VERSION.equals("1.7.9") || Loader.MC_VERSION.equals("1.7.9")) protocolVersion = 5; | |
else if (Loader.MC_VERSION.equals("1.8")) protocolVersion = 47; | |
if (legacy) return new SpongeLegacyMinecraftVersion(Loader.MC_VERSION, protocolVersion); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import play.api.mvc.EssentialFilter; | |
import play.http.HttpFilters; | |
import util.HostFilter; | |
import javax.inject.Inject; | |
public class Filters implements HttpFilters { | |
@Inject | |
HostFilter hostFilter; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IRetexturableModel itemModel = (IRetexturableModel) ModelLoaderRegistry.getModel(new ResourceLocation("minecraft:builtin/generated")); | |
String itemName = "copper_axe"; | |
IModel retexture = itemModel.retexture(ImmutableMap.of("layer0", ASSETS + "items/" + itemName)); | |
TextureMap textures = Minecraft.getMinecraft().getTextureMapBlocks(); | |
IFlexibleBakedModel bakedModel = retexture.bake(retexture.getDefaultState(), Attributes.DEFAULT_BAKED_FORMAT, (location) -> textures.getAtlasSprite(location.toString())); | |
event.modelRegistry.putObject(new ModelResourceLocation(MODID + ":" + itemName + "#normal"), bakedModel); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private OreBlock dankBlock; | |
@EventHandler | |
public void preinit(FMLPreInitializationEvent event) { | |
metals = gson.fromJson(mMetals.getResourceAsJSON("data/wip.json"), Metal[].class); | |
MinecraftForge.EVENT_BUS.register(this); | |
for (Metal metal : metals) { | |
OreBlock oreBlock = new OreBlock(metal); | |
dankBlock = oreBlock; | |
GameRegistry.registerBlock(oreBlock, oreBlock.getName()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.mordrum.metallurgy.Metal; | |
import com.mordrum.metallurgy.mMetals; | |
import net.malisis.core.block.BoundingBoxType; | |
import net.malisis.core.block.MalisisBlock; | |
import net.malisis.core.block.component.DirectionalComponent; | |
import net.malisis.core.util.AABBUtils; | |
import net.minecraft.block.Block; | |
import net.minecraft.block.material.Material; | |
import net.minecraft.block.state.IBlockState; | |
import net.minecraft.entity.Entity; |
OlderNewer