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 net.cazzar.itech2100.assign2.dialogues; | |
| import assignment2.Property; | |
| import javax.swing.*; | |
| import java.awt.*; | |
| import java.awt.event.ActionEvent; | |
| /** | |
| * @author Cayde |
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
| { | |
| "parent": "block/cube_all", | |
| "textures": { | |
| "all": "domain:blocks/texture" | |
| } | |
| } |
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
| public void missingMappings(FMLMissingMappingsEvent e) { | |
| for (FMLMissingMappingsEvent.MissingMapping mapping : e.getAll()) { | |
| if ("ukeboxreloaded:blockJukebox".equals(mapping.name)) { //You know, because FML has a small mapping issue. | |
| mapping.remap(proxy.jukeBox); | |
| } | |
| } | |
| } |
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.google.common.base.Predicate | |
| import net.minecraft.block.Block | |
| import net.minecraft.block.material.Material | |
| import net.minecraft.block.properties.PropertyDirection | |
| import net.minecraft.block.state.{BlockState, IBlockState} | |
| import net.minecraft.util.EnumFacing | |
| object BlockExample extends { | |
| val FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL.asInstanceOf[Predicate[EnumFacing]]) | |
| } with Block(Material.wood) { |
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
| scala> import net.minecraft.tileentity.TileEntity | |
| import net.minecraft.util.BlockPos | |
| import net.minecraft.world.IBlockAccess | |
| def getTile[T <: TileEntity](world: IBlockAccess, pos: BlockPos): T = world.getTileEntity(pos) match { | |
| case t: T => t | |
| case _ => null | |
| } | |
| import net.minecraft.tileentity.TileEntity |
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 net.cazzar.mods.jukeboxreloaded.network.message | |
| import io.netty.buffer.ByteBuf | |
| import net.cazzar.mods.jukeboxreloaded.JukeboxReloaded | |
| import net.cazzar.mods.jukeboxreloaded.Util._ | |
| import net.minecraft.item.{Item, ItemStack} | |
| import net.minecraft.util.BlockPos | |
| import net.minecraftforge.fml.common.network.simpleimpl.{MessageContext, IMessageHandler, IMessage} | |
| class ClientPlayMessage(var item: Item, var pos: BlockPos) extends IMessage { |
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
| implicit class RichByteBuf(buf: ByteBuf) { | |
| def writeString(str: String) = ByteBufUtils.writeUTF8String(buf, String) | |
| def readString() = ByteBufUtils.readUTF8String(buf) | |
| def writeItemStack(is: ItemStack) = ByteBufUtils.writeItemStack(buf, is) | |
| def readItemStack() = ByteBufUtils.readItemStack(buf) | |
| def writePos(pos: BlockPos): Unit = { | |
| buf.writeInt(pos.getX) | |
| buf.writeInt(pos.getY) |
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 net.cazzar.mods.jukeboxreloaded | |
| import io.netty.buffer.ByteBuf | |
| import net.minecraft.block.Block | |
| import net.minecraft.entity.player.EntityPlayer | |
| import net.minecraft.item.{Item, ItemStack} | |
| import net.minecraft.tileentity.TileEntity | |
| import net.minecraft.util.{BlockPos, ChatComponentText} | |
| import net.minecraft.world.World | |
| import net.minecraftforge.fml.common.network.ByteBufUtils |
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
| #include <stdio.h> | |
| int main() | |
| { | |
| int ae1 = 0xDEADBEEF; | |
| printf("%d", ae1); | |
| *(&ae1) = NULL; | |
| printf("%d", ae1); | |
| return 0; | |
| } |
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
| Compiled from "test.java" | |
| class test { | |
| public java.util.List<java.lang.String> strings; | |
| test(); | |
| } |