mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-25 08:28:34 +01:00
Compare commits
69 commits
d9b0a714d1
...
ee43fb930c
Author | SHA1 | Date | |
---|---|---|---|
ee43fb930c | |||
737a7d3d54 | |||
f404183d54 | |||
fe9610a6f3 | |||
361d4122f8 | |||
707e575586 | |||
cb31f1efbd | |||
9f90ad7e62 | |||
35ac4f5140 | |||
127595467f | |||
35a2a97e00 | |||
|
8e3c44ee0f | ||
|
1443d13df3 | ||
|
db7b7677f2 | ||
|
3e61998ca8 | ||
|
24fb9a26e0 | ||
|
9916db2991 | ||
|
42affe942f | ||
|
4eee99c75b | ||
|
4d5cc7aa58 | ||
|
fb62b86632 | ||
|
2c07ef0fa0 | ||
|
395b6d0491 | ||
|
35ff26221a | ||
|
d0363ed81c | ||
06a2957f27 | |||
|
5db1f3fbcd | ||
|
8b22fcfa6b | ||
|
2c57a7641a | ||
|
26b021a5e9 | ||
|
497b742b87 | ||
|
c945843038 | ||
|
615bde1cb8 | ||
|
829cc788c7 | ||
|
2ae9ed307e | ||
|
f44c4de74a | ||
|
9dbbb7b913 | ||
|
b51722e181 | ||
|
9d8e711d35 | ||
|
69df7e0e81 | ||
|
47f11f0287 | ||
|
be421af8e2 | ||
|
17473ae179 | ||
|
4c439f5b56 | ||
|
78b9055eae | ||
|
fb1663f106 | ||
|
a5c031c135 | ||
|
6139ca68fa | ||
|
6e0fb39544 | ||
|
0b964b4c89 | ||
|
99b7e0bf43 | ||
|
aa015521bc | ||
|
40d27de0f5 | ||
|
d04ba602d8 | ||
|
4020a1a95d | ||
34d151c878 | |||
9d6118ef27 | |||
e32d6d5866 | |||
7d974b909b | |||
|
b65b646dc8 | ||
|
896a082d74 | ||
|
1355a8e0a1 | ||
|
b9cdc48868 | ||
|
5180afb19d | ||
|
b2493cd071 | ||
|
714b3a8433 | ||
|
36aeb38ce7 | ||
|
90c937a27a | ||
|
5cf1d2e674 |
838 changed files with 9374 additions and 13247 deletions
2
.github/FUNDING.yml
vendored
Normal file
2
.github/FUNDING.yml
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
github: Ellpeck
|
||||
patreon: Ellpeck
|
35
Jenkinsfile
vendored
Normal file
35
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('Clean') {
|
||||
steps {
|
||||
sh './gradlew clean --no-daemon'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh './gradlew build --no-daemon'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Upload Artifacts') {
|
||||
steps {
|
||||
archiveArtifacts 'build/libs/**.jar'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish') {
|
||||
when {
|
||||
branch 'main'
|
||||
}
|
||||
steps {
|
||||
sh './gradlew publish --no-daemon'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
environment {
|
||||
local_maven = '/var/www/maven'
|
||||
}
|
||||
}
|
21
LICENSE
Normal file
21
LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2015-2020 Ellpeck
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
32
LICENSE.md
32
LICENSE.md
|
@ -1,32 +0,0 @@
|
|||
#### All Rights Reserved
|
||||
|
||||
The things listed below are special cases and exceptions from the above. They have to be respected in addition to the above.
|
||||
Everything that is not listed below applies to the above.
|
||||
|
||||
### YOU MAY
|
||||
* Fork and modify the code.
|
||||
* Submit pull requests.
|
||||
* Copy small parts of code for other projects.
|
||||
* Make a review/spotlight of the mod or use it in a modpack.
|
||||
* Make Let's Play (and similar) videos containing the mod.
|
||||
|
||||
### YOU CAN NOT
|
||||
* Copy entire classes, methods or features or claim you made them.
|
||||
* Redistribute the mod. This does not apply, however, when it comes to pre-packaged modpacks.
|
||||
|
||||
### YOU HAVE TO
|
||||
* When modifying or using code, always explicitly credit Ellpeck as the creator.
|
||||
* When making a review/spotlight containing the mod or using it in a modpack, always make clear that Actually Additions is used.
|
||||
* When it comes to the code, always link back to the official repository.
|
||||
* When it comes to the mod, always link back to the the official Minecraft Forum thread or CurseForge page.
|
||||
|
||||
### NOTES
|
||||
|
||||
* There is no warranty of any kind given. The creator is not to be held liable for bugs, problems or issues.
|
||||
* The Actually Additions API can be used in other projects, however it should not be modified. It can be redistributed with other mods (if necessary), however it should still be visible that it is a part of Actually Additions. Do not remove the copyright header from any of the API's files.
|
||||
* The above License only applies for code that is part of the mod itself, any APIs used (such as the CoFH API) are licensed by their respective publishers.
|
||||
* Excerpts from other code used (such as the OpenBlocks XP system) are explicitly declared as such and the above point applies for them.
|
||||
* You are not allowed to copy the assets used in this mod for any other project.
|
||||
* Parts of this license, especially restrictive ones, can be ignored with personal permission. Said permission, however, will only be given to people I know or someone who has a very good reason for needing it.
|
||||
|
||||
© 2015-2017 Ellpeck
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
For more information, visit the main CurseForge Page by [clicking here](http://minecraft.curseforge.com/projects/actually-additions)!
|
||||
|
||||
Jenkins: [Click here](https://ci.chaosfield.at/job/ActuallyAdditions/)
|
||||
Maven: [Click here](https://maven.chaosfield.at/de/ellpeck/actuallyadditions/)
|
||||
Jenkins: [Click here](https://ci.ellpeck.de/blue/organizations/jenkins/ActuallyAdditions/)
|
||||
Maven: [Click here](https://maven.ellpeck.de/de/ellpeck/actuallyadditions/)
|
||||
|
||||
Actually Additions is also on the [ModMaven](https://modmaven.k-4u.nl/info.html): [Click here](https://modmaven.k-4u.nl/de/ellpeck/actuallyadditions/)
|
||||
|
||||
![](https://raw.githubusercontent.com/Ellpeck/ActuallyAdditions/master/pics/logo.png)
|
||||
![](https://raw.githubusercontent.com/Ellpeck/ActuallyAdditions/main/pics/logo.png)
|
||||
|
|
167
build.gradle
167
build.gradle
|
@ -1,115 +1,148 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||
apply plugin: 'net.minecraftforge.gradle'
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
version = "1.12.2-r150"
|
||||
version = mod_version
|
||||
group = "de.ellpeck.actuallyadditions"
|
||||
archivesBaseName = "ActuallyAdditions"
|
||||
archivesBaseName = "actuallyadditions-${mc_version}"
|
||||
|
||||
if(hasProperty('buildnumber')){
|
||||
version = "${version}-${this.properties['buildnumber']}"
|
||||
if (System.getenv('BUILD_NUMBER') != null) {
|
||||
version += "." + System.getenv('BUILD_NUMBER')
|
||||
}
|
||||
|
||||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
|
||||
|
||||
sourceSets {
|
||||
main.resources.srcDirs += 'src/generated/resources'
|
||||
}
|
||||
|
||||
minecraft {
|
||||
version = "1.12.2-14.23.5.2836"
|
||||
runDir = "run"
|
||||
mappings = "stable_39"
|
||||
makeObfSourceJar = false
|
||||
replaceIn "ActuallyAdditions.java"
|
||||
replace "@VERSION@", project.version.toString()
|
||||
mappings channel: "snapshot", version: mcp_version
|
||||
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
|
||||
runs {
|
||||
client {
|
||||
properties 'forge.logging.markers': ''
|
||||
properties 'forge.logging.console.level': 'debug'
|
||||
workingDirectory project.file('run')
|
||||
mods {
|
||||
actuallyadditions {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
server {
|
||||
properties 'forge.logging.markers': ''
|
||||
properties 'forge.logging.console.level': 'debug'
|
||||
workingDirectory project.file('run/server')
|
||||
mods {
|
||||
actuallyadditions {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
data {
|
||||
workingDirectory project.file('run/data')
|
||||
args "--mod", "actuallyadditions", "--all", "--output", file('src/generated/resources/'), "--existing", file('src/main/resources')
|
||||
mods {
|
||||
actuallyadditions {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url "https://dvs1.progwml6.com/files/maven"
|
||||
name = "Progwml6 maven / JEI Maven"
|
||||
url = "https://dvs1.progwml6.com/files/maven/"
|
||||
}
|
||||
maven {
|
||||
url "http://tehnut.info/maven"
|
||||
}
|
||||
maven {
|
||||
url "https://dl.bintray.com/cyclopsmc/dev/"
|
||||
maven {
|
||||
name = "ModMaven / JEI Mirror"
|
||||
url = "https://modmaven.k-4u.nl"
|
||||
}
|
||||
maven {
|
||||
url = "https://www.cursemaven.com"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
deobfCompile "mezz.jei:jei_1.12.2:+"
|
||||
deobfCompile "mcp.mobius.waila:Hwyla:1.8+"
|
||||
deobfCompile ("org.cyclops.commoncapabilities:CommonCapabilities:1.12.2-+")
|
||||
}
|
||||
minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
inputs.property "mcversion", project.minecraft.version
|
||||
// compile against the JEI API but do not include it at runtime
|
||||
compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api")
|
||||
// at runtime, use the full JEI jar
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}")
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod.info'
|
||||
|
||||
expand 'version': project.version, 'mcversion': project.minecraft.version
|
||||
}
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
compile "curse.maven:fastworkbench:3003114"
|
||||
}
|
||||
|
||||
jar {
|
||||
|
||||
manifest {
|
||||
attributes(["Specification-Title": "actuallyadditions",
|
||||
"Specification-Vendor": "Ellpeck",
|
||||
"Specification-Version": mod_version,
|
||||
"Implementation-Title": project.name,
|
||||
"Implementation-Version": "${version}",
|
||||
"Implementation-Vendor" :"Ellpeck",
|
||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")],)
|
||||
}
|
||||
}
|
||||
|
||||
task deobfJar(type: Jar) {
|
||||
from sourceSets.main.output
|
||||
from sourceSets.main.java
|
||||
classifier = 'dev'
|
||||
}
|
||||
|
||||
task apiJar(type: Jar) {
|
||||
from sourceSets.main.output
|
||||
from sourceSets.main.java
|
||||
classifier = 'api'
|
||||
include 'de/ellpeck/actuallyadditions/api/**'
|
||||
}
|
||||
|
||||
javadoc {
|
||||
include 'de/ellpeck/actuallyadditions/api/**'
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
from 'build/docs/javadoc'
|
||||
classifier 'javadoc'
|
||||
from(sourceSets.main.output)
|
||||
archiveName = "${baseName}-${version}-deobf.${extension}"
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from sourceSets.main.java
|
||||
classifier = 'sources'
|
||||
from(sourceSets.main.allSource)
|
||||
archiveName = "${baseName}-${version}-sources.${extension}"
|
||||
}
|
||||
|
||||
apply plugin: 'maven-publish'
|
||||
artifacts {
|
||||
archives deobfJar
|
||||
archives sourcesJar
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifact jar
|
||||
artifact apiJar
|
||||
artifact javadocJar
|
||||
artifact sourcesJar
|
||||
artifact deobfJar
|
||||
groupId project.group
|
||||
artifactId project.archivesBaseName
|
||||
version project.version
|
||||
from components.java
|
||||
|
||||
artifact deobfJar {
|
||||
classifier 'deobf'
|
||||
}
|
||||
|
||||
artifact sourcesJar {
|
||||
classifier 'sources'
|
||||
}
|
||||
|
||||
pom.withXml {
|
||||
def node = asNode()
|
||||
if (node.dependencies.size() > 0)
|
||||
node.remove(node.dependencies)
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url "file:///srv/nginx/maven"
|
||||
url "file://" + System.getenv("local_maven")
|
||||
}
|
||||
}
|
||||
}
|
11
gradle.properties
Normal file
11
gradle.properties
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
|
||||
# This is required to provide enough memory for the Minecraft decompilation process.
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
org.gradle.daemon=false
|
||||
|
||||
mod_version=2.0
|
||||
|
||||
mc_version=1.15.2
|
||||
mcp_version=20200514-1.15.1
|
||||
forge_version=31.2.36
|
||||
jei_version=6.0.3.15
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,5 @@
|
|||
#Sat Jul 01 10:16:13 EDT 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
|
||||
|
|
Binary file not shown.
7
setup.bat
Normal file
7
setup.bat
Normal file
|
@ -0,0 +1,7 @@
|
|||
call gradlew eclipse --no-daemon
|
||||
call gradlew eclipse genEclipseRuns --no-daemon
|
||||
for %%I in (.) do set PROJNAME=%%~nxI
|
||||
del %PROJNAME%-Client.launch
|
||||
del %PROJNAME%-Server.launch
|
||||
ren runClient.launch %PROJNAME%-Client.launch
|
||||
ren runServer.launch %PROJNAME%-Server.launch
|
|
@ -16,6 +16,7 @@ bootytoast=actuallyadditions:itemWorm
|
|||
xbony2=actuallyadditions:itemBooklet
|
||||
|
||||
#Patreon stuff
|
||||
# 0 = Redstone, 1 = Lapis, 2 = Diamond, 3 = Coal, 4 = Emerald, 5 = Iron
|
||||
ftog_thorgal=actuallyadditions:itemCrystal
|
||||
minetechniker=actuallyadditions:itemCrystalEmpowered@2
|
||||
3pixel=actuallyadditions:itemMoreDamageLens
|
||||
|
@ -41,3 +42,23 @@ spectacular101=actuallyadditions:itemCrystal@5
|
|||
scottradish=actuallyadditions:itemCrystal
|
||||
slothicornstudio=actuallyadditions:itemCrystalEmpowered@5
|
||||
mecharm=actuallyadditions:itemCrystal@5
|
||||
DJAscendance=actuallyadditions:itemCrystal@2
|
||||
SneezySchoo=actuallyadditions:itemCrystal@0
|
||||
Mistakin=actuallyadditions:itemCrystal@3
|
||||
Tonitch8=actuallyadditions:itemCrystal@4
|
||||
Owlwix=actuallyadditions:itemCrystalEmpowered@5
|
||||
3MJoey=actuallyadditions:itemCrystal@1
|
||||
Ridanis=actuallyadditions:itemHairyBall@0
|
||||
gefailter71=actuallyadditions:itemCrystalEmpowered@0
|
||||
SeaSaltStar=actuallyadditions:itemCrystal@0
|
||||
VlaDracul3=actuallyadditions:itemCrystal@4
|
||||
slbsh=actuallyadditions:itemCrystalEmpowered@0
|
||||
WolfgalVlad=actuallyadditions:itemCrystalEmpowered@2
|
||||
Water_Moon=actuallyadditions:blockPhantomBooster@0
|
||||
ticticboi=actuallyadditions:itemCrystalEmpowered@2
|
||||
The_Boo=actuallyadditions:itemCrystalEmpowered@3
|
||||
Cloniart47=actuallyadditions:itemCrystal@2
|
||||
kei_kouma=actuallyadditions:itemCrystal@5
|
||||
kingofaces2=actuallyadditions:itemCrystal@4
|
||||
Sharkbite202020=actuallyadditions:itemCrystalEmpowered@4
|
||||
ArcticPrince=actuallyadditions:blockPhantomface
|
||||
|
|
|
@ -1,20 +1,5 @@
|
|||
/*
|
||||
* This file ("ActuallyAdditionsAPI.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
|
@ -23,28 +8,29 @@ import de.ellpeck.actuallyadditions.api.internal.IMethodHandler;
|
|||
import de.ellpeck.actuallyadditions.api.laser.ILaserRelayConnectionHandler;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import de.ellpeck.actuallyadditions.api.lens.LensConversion;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.BallOfFurReturn;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CompostRecipe;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.IColorLensChanger;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.OilGenRecipe;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.WeightedOre;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.*;
|
||||
import de.ellpeck.actuallyadditions.common.recipes.CrusherRecipe;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import net.minecraftforge.registries.RegistryBuilder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public final class ActuallyAdditionsAPI {
|
||||
|
||||
public static final String MOD_ID = "actuallyadditions";
|
||||
public static final String API_ID = MOD_ID + "api";
|
||||
public static final String API_VERSION = "34";
|
||||
|
||||
|
||||
public static final IForgeRegistry<Lens> LENS_REGISTRY = new RegistryBuilder<Lens>().disableSync().disableSaving().disableOverrides().create();
|
||||
|
||||
public static final List<CrusherRecipe> CRUSHER_RECIPES = new ArrayList<>();
|
||||
public static final List<BallOfFurReturn> BALL_OF_FUR_RETURN_ITEMS = new ArrayList<>();
|
||||
public static final List<TreasureChestLoot> TREASURE_CHEST_LOOT = new ArrayList<>();
|
||||
|
@ -217,7 +203,7 @@ public final class ActuallyAdditionsAPI {
|
|||
* @param output The itemstack to be output from the compost once conversion finishes
|
||||
* @param outputDisplay The state to display when there is output in the compost
|
||||
*/
|
||||
public static void addCompostRecipe(Ingredient input, IBlockState inputDisplay, ItemStack output, IBlockState outputDisplay) {
|
||||
public static void addCompostRecipe(Ingredient input, BlockState inputDisplay, ItemStack output, BlockState outputDisplay) {
|
||||
COMPOST_RECIPES.add(new CompostRecipe(input, inputDisplay, output, outputDisplay));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,27 +1,17 @@
|
|||
/*
|
||||
* This file ("IBookletChapter.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.booklet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
public interface IBookletChapter {
|
||||
|
||||
IBookletPage[] getAllPages();
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
String getLocalizedName();
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
String getLocalizedNameWithFormatting();
|
||||
|
||||
IBookletEntry getEntry();
|
||||
|
|
|
@ -1,19 +1,9 @@
|
|||
/*
|
||||
* This file ("IBookletEntry.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.booklet;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
|
||||
public interface IBookletEntry {
|
||||
|
||||
|
@ -21,19 +11,19 @@ public interface IBookletEntry {
|
|||
|
||||
String getIdentifier();
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
String getLocalizedName();
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
String getLocalizedNameWithFormatting();
|
||||
|
||||
void addChapter(IBookletChapter chapter);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
List<IBookletChapter> getChaptersForDisplay(String searchBarText);
|
||||
|
||||
int getSortingPriority();
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
boolean visibleOnFrontPage();
|
||||
}
|
||||
|
|
|
@ -1,23 +1,13 @@
|
|||
/*
|
||||
* This file ("IBookletPage.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.booklet;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.List;
|
||||
|
||||
public interface IBookletPage {
|
||||
|
||||
|
@ -29,31 +19,32 @@ public interface IBookletPage {
|
|||
|
||||
void setChapter(IBookletChapter chapter);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
String getInfoText();
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
void mouseClicked(GuiBookletBase gui, int mouseX, int mouseY, int mouseButton);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
void mouseReleased(GuiBookletBase gui, int mouseX, int mouseY, int state);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
void mouseClickMove(GuiBookletBase gui, int mouseX, int mouseY, int clickedMouseButton, long timeSinceLastClick);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
void actionPerformed(GuiBookletBase gui, GuiButton button);
|
||||
// todo: this won't be needed anymore
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
void actionPerformed(GuiBookletBase gui, Button button);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
void initGui(GuiBookletBase gui, int startX, int startY);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
void updateScreen(GuiBookletBase gui, int startX, int startY, int pageTimer);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
void drawScreenPost(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks);
|
||||
|
||||
boolean shouldBeOnLeftSide();
|
||||
|
|
|
@ -1,28 +1,24 @@
|
|||
/*
|
||||
* This file ("GuiBookletBase.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.booklet.internal;
|
||||
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.item.ItemStack;
|
||||
public abstract class GuiBookletBase extends Screen {
|
||||
|
||||
public abstract class GuiBookletBase extends GuiScreen {
|
||||
protected GuiBookletBase(ITextComponent titleIn) {
|
||||
super(new StringTextComponent(""));
|
||||
}
|
||||
|
||||
public abstract void renderScaledAsciiString(String text, int x, int y, int color, boolean shadow, float scale);
|
||||
|
||||
public abstract void renderSplitScaledAsciiString(String text, int x, int y, int color, boolean shadow, float scale, int length);
|
||||
|
||||
public abstract List<GuiButton> getButtonList();
|
||||
public abstract List<Button> getButtonList();
|
||||
|
||||
public abstract int getGuiLeft();
|
||||
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
/*
|
||||
* This file ("FarmerResult.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.farmer;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
/*
|
||||
* This file ("IFarmerBehavior.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.farmer;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.internal.IFarmer;
|
||||
|
|
|
@ -1,17 +1,7 @@
|
|||
/*
|
||||
* This file ("IAtomicReconstructor.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.internal;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
|
||||
/**
|
||||
* This is a helper interface for Lens' invoke() method.
|
||||
|
@ -23,5 +13,5 @@ public interface IAtomicReconstructor extends IEnergyTile {
|
|||
|
||||
Lens getLens();
|
||||
|
||||
EnumFacing getOrientation();
|
||||
Direction getOrientation();
|
||||
}
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
/*
|
||||
* This file ("IEnergyTile.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.internal;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
@ -27,9 +17,14 @@ public interface IEnergyTile {
|
|||
|
||||
int getZ();
|
||||
|
||||
//TODO: Rename to getWorld
|
||||
/**
|
||||
* @deprecated use {@link #getWorld()}
|
||||
*/
|
||||
@Deprecated
|
||||
World getWorldObject();
|
||||
|
||||
World getWorld();
|
||||
|
||||
void extractEnergy(int amount);
|
||||
|
||||
int getEnergy();
|
||||
|
|
|
@ -1,19 +1,9 @@
|
|||
/*
|
||||
* This file ("IFarmer.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.internal;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This is a helper interface for IFarmerBehavior.
|
||||
|
@ -23,7 +13,7 @@ import net.minecraft.util.EnumFacing;
|
|||
*/
|
||||
public interface IFarmer extends IEnergyTile {
|
||||
|
||||
EnumFacing getOrientation();
|
||||
Direction getOrientation();
|
||||
|
||||
boolean canAddToSeeds(List<ItemStack> stacks);
|
||||
|
||||
|
|
|
@ -1,28 +1,17 @@
|
|||
/*
|
||||
* This file ("IMethodHandler.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.internal;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.potion.EffectInstance;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This is the internal method handler.
|
||||
* Use ActuallyAdditionsAPI.methodHandler for calling
|
||||
|
@ -32,15 +21,15 @@ public interface IMethodHandler {
|
|||
|
||||
boolean addEffectToStack(ItemStack stack, CoffeeIngredient ingredient);
|
||||
|
||||
PotionEffect getSameEffectFromStack(ItemStack stack, PotionEffect effect);
|
||||
EffectInstance getSameEffectFromStack(ItemStack stack, EffectInstance effect);
|
||||
|
||||
void addEffectProperties(ItemStack stack, PotionEffect effect, boolean addDur, boolean addAmp);
|
||||
void addEffectProperties(ItemStack stack, EffectInstance effect, boolean addDur, boolean addAmp);
|
||||
|
||||
void addEffectToStack(ItemStack stack, PotionEffect effect);
|
||||
void addEffectToStack(ItemStack stack, EffectInstance effect);
|
||||
|
||||
PotionEffect[] getEffectsFromStack(ItemStack stack);
|
||||
EffectInstance[] getEffectsFromStack(ItemStack stack);
|
||||
|
||||
boolean invokeConversionLens(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile);
|
||||
boolean invokeConversionLens(BlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile);
|
||||
|
||||
boolean invokeReconstructor(IAtomicReconstructor tile);
|
||||
|
||||
|
|
|
@ -1,23 +1,13 @@
|
|||
/*
|
||||
* This file ("IConnectionPair.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.laser;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public interface IConnectionPair {
|
||||
|
||||
void writeToNBT(NBTTagCompound compound);
|
||||
void writeToNBT(CompoundNBT compound);
|
||||
|
||||
void readFromNBT(NBTTagCompound compound);
|
||||
void readFromNBT(CompoundNBT compound);
|
||||
|
||||
BlockPos[] getPositions();
|
||||
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
/*
|
||||
* This file ("ILaserRelayConnectionHandler.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.laser;
|
||||
|
||||
import io.netty.util.internal.ConcurrentSet;
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
/*
|
||||
* This file ("LaserType.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.laser;
|
||||
|
||||
public enum LaserType {
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
/*
|
||||
* This file ("Network.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.laser;
|
||||
|
||||
import io.netty.util.internal.ConcurrentSet;
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
/*
|
||||
* This file ("ILensItem.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.lens;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,24 +1,16 @@
|
|||
/*
|
||||
* This file ("Lens.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.lens;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.registries.ForgeRegistryEntry;
|
||||
import net.minecraftforge.registries.IForgeRegistryEntry;
|
||||
|
||||
/**
|
||||
* This is the base class for a Reconstructor Lens Type (NOT THE ITEM!)
|
||||
*/
|
||||
public abstract class Lens {
|
||||
public abstract class Lens extends ForgeRegistryEntry<Lens> {
|
||||
|
||||
/**
|
||||
* Invokes the lens type's behavior on a block
|
||||
|
@ -27,7 +19,7 @@ public abstract class Lens {
|
|||
* @param tile The tile the lens was invoked from
|
||||
* @return If the Reconstructor should stop continuing (return false if you want it to go through blocks)
|
||||
*/
|
||||
public abstract boolean invoke(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile);
|
||||
public abstract boolean invoke(BlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile);
|
||||
|
||||
/**
|
||||
* Returns the color in an array of 3 float values that are r, g, b
|
||||
|
@ -42,7 +34,7 @@ public abstract class Lens {
|
|||
/**
|
||||
* @return If the lens can be invoked at the current time
|
||||
*/
|
||||
public boolean canInvoke(IAtomicReconstructor tile, EnumFacing sideToShootTo, int energyUsePerShot) {
|
||||
public boolean canInvoke(IAtomicReconstructor tile, Direction sideToShootTo, int energyUsePerShot) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,8 @@
|
|||
/*
|
||||
* This file ("LensConversion.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.lens;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
/**
|
||||
|
@ -25,7 +15,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
public class LensConversion extends Lens {
|
||||
|
||||
@Override
|
||||
public boolean invoke(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile) {
|
||||
public boolean invoke(BlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile) {
|
||||
return ActuallyAdditionsAPI.methodHandler.invokeConversionLens(hitState, hitBlock, tile);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,5 @@ public interface IDisableableItem {
|
|||
* If this returns true, assume the item is not registered with the game, but may still be instantiated.
|
||||
* @return If the item has not been registered with the Forge Registry.
|
||||
*/
|
||||
public boolean isDisabled();
|
||||
|
||||
boolean isDisabled();
|
||||
}
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
/*
|
||||
* This file ("IDisplayStandItem.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.misc;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
/*
|
||||
* This file ("IGoggles.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.misc;
|
||||
|
||||
public interface IGoggles {
|
||||
|
|
|
@ -1,14 +1,4 @@
|
|||
/*
|
||||
* This file ("package-info.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
@API(owner = ActuallyAdditionsAPI.MOD_ID, apiVersion = ActuallyAdditionsAPI.API_VERSION, provides = ActuallyAdditionsAPI.API_ID)
|
||||
// todo: not sure how to denote this anymore
|
||||
//@API(owner = ActuallyAdditionsAPI.MOD_ID, apiVersion = ActuallyAdditionsAPI.API_VERSION, provides = ActuallyAdditionsAPI.API_ID)
|
||||
package de.ellpeck.actuallyadditions.api;
|
||||
|
||||
import net.minecraftforge.fml.common.API;
|
|
@ -1,25 +0,0 @@
|
|||
/*
|
||||
* This file ("BallOfFurReturn.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.recipe;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.WeightedRandom;
|
||||
|
||||
public class BallOfFurReturn extends WeightedRandom.Item {
|
||||
|
||||
public final ItemStack returnItem;
|
||||
|
||||
public BallOfFurReturn(ItemStack returnItem, int chance) {
|
||||
super(chance);
|
||||
this.returnItem = returnItem;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
/*
|
||||
* This file ("CoffeeIngredient.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.recipe;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
||||
public class CoffeeIngredient {
|
||||
|
||||
protected final Ingredient input;
|
||||
protected final int maxAmplifier;
|
||||
protected PotionEffect[] effects;
|
||||
|
||||
@Deprecated
|
||||
public CoffeeIngredient(ItemStack input, PotionEffect[] effects, int maxAmplifier) {
|
||||
this(Ingredient.fromStacks(input), maxAmplifier, effects);
|
||||
}
|
||||
|
||||
public CoffeeIngredient(Ingredient input, int maxAmplifier, PotionEffect... effects) {
|
||||
this.input = input;
|
||||
this.effects = effects;
|
||||
this.maxAmplifier = maxAmplifier;
|
||||
}
|
||||
|
||||
public boolean matches(ItemStack stack) {
|
||||
return this.input.apply(stack);
|
||||
}
|
||||
|
||||
public Ingredient getInput() {
|
||||
return this.input;
|
||||
}
|
||||
|
||||
public PotionEffect[] getEffects() {
|
||||
return this.effects;
|
||||
}
|
||||
|
||||
public boolean effect(ItemStack stack) {
|
||||
return ActuallyAdditionsAPI.methodHandler.addEffectToStack(stack, this);
|
||||
}
|
||||
|
||||
public String getExtraText() {
|
||||
return "";
|
||||
}
|
||||
|
||||
public int getMaxAmplifier() {
|
||||
return this.maxAmplifier;
|
||||
}
|
||||
}
|
|
@ -1,17 +1,7 @@
|
|||
/*
|
||||
* This file ("ColorLensChangerByDyeMeta.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.recipe;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
|
@ -21,11 +11,14 @@ import net.minecraft.util.math.BlockPos;
|
|||
*/
|
||||
public class ColorLensChangerByDyeMeta implements IColorLensChanger {
|
||||
|
||||
/**
|
||||
* @todo: this is very very likely to no longer work...
|
||||
*/
|
||||
@Override
|
||||
public ItemStack modifyItem(ItemStack stack, IBlockState hitBlockState, BlockPos hitBlock, IAtomicReconstructor tile) {
|
||||
public ItemStack modifyItem(ItemStack stack, BlockState hitBlockState, BlockPos hitBlock, IAtomicReconstructor tile) {
|
||||
ItemStack newStack = stack.copy();
|
||||
int meta = newStack.getItemDamage();
|
||||
newStack.setItemDamage((meta + 1) % 16);
|
||||
int meta = newStack.getDamage();
|
||||
newStack.setDamage((meta + 1) % 16);
|
||||
return newStack;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
* This file ("CompostRecipe.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.recipe;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
|
||||
public class CompostRecipe {
|
||||
|
||||
protected final Ingredient input;
|
||||
protected final ItemStack output;
|
||||
protected final IBlockState inputDisplay;
|
||||
protected final IBlockState outputDisplay;
|
||||
|
||||
@Deprecated
|
||||
public CompostRecipe(ItemStack input, Block inputDisplay, ItemStack output, Block outputDisplay) {
|
||||
this(Ingredient.fromStacks(input), inputDisplay.getDefaultState(), output, outputDisplay.getDefaultState());
|
||||
}
|
||||
|
||||
public CompostRecipe(Ingredient input, IBlockState inputDisplay, ItemStack output, IBlockState outputDisplay) {
|
||||
this.input = input;
|
||||
this.output = output;
|
||||
this.inputDisplay = inputDisplay;
|
||||
this.outputDisplay = outputDisplay;
|
||||
}
|
||||
|
||||
public boolean matches(ItemStack stack) {
|
||||
return this.input.apply(stack);
|
||||
}
|
||||
|
||||
public Ingredient getInput() {
|
||||
return this.input;
|
||||
}
|
||||
|
||||
public ItemStack getOutput() {
|
||||
return this.output;
|
||||
}
|
||||
|
||||
public IBlockState getInputDisplay() {
|
||||
return this.inputDisplay;
|
||||
}
|
||||
|
||||
public IBlockState getOutputDisplay() {
|
||||
return this.outputDisplay;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
/*
|
||||
* This file ("CrusherRecipe.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.recipe;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
|
||||
public class CrusherRecipe {
|
||||
|
||||
protected Ingredient input;
|
||||
protected ItemStack outputOne;
|
||||
protected ItemStack outputTwo;
|
||||
protected int outputChance;
|
||||
|
||||
@Deprecated
|
||||
public CrusherRecipe(ItemStack input, ItemStack outputOne, ItemStack outputTwo, int outputChance) {
|
||||
this(Ingredient.fromStacks(input), outputOne, outputTwo, outputChance);
|
||||
}
|
||||
|
||||
public CrusherRecipe(Ingredient input, ItemStack outputOne, ItemStack outputTwo, int outputChance) {
|
||||
this.input = input;
|
||||
this.outputOne = outputOne;
|
||||
this.outputTwo = outputTwo;
|
||||
this.outputChance = outputChance;
|
||||
}
|
||||
|
||||
public boolean matches(ItemStack stack) {
|
||||
return this.input.apply(stack);
|
||||
}
|
||||
|
||||
public ItemStack getOutputOne() {
|
||||
return this.outputOne;
|
||||
}
|
||||
|
||||
public ItemStack getOutputTwo() {
|
||||
return this.outputTwo;
|
||||
}
|
||||
|
||||
public int getSecondChance() {
|
||||
return this.outputChance;
|
||||
}
|
||||
|
||||
public Ingredient getInput() {
|
||||
return this.input;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,21 +1,11 @@
|
|||
/*
|
||||
* This file ("EmpowererRecipe.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.recipe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class EmpowererRecipe {
|
||||
|
||||
protected final Ingredient input;
|
||||
|
@ -48,21 +38,21 @@ public class EmpowererRecipe {
|
|||
}
|
||||
|
||||
public boolean matches(ItemStack base, ItemStack stand1, ItemStack stand2, ItemStack stand3, ItemStack stand4) {
|
||||
if (!this.input.apply(base)) return false;
|
||||
if (!this.input.test(base)) return false;
|
||||
List<Ingredient> matches = new ArrayList<>();
|
||||
ItemStack[] stacks = { stand1, stand2, stand3, stand4 };
|
||||
boolean[] unused = { true, true, true, true };
|
||||
for (ItemStack s : stacks) {
|
||||
if (unused[0] && this.modifier1.apply(s)) {
|
||||
if (unused[0] && this.modifier1.test(s)) {
|
||||
matches.add(this.modifier1);
|
||||
unused[0] = false;
|
||||
} else if (unused[1] && this.modifier2.apply(s)) {
|
||||
} else if (unused[1] && this.modifier2.test(s)) {
|
||||
matches.add(this.modifier2);
|
||||
unused[1] = false;
|
||||
} else if (unused[2] && this.modifier3.apply(s)) {
|
||||
} else if (unused[2] && this.modifier3.test(s)) {
|
||||
matches.add(this.modifier3);
|
||||
unused[2] = false;
|
||||
} else if (unused[3] && this.modifier4.apply(s)) {
|
||||
} else if (unused[3] && this.modifier4.test(s)) {
|
||||
matches.add(this.modifier4);
|
||||
unused[3] = false;
|
||||
}
|
||||
|
|
|
@ -1,17 +1,7 @@
|
|||
/*
|
||||
* This file ("IColorLensChanger.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.recipe;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
|
@ -35,6 +25,6 @@ public interface IColorLensChanger {
|
|||
* @param tile the Reconstructor doing the color conversion
|
||||
* @return the modified stack. Please make sure to return a modified COPY of the input stack.
|
||||
*/
|
||||
ItemStack modifyItem(ItemStack stack, IBlockState hitBlockState, BlockPos hitBlock, IAtomicReconstructor tile);
|
||||
ItemStack modifyItem(ItemStack stack, BlockState hitBlockState, BlockPos hitBlock, IAtomicReconstructor tile);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,18 +1,8 @@
|
|||
/*
|
||||
* This file ("LensConversionRecipe.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.recipe;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
@ -37,7 +27,7 @@ public class LensConversionRecipe {
|
|||
}
|
||||
|
||||
public boolean matches(ItemStack input, Lens lens) {
|
||||
return this.input.apply(input) && this.type == lens;
|
||||
return this.input.test(input) && this.type == lens;
|
||||
}
|
||||
|
||||
public Ingredient getInput() {
|
||||
|
@ -56,6 +46,6 @@ public class LensConversionRecipe {
|
|||
return this.type;
|
||||
}
|
||||
|
||||
public void transformHook(ItemStack stack, IBlockState state, BlockPos pos, IAtomicReconstructor tile) {
|
||||
public void transformHook(ItemStack stack, BlockState state, BlockPos pos, IAtomicReconstructor tile) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
/*
|
||||
* This file ("OilGenRecipe.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.recipe;
|
||||
|
||||
public class OilGenRecipe {
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
/*
|
||||
* This file ("TreasureChestLoot.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.recipe;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
/*
|
||||
* This file ("WeightedOre.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.recipe;
|
||||
|
||||
import net.minecraft.util.WeightedRandom;
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
/*
|
||||
* This file ("IPhantomTile.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.api.tile;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
|
|
@ -1,14 +1,4 @@
|
|||
/*
|
||||
* This file ("InitBooklet.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet;
|
||||
package de.ellpeck.actuallyadditions.booklet;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -20,68 +10,68 @@ import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
|||
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.chapter.BookletChapter;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.chapter.BookletChapterCoffee;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.chapter.BookletChapterCrusher;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.chapter.BookletChapterTrials;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntry;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntryAllItems;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntryTrials;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.BookletPage;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PageCrafting;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PageCrusherRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PageEmpowerer;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PageFurnace;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PageLinkButton;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PageReconstructor;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PageTextOnly;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.BlockCrafting;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.CrusherCrafting;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.FoodCrafting;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.ItemCrafting;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.MiscCrafting;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.ToolCrafting;
|
||||
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
|
||||
import de.ellpeck.actuallyadditions.mod.gen.AAWorldGen;
|
||||
import de.ellpeck.actuallyadditions.mod.gen.WorldGenLushCaves;
|
||||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.mod.items.ItemWingsOfTheBats;
|
||||
import de.ellpeck.actuallyadditions.mod.items.lens.LensDisenchanting;
|
||||
import de.ellpeck.actuallyadditions.mod.items.lens.LensRecipeHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
|
||||
import de.ellpeck.actuallyadditions.mod.recipe.EmpowererHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFireworkBox;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceDouble;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceSolar;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityHeatCollector;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergy;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergyAdvanced;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergyExtreme;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLavaFactoryController;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLeafGenerator;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityMiner;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomPlacer;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomface;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityShockSuppressor;
|
||||
import de.ellpeck.actuallyadditions.mod.update.UpdateChecker;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.metalists.TheColoredLampColors;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.metalists.TheMiscBlocks;
|
||||
import de.ellpeck.actuallyadditions.booklet.chapter.BookletChapter;
|
||||
import de.ellpeck.actuallyadditions.booklet.chapter.BookletChapterCoffee;
|
||||
import de.ellpeck.actuallyadditions.booklet.chapter.BookletChapterCrusher;
|
||||
import de.ellpeck.actuallyadditions.booklet.chapter.BookletChapterTrials;
|
||||
import de.ellpeck.actuallyadditions.booklet.entry.BookletEntry;
|
||||
import de.ellpeck.actuallyadditions.booklet.entry.BookletEntryAllItems;
|
||||
import de.ellpeck.actuallyadditions.booklet.entry.BookletEntryTrials;
|
||||
import de.ellpeck.actuallyadditions.booklet.page.BookletPage;
|
||||
import de.ellpeck.actuallyadditions.booklet.page.PageCrafting;
|
||||
import de.ellpeck.actuallyadditions.booklet.page.PageCrusherRecipe;
|
||||
import de.ellpeck.actuallyadditions.booklet.page.PageEmpowerer;
|
||||
import de.ellpeck.actuallyadditions.booklet.page.PageFurnace;
|
||||
import de.ellpeck.actuallyadditions.booklet.page.PageLinkButton;
|
||||
import de.ellpeck.actuallyadditions.booklet.page.PagePicture;
|
||||
import de.ellpeck.actuallyadditions.booklet.page.PageReconstructor;
|
||||
import de.ellpeck.actuallyadditions.booklet.page.PageTextOnly;
|
||||
import de.ellpeck.actuallyadditions.common.config.values.ConfigIntValues;
|
||||
import de.ellpeck.actuallyadditions.common.crafting.BlockCrafting;
|
||||
import de.ellpeck.actuallyadditions.common.crafting.CrusherCrafting;
|
||||
import de.ellpeck.actuallyadditions.common.crafting.FoodCrafting;
|
||||
import de.ellpeck.actuallyadditions.common.crafting.ItemCrafting;
|
||||
import de.ellpeck.actuallyadditions.common.crafting.MiscCrafting;
|
||||
import de.ellpeck.actuallyadditions.common.crafting.ToolCrafting;
|
||||
import de.ellpeck.actuallyadditions.common.fluids.InitFluids;
|
||||
import de.ellpeck.actuallyadditions.common.gen.AAWorldGen;
|
||||
import de.ellpeck.actuallyadditions.common.gen.WorldGenLushCaves;
|
||||
import de.ellpeck.actuallyadditions.common.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.common.items.ItemWingsOfTheBats;
|
||||
import de.ellpeck.actuallyadditions.common.items.lens.LensDisenchanting;
|
||||
import de.ellpeck.actuallyadditions.common.items.lens.LensRecipeHandler;
|
||||
import de.ellpeck.actuallyadditions.common.items.metalists.TheCrystals;
|
||||
import de.ellpeck.actuallyadditions.common.items.metalists.TheFoods;
|
||||
import de.ellpeck.actuallyadditions.common.items.metalists.TheMiscItems;
|
||||
import de.ellpeck.actuallyadditions.common.recipe.EmpowererHandler;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityCoalGenerator;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityCoffeeMachine;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityDirectionalBreaker;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityFireworkBox;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityFurnaceDouble;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityFurnaceSolar;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityGrinder;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityHeatCollector;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityItemRepairer;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityLaserRelay;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityLaserRelayEnergy;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityLaserRelayEnergyAdvanced;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityLaserRelayEnergyExtreme;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityLavaFactoryController;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityLeafGenerator;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityMiner;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityPhantomPlacer;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityPhantomface;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityPlayerInterface;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityRangedCollector;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityShockSuppressor;
|
||||
import de.ellpeck.actuallyadditions.common.update.UpdateChecker;
|
||||
import de.ellpeck.actuallyadditions.common.util.Util;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
|
@ -1,27 +1,17 @@
|
|||
/*
|
||||
* This file ("BookmarkButton.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.button;
|
||||
package de.ellpeck.actuallyadditions.booklet.button;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiPage;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.booklet.gui.GuiPage;
|
||||
import de.ellpeck.actuallyadditions.booklet.misc.BookletUtils;
|
||||
import de.ellpeck.actuallyadditions.common.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
|
@ -1,19 +1,9 @@
|
|||
/*
|
||||
* This file ("EntryButton.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.button;
|
||||
package de.ellpeck.actuallyadditions.booklet.button;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
|
@ -1,19 +1,9 @@
|
|||
/*
|
||||
* This file ("TrialsButton.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
package de.ellpeck.actuallyadditions.booklet.button;
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.button;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.gui.TexturedButton;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.common.inventory.gui.TexturedButton;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public class TrialsButton extends TexturedButton {
|
|
@ -1,21 +1,11 @@
|
|||
/*
|
||||
* This file ("BookletChapter.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.chapter;
|
||||
package de.ellpeck.actuallyadditions.booklet.chapter;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.misc.IDisableableItem;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
|
@ -1,14 +1,4 @@
|
|||
/*
|
||||
* This file ("BookletChapterCoffee.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.chapter;
|
||||
package de.ellpeck.actuallyadditions.booklet.chapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -17,10 +7,9 @@ import java.util.List;
|
|||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.BookletPage;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PageCoffeeMachine;
|
||||
import de.ellpeck.actuallyadditions.mod.items.ItemCoffee;
|
||||
import de.ellpeck.actuallyadditions.booklet.page.BookletPage;
|
||||
import de.ellpeck.actuallyadditions.booklet.page.PageCoffeeMachine;
|
||||
import de.ellpeck.actuallyadditions.common.items.ItemCoffee;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BookletChapterCoffee extends BookletChapter {
|
|
@ -1,14 +1,4 @@
|
|||
/*
|
||||
* This file ("BookletChapterCrusher.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.chapter;
|
||||
package de.ellpeck.actuallyadditions.booklet.chapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -16,9 +6,8 @@ import java.util.List;
|
|||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PageCrusherRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.CrusherCrafting;
|
||||
import de.ellpeck.actuallyadditions.booklet.page.PageCrusherRecipe;
|
||||
import de.ellpeck.actuallyadditions.common.crafting.CrusherCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BookletChapterCrusher extends BookletChapter {
|
|
@ -1,20 +1,10 @@
|
|||
/*
|
||||
* This file ("BookletChapterTrials.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.chapter;
|
||||
package de.ellpeck.actuallyadditions.booklet.chapter;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PageTrials;
|
||||
import de.ellpeck.actuallyadditions.mod.data.PlayerData;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.booklet.page.PageTrials;
|
||||
import de.ellpeck.actuallyadditions.common.data.PlayerData;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
|
@ -1,14 +1,4 @@
|
|||
/*
|
||||
* This file ("BookletEntry.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.entry;
|
||||
package de.ellpeck.actuallyadditions.booklet.entry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -18,9 +8,9 @@ import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
|||
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.common.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.item.ItemStack;
|
|
@ -1,14 +1,4 @@
|
|||
/*
|
||||
* This file ("BookletEntryAllItems.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.entry;
|
||||
package de.ellpeck.actuallyadditions.booklet.entry;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package de.ellpeck.actuallyadditions.booklet.entry;
|
||||
|
||||
public class BookletEntryTrials extends BookletEntry {
|
||||
|
||||
public BookletEntryTrials(String identifier) {
|
||||
super(identifier, -Integer.MAX_VALUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visibleOnFrontPage() {
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -1,14 +1,4 @@
|
|||
/*
|
||||
* This file ("GuiBooklet.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.gui;
|
||||
package de.ellpeck.actuallyadditions.booklet.gui;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
@ -20,16 +10,16 @@ import org.lwjgl.input.Mouse;
|
|||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.button.BookmarkButton;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.button.TrialsButton;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
|
||||
import de.ellpeck.actuallyadditions.mod.data.PlayerData;
|
||||
import de.ellpeck.actuallyadditions.mod.data.PlayerData.PlayerSave;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.gui.TexturedButton;
|
||||
import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.booklet.button.BookmarkButton;
|
||||
import de.ellpeck.actuallyadditions.booklet.button.TrialsButton;
|
||||
import de.ellpeck.actuallyadditions.common.config.values.ConfigIntValues;
|
||||
import de.ellpeck.actuallyadditions.common.data.PlayerData;
|
||||
import de.ellpeck.actuallyadditions.common.data.PlayerData.PlayerSave;
|
||||
import de.ellpeck.actuallyadditions.common.inventory.gui.TexturedButton;
|
||||
import de.ellpeck.actuallyadditions.common.network.PacketHandlerHelper;
|
||||
import de.ellpeck.actuallyadditions.common.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
|
@ -1,14 +1,4 @@
|
|||
/*
|
||||
* This file ("GuiEntry.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.gui;
|
||||
package de.ellpeck.actuallyadditions.booklet.gui;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
@ -17,9 +7,9 @@ import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
|||
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.button.EntryButton;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntryTrials;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils;
|
||||
import de.ellpeck.actuallyadditions.booklet.button.EntryButton;
|
||||
import de.ellpeck.actuallyadditions.booklet.entry.BookletEntryTrials;
|
||||
import de.ellpeck.actuallyadditions.booklet.misc.BookletUtils;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.item.ItemStack;
|
|
@ -8,7 +8,7 @@
|
|||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.gui;
|
||||
package de.ellpeck.actuallyadditions.booklet.gui;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
@ -16,16 +16,16 @@ import java.util.List;
|
|||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.InitBooklet;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.button.EntryButton;
|
||||
import de.ellpeck.actuallyadditions.mod.config.GuiConfiguration;
|
||||
import de.ellpeck.actuallyadditions.mod.data.PlayerData;
|
||||
import de.ellpeck.actuallyadditions.mod.data.PlayerData.PlayerSave;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.gui.TexturedButton;
|
||||
import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.booklet.InitBooklet;
|
||||
import de.ellpeck.actuallyadditions.booklet.button.EntryButton;
|
||||
import de.ellpeck.actuallyadditions.common.config.GuiConfiguration;
|
||||
import de.ellpeck.actuallyadditions.common.data.PlayerData;
|
||||
import de.ellpeck.actuallyadditions.common.data.PlayerData.PlayerSave;
|
||||
import de.ellpeck.actuallyadditions.common.inventory.gui.TexturedButton;
|
||||
import de.ellpeck.actuallyadditions.common.network.PacketHandlerHelper;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.Util;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.item.ItemStack;
|
|
@ -1,14 +1,4 @@
|
|||
/*
|
||||
* This file ("GuiPage.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.gui;
|
||||
package de.ellpeck.actuallyadditions.booklet.gui;
|
||||
|
||||
import java.awt.Desktop;
|
||||
import java.io.IOException;
|
||||
|
@ -20,11 +10,11 @@ import java.util.List;
|
|||
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.ItemDisplay;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.gui.TexturedButton;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.booklet.misc.BookletUtils;
|
||||
import de.ellpeck.actuallyadditions.booklet.page.ItemDisplay;
|
||||
import de.ellpeck.actuallyadditions.common.inventory.gui.TexturedButton;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
|
@ -1,14 +1,4 @@
|
|||
/*
|
||||
* This file ("BookletUtils.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.misc;
|
||||
package de.ellpeck.actuallyadditions.booklet.misc;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -16,10 +6,10 @@ import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
|||
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiEntry;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiMainPage;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiPage;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.booklet.gui.GuiEntry;
|
||||
import de.ellpeck.actuallyadditions.booklet.gui.GuiMainPage;
|
||||
import de.ellpeck.actuallyadditions.booklet.gui.GuiPage;
|
||||
import de.ellpeck.actuallyadditions.common.util.ItemUtil;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
|
@ -1,19 +1,9 @@
|
|||
/*
|
||||
* This file ("GuiAAAchievements.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
//TODO Achievement GUI?
|
||||
/*
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.misc;
|
||||
package de.ellpeck.actuallyadditions.booklet.misc;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.common.achievement.InitAchievements;
|
||||
import de.ellpeck.actuallyadditions.common.util.ModUtil;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.achievement.GuiAchievements;
|
||||
import net.minecraft.stats.StatisticsManager;
|
|
@ -1,14 +1,4 @@
|
|||
/*
|
||||
* This file ("BookletPage.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.page;
|
||||
package de.ellpeck.actuallyadditions.booklet.page;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
@ -19,8 +9,8 @@ import java.util.Map;
|
|||
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -28,7 +18,7 @@ import net.minecraft.util.text.TextFormatting;
|
|||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.relauncher.OnlyIn;
|
||||
|
||||
public class BookletPage implements IBookletPage {
|
||||
|
||||
|
@ -70,7 +60,7 @@ public class BookletPage implements IBookletPage {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Side.CLIENT)
|
||||
public String getInfoText() {
|
||||
if (this.hasNoText) { return null; }
|
||||
|
||||
|
@ -88,55 +78,55 @@ public class BookletPage implements IBookletPage {
|
|||
return base;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Side.CLIENT)
|
||||
protected String getLocalizationKey() {
|
||||
return "booklet." + ActuallyAdditions.MODID + ".chapter." + this.chapter.getIdentifier() + ".text." + this.localizationKey;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Side.CLIENT)
|
||||
public void mouseClicked(GuiBookletBase gui, int mouseX, int mouseY, int mouseButton) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Side.CLIENT)
|
||||
public void mouseReleased(GuiBookletBase gui, int mouseX, int mouseY, int state) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Side.CLIENT)
|
||||
public void mouseClickMove(GuiBookletBase gui, int mouseX, int mouseY, int clickedMouseButton, long timeSinceLastClick) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Side.CLIENT)
|
||||
public void actionPerformed(GuiBookletBase gui, GuiButton button) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Side.CLIENT)
|
||||
public void initGui(GuiBookletBase gui, int startX, int startY) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Side.CLIENT)
|
||||
public void updateScreen(GuiBookletBase gui, int startX, int startY, int pageTimer) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Side.CLIENT)
|
||||
public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@OnlyIn(Side.CLIENT)
|
||||
public void drawScreenPost(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) {
|
||||
|
||||
}
|
|
@ -1,24 +1,14 @@
|
|||
/*
|
||||
* This file ("ItemDisplay.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.page;
|
||||
package de.ellpeck.actuallyadditions.booklet.page;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiPage;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.booklet.gui.GuiPage;
|
||||
import de.ellpeck.actuallyadditions.booklet.misc.BookletUtils;
|
||||
import de.ellpeck.actuallyadditions.common.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.util.ITooltipFlag.TooltipFlags;
|
|
@ -1,23 +1,12 @@
|
|||
/*
|
||||
* This file ("PageCoffeeMachine.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.page;
|
||||
package de.ellpeck.actuallyadditions.booklet.page;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
|
||||
import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.common.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.common.items.metalists.TheMiscItems;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.client.config.GuiUtils;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
|
@ -1,26 +1,16 @@
|
|||
/*
|
||||
* This file ("PageCrafting.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.page;
|
||||
package de.ellpeck.actuallyadditions.booklet.page;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.mod.util.RefHelp;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import de.ellpeck.actuallyadditions.mod.util.crafting.BlankRecipe;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.common.util.RefHelp;
|
||||
import de.ellpeck.actuallyadditions.common.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.Util;
|
||||
import de.ellpeck.actuallyadditions.common.util.crafting.BlankRecipe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
|
@ -1,23 +1,12 @@
|
|||
/*
|
||||
* This file ("PageCrusherRecipe.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.page;
|
||||
package de.ellpeck.actuallyadditions.booklet.page;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.common.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.client.config.GuiUtils;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
|
@ -1,22 +1,12 @@
|
|||
/*
|
||||
* This file ("PageEmpowerer.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.page;
|
||||
package de.ellpeck.actuallyadditions.booklet.page;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.client.config.GuiUtils;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
|
@ -1,23 +1,13 @@
|
|||
/*
|
||||
* This file ("PageFurnace.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.page;
|
||||
package de.ellpeck.actuallyadditions.booklet.page;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.common.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraftforge.fml.client.config.GuiUtils;
|
|
@ -1,21 +1,11 @@
|
|||
/*
|
||||
* This file ("PageLinkButton.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.page;
|
||||
package de.ellpeck.actuallyadditions.booklet.page;
|
||||
|
||||
import java.awt.Desktop;
|
||||
import java.net.URI;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
@ -1,17 +1,7 @@
|
|||
/*
|
||||
* This file ("PagePicture.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.page;
|
||||
package de.ellpeck.actuallyadditions.booklet.page;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.AssetUtil;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.client.config.GuiUtils;
|
|
@ -1,23 +1,13 @@
|
|||
/*
|
||||
* This file ("PageReconstructor.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.page;
|
||||
package de.ellpeck.actuallyadditions.booklet.page;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.Util;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.client.config.GuiUtils;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
|
@ -1,14 +1,4 @@
|
|||
/*
|
||||
* This file ("PageTextOnly.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.page;
|
||||
package de.ellpeck.actuallyadditions.booklet.page;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
|
@ -1,21 +1,11 @@
|
|||
/*
|
||||
* This file ("PageTrials.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.booklet.page;
|
||||
package de.ellpeck.actuallyadditions.booklet.page;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.data.PlayerData;
|
||||
import de.ellpeck.actuallyadditions.mod.data.PlayerData.PlayerSave;
|
||||
import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.common.data.PlayerData;
|
||||
import de.ellpeck.actuallyadditions.common.data.PlayerData.PlayerSave;
|
||||
import de.ellpeck.actuallyadditions.common.network.PacketHandlerHelper;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
|
@ -0,0 +1,7 @@
|
|||
package de.ellpeck.actuallyadditions.client;
|
||||
|
||||
import net.minecraftforge.fml.client.gui.GuiUtils;
|
||||
|
||||
public class ClientSetup {
|
||||
GuiUtils
|
||||
}
|
|
@ -0,0 +1,194 @@
|
|||
package de.ellpeck.actuallyadditions.common;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import de.ellpeck.actuallyadditions.booklet.InitBooklet;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.common.config.ConfigurationHandler;
|
||||
import de.ellpeck.actuallyadditions.common.crafting.CrusherCrafting;
|
||||
import de.ellpeck.actuallyadditions.common.data.WorldData;
|
||||
import de.ellpeck.actuallyadditions.common.entity.InitEntities;
|
||||
import de.ellpeck.actuallyadditions.common.event.CommonEvents;
|
||||
import de.ellpeck.actuallyadditions.common.fluids.InitFluids;
|
||||
import de.ellpeck.actuallyadditions.common.gen.AAWorldGen;
|
||||
import de.ellpeck.actuallyadditions.common.inventory.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.common.items.ItemCoffee;
|
||||
import de.ellpeck.actuallyadditions.common.items.lens.LensMining;
|
||||
import de.ellpeck.actuallyadditions.common.items.lens.LensRecipeHandler;
|
||||
import de.ellpeck.actuallyadditions.common.items.lens.Lenses;
|
||||
import de.ellpeck.actuallyadditions.common.material.InitArmorMaterials;
|
||||
import de.ellpeck.actuallyadditions.common.material.InitToolMaterials;
|
||||
import de.ellpeck.actuallyadditions.common.misc.BannerHelper;
|
||||
import de.ellpeck.actuallyadditions.common.misc.DungeonLoot;
|
||||
import de.ellpeck.actuallyadditions.common.misc.apiimpl.LaserRelayConnectionHandler;
|
||||
import de.ellpeck.actuallyadditions.common.misc.apiimpl.MethodHandler;
|
||||
import de.ellpeck.actuallyadditions.common.network.PacketHandler;
|
||||
import de.ellpeck.actuallyadditions.common.proxy.IProxy;
|
||||
import de.ellpeck.actuallyadditions.common.recipe.EmpowererHandler;
|
||||
import de.ellpeck.actuallyadditions.common.recipe.HairyBallHandler;
|
||||
import de.ellpeck.actuallyadditions.common.recipe.TreasureChestHandler;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityBase;
|
||||
import de.ellpeck.actuallyadditions.common.update.UpdateChecker;
|
||||
import de.ellpeck.actuallyadditions.common.util.compat.CompatUtil;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.event.server.FMLServerStartedEvent;
|
||||
import net.minecraftforge.fml.event.server.FMLServerStoppedEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.ForgeRegistry;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import net.minecraftforge.registries.RegistryBuilder;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@Mod(ActuallyAdditions.MODID)
|
||||
public class ActuallyAdditions {
|
||||
|
||||
public static final String MODID = ActuallyAdditionsAPI.MOD_ID;
|
||||
public static final String NAME = "Actually Additions";
|
||||
// public static final String VERSION = "@VERSION@";
|
||||
// public static final String GUIFACTORY = "de.ellpeck.actuallyadditions.common.config.GuiFactory";
|
||||
// public static final String DEPS = "required:forge@[14.23.5.2836,);before:craftingtweaks;after:fastbench@[1.3.2,)";
|
||||
// public static final boolean DEOBF = (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");
|
||||
|
||||
public static final Logger LOGGER = LogManager.getLogger(MODID);
|
||||
public static ActuallyAdditions INSTANCE;
|
||||
|
||||
public static boolean commonCapsLoaded = false;
|
||||
|
||||
// Creative Tab
|
||||
public static ItemGroup aaGroup = new ItemGroup(MODID) {
|
||||
@Override
|
||||
public ItemStack createIcon() {
|
||||
return new ItemStack(Items.PACKED_ICE); // placeholder until I've done the actual stuff @todo
|
||||
}
|
||||
};
|
||||
|
||||
public ActuallyAdditions() {
|
||||
INSTANCE = this;
|
||||
|
||||
IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus();
|
||||
|
||||
// Register registers
|
||||
InitBlocks.BLOCKS.register(bus);
|
||||
// items
|
||||
Lenses.LENSES.register(bus);
|
||||
|
||||
bus.addListener(this::setup);
|
||||
bus.addListener(this::clientSetup);
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
private void setup(final FMLCommonSetupEvent event) {
|
||||
|
||||
}
|
||||
|
||||
private void clientSetup(final FMLClientSetupEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void serverStarted(FMLServerStartedEvent event) {
|
||||
// todo: come back to this if it's still needed after migrating the world save to a newer version
|
||||
|
||||
// MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
// if (server != null) {
|
||||
// World world = server.getEntityWorld();
|
||||
// if (world != null && !world.isRemote) {
|
||||
// WorldData.get(world, true).markDirty();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void serverStopped(FMLServerStoppedEvent event) {
|
||||
WorldData.clear();
|
||||
}
|
||||
|
||||
|
||||
@SidedProxy(clientSide = "de.ellpeck.actuallyadditions.common.proxy.ClientProxy", serverSide = "de.ellpeck.actuallyadditions.common.proxy.ServerProxy")
|
||||
public static IProxy PROXY;
|
||||
|
||||
static {
|
||||
FluidRegistry.enableUniversalBucket();
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
ActuallyAdditions.LOGGER.info("Starting PreInitialization Phase...");
|
||||
|
||||
ActuallyAdditionsAPI.methodHandler = new MethodHandler();
|
||||
ActuallyAdditionsAPI.connectionHandler = new LaserRelayConnectionHandler();
|
||||
InitBooklet.preInit();
|
||||
CompatUtil.registerCraftingTweaks();
|
||||
|
||||
// commonCapsLoaded = Loader.isModLoaded("commoncapabilities");
|
||||
// MinecraftForge.EVENT_BUS.register(new RegistryHandler());
|
||||
|
||||
new ConfigurationHandler(event.getSuggestedConfigurationFile());
|
||||
PacketHandler.init();
|
||||
InitToolMaterials.init();
|
||||
InitArmorMaterials.init();
|
||||
InitFluids.init();
|
||||
new UpdateChecker();
|
||||
PROXY.preInit(event);
|
||||
|
||||
ActuallyAdditions.LOGGER.info("PreInitialization Finished.");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent event) {
|
||||
ActuallyAdditions.LOGGER.info("Starting Initialization Phase...");
|
||||
|
||||
BannerHelper.init();
|
||||
//InitAchievements.init();
|
||||
GuiHandler.init();
|
||||
AAWorldGen gen = new AAWorldGen();
|
||||
GameRegistry.registerWorldGenerator(gen, 10000);
|
||||
MinecraftForge.TERRAIN_GEN_BUS.register(gen);
|
||||
TileEntityBase.init();
|
||||
MinecraftForge.EVENT_BUS.register(new CommonEvents());
|
||||
MinecraftForge.EVENT_BUS.register(new DungeonLoot());
|
||||
InitEntities.init();
|
||||
|
||||
PROXY.init(event);
|
||||
|
||||
RegistryHandler.BLOCKS_TO_REGISTER.clear();
|
||||
|
||||
ActuallyAdditions.LOGGER.info("Initialization Finished.");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
ActuallyAdditions.LOGGER.info("Starting PostInitialization Phase...");
|
||||
|
||||
ItemCoffee.initIngredients();
|
||||
CrusherCrafting.init();
|
||||
HairyBallHandler.init();
|
||||
TreasureChestHandler.init();
|
||||
LensRecipeHandler.init();
|
||||
EmpowererHandler.init();
|
||||
LensMining.init();
|
||||
|
||||
InitBooklet.postInit();
|
||||
PROXY.postInit(event);
|
||||
|
||||
ConfigurationHandler.redefineConfigs();
|
||||
|
||||
ActuallyAdditions.LOGGER.info("PostInitialization Finished.");
|
||||
}
|
||||
}
|
|
@ -1,24 +1,24 @@
|
|||
package de.ellpeck.actuallyadditions.mod;
|
||||
package de.ellpeck.actuallyadditions.common;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.render.ActualCompostModel;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.render.CompostModel;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.render.IHasModel;
|
||||
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
|
||||
import de.ellpeck.actuallyadditions.mod.util.FluidStateMapper;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.render.ActualCompostModel;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.render.CompostModel;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.render.IHasModel;
|
||||
import de.ellpeck.actuallyadditions.common.fluids.InitFluids;
|
||||
import de.ellpeck.actuallyadditions.common.util.FluidStateMapper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.block.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.model.ModelResourceLocation;
|
||||
import net.minecraft.fluid.Fluid;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.client.event.ModelRegistryEvent;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class ClientRegistryHandler {
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package de.ellpeck.actuallyadditions.common;
|
||||
|
||||
//Class to wrap around the trainwreck that is the new registry system
|
||||
// @todo: remove this completely
|
||||
@Deprecated
|
||||
public class RegistryHandler {
|
||||
//
|
||||
// public static final List<Block> BLOCKS_TO_REGISTER = new ArrayList<>();
|
||||
// public static final List<Item> ITEMS_TO_REGISTER = new ArrayList<>();
|
||||
// public static final List<SoundEvent> SOUNDS_TO_REGISTER = new ArrayList<>();
|
||||
// public static final List<IRecipe> RECIPES_TO_REGISTER = new ArrayList<>();
|
||||
//
|
||||
// @SubscribeEvent
|
||||
// public void onBlockRegistry(Register<Block> event) {
|
||||
// InitBlocks.init();
|
||||
//
|
||||
// for (Block block : BLOCKS_TO_REGISTER) {
|
||||
// event.getRegistry().register(block);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @SubscribeEvent
|
||||
// public void onItemRegistry(Register<Item> event) {
|
||||
// InitItems.init();
|
||||
//
|
||||
// for (Item item : ITEMS_TO_REGISTER) {
|
||||
// event.getRegistry().register(item);
|
||||
// }
|
||||
// ITEMS_TO_REGISTER.clear();
|
||||
//
|
||||
// //Hack to make this register before recipes :>
|
||||
// InitOreDict.init();
|
||||
// }
|
||||
//
|
||||
// @SubscribeEvent
|
||||
// public void onVillagerRegistry(Register<VillagerProfession> event) {
|
||||
// InitVillager.init();
|
||||
//
|
||||
// if (ConfigBoolValues.JAM_VILLAGER_EXISTS.isEnabled()) event.getRegistry().register(InitVillager.jamProfession);
|
||||
// if (ConfigBoolValues.ENGINEER_VILLAGER_EXISTS.isEnabled()) event.getRegistry().register(InitVillager.engineerProfession);
|
||||
// }
|
||||
//
|
||||
// @SubscribeEvent
|
||||
// public void onCraftingRegistry(Register<IRecipe> event) {
|
||||
// InitCrafting.init();
|
||||
//
|
||||
// for (IRecipe recipe : RECIPES_TO_REGISTER) {
|
||||
// event.getRegistry().register(recipe);
|
||||
// }
|
||||
// RECIPES_TO_REGISTER.clear();
|
||||
// }
|
||||
//
|
||||
// @SubscribeEvent
|
||||
// public void onSoundRegistry(Register<SoundEvent> event) {
|
||||
// SoundHandler.init();
|
||||
//
|
||||
// for (SoundEvent sound : SOUNDS_TO_REGISTER) {
|
||||
// event.getRegistry().register(sound);
|
||||
// }
|
||||
// SOUNDS_TO_REGISTER.clear();
|
||||
// }
|
||||
}
|
|
@ -1,18 +1,8 @@
|
|||
/*
|
||||
* This file ("InitAchievements.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
//TODO Achievements -> Advancements?
|
||||
/*
|
||||
package de.ellpeck.actuallyadditions.mod.achievement;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
package de.ellpeck.actuallyadditions.common.achievement;
|
||||
import de.ellpeck.actuallyadditions.common.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraftforge.common.AchievementPage;
|
||||
|
|
@ -1,23 +1,13 @@
|
|||
/*
|
||||
* This file ("TheAchievements.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
|
||||
//TODO Fix achievements
|
||||
/*
|
||||
package de.ellpeck.actuallyadditions.mod.achievement;
|
||||
package de.ellpeck.actuallyadditions.common.achievement;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements.Type;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||
import de.ellpeck.actuallyadditions.common.achievement.InitAchievements.Type;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.common.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.common.items.metalists.TheCrystals;
|
||||
import de.ellpeck.actuallyadditions.common.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.Util;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Items;
|
|
@ -0,0 +1,163 @@
|
|||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.lens.ILensItem;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.common.config.values.ConfigIntValues;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.common.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.MainWindow;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.state.StateContainer;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.Mirror;
|
||||
import net.minecraft.util.Rotation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockAtomicReconstructor extends BlockContainerBase implements IHudDisplay {
|
||||
|
||||
public static final int NAME_FLAVOR_AMOUNTS_1 = 12;
|
||||
public static final int NAME_FLAVOR_AMOUNTS_2 = 14;
|
||||
|
||||
public BlockAtomicReconstructor() {
|
||||
super(STONE_PROPS.hardnessAndResistance(10f, 80f));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit){
|
||||
ItemStack heldItem = player.getHeldItem(hand);
|
||||
if (this.tryToggleRedstone(world, pos, player)) {
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
TileEntityAtomicReconstructor reconstructor = (TileEntityAtomicReconstructor) world.getTileEntity(pos);
|
||||
if (reconstructor != null) {
|
||||
if (StackUtil.isValid(heldItem)) {
|
||||
Item item = heldItem.getItem();
|
||||
if (item instanceof ILensItem && !StackUtil.isValid(reconstructor.inv.getStackInSlot(0))) {
|
||||
ItemStack toPut = heldItem.copy();
|
||||
toPut.setCount(1);
|
||||
reconstructor.inv.setStackInSlot(0, toPut);
|
||||
player.inventory.decrStackSize(player.inventory.currentItem, 1);
|
||||
}
|
||||
//Shush, don't tell anyone!
|
||||
else if (ConfigIntValues.ELEVEN.getValue() == 11 && item == Items.MUSIC_DISC_11) {
|
||||
reconstructor.counter++;
|
||||
reconstructor.markDirty();
|
||||
}
|
||||
} else {
|
||||
ItemStack slot = reconstructor.inv.getStackInSlot(0);
|
||||
if (StackUtil.isValid(slot)) {
|
||||
player.setHeldItem(hand, slot.copy());
|
||||
reconstructor.inv.setStackInSlot(0, StackUtil.getEmpty());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(BlockState state, IBlockReader world){
|
||||
return new TileEntityAtomicReconstructor();
|
||||
}
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void displayHud(Minecraft minecraft, PlayerEntity player, ItemStack stack, BlockRayTraceResult posHit, MainWindow window) {
|
||||
TileEntity tile = minecraft.world.getTileEntity(posHit.getPos());
|
||||
if (tile instanceof TileEntityAtomicReconstructor) {
|
||||
ItemStack slot = ((TileEntityAtomicReconstructor) tile).inv.getStackInSlot(0);
|
||||
ITextComponent displayString;
|
||||
if (!StackUtil.isValid(slot)) {
|
||||
displayString = new TranslationTextComponent("info." + ActuallyAdditions.MODID + ".noLens");
|
||||
} else {
|
||||
displayString = slot.getItem().getDisplayName(slot);
|
||||
|
||||
AssetUtil.renderStackToGui(slot, window.getScaledWidth() / 2 + 15, window.getScaledHeight() / 2 - 19, 1F);
|
||||
}
|
||||
minecraft.fontRenderer.drawStringWithShadow(TextFormatting.YELLOW + "" + TextFormatting.ITALIC + displayString.getFormattedText(), window.getScaledWidth() / 2 + 35, window.getScaledHeight() / 2 - 15, StringUtil.DECIMAL_COLOR_WHITE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder){
|
||||
builder.add(BlockStateProperties.FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState rotate(BlockState state, Rotation rot){
|
||||
return state.with(BlockStateProperties.FACING, rot.rotate(state.get(BlockStateProperties.FACING)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState mirror(BlockState state, Mirror mirrorIn){
|
||||
return this.rotate(state, mirrorIn.toRotation(state.get(BlockStateProperties.FACING)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasComparatorInputOverride(BlockState state){
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(BlockState blockState, World world, BlockPos pos) {
|
||||
TileEntity t = world.getTileEntity(pos);
|
||||
int i = 0;
|
||||
if (t instanceof TileEntityAtomicReconstructor) {
|
||||
i = ((TileEntityAtomicReconstructor) t).getEnergy();
|
||||
}
|
||||
return MathHelper.clamp(i / 20000, 0, 15);
|
||||
}
|
||||
|
||||
public class BlockItem extends net.minecraft.item.BlockItem {
|
||||
private long lastSysTime;
|
||||
private int toPick1;
|
||||
|
||||
private int toPick2;
|
||||
|
||||
public BlockItem() {
|
||||
super(BlockAtomicReconstructor.this, new Properties());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag){
|
||||
long sysTime = System.currentTimeMillis();
|
||||
|
||||
if (this.lastSysTime + 3000 < sysTime) {
|
||||
this.lastSysTime = sysTime;
|
||||
if (world != null) {
|
||||
this.toPick1 = world.rand.nextInt(NAME_FLAVOR_AMOUNTS_1) + 1;
|
||||
this.toPick2 = world.rand.nextInt(NAME_FLAVOR_AMOUNTS_2) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
String base = String.format("tile.%s.%s.info", ActuallyAdditions.MODID, BlockAtomicReconstructor.this.getRegistryName().getPath());
|
||||
tooltip.add(new TranslationTextComponent(String.format("%s1.%s", base, this.toPick1)).appendSibling(new TranslationTextComponent(String.format("%s2.%s", base, this.toPick2))));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.common.items.ItemBattery;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityBatteryBox;
|
||||
import de.ellpeck.actuallyadditions.common.util.StackUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.util.math.shapes.ISelectionContext;
|
||||
import net.minecraft.util.math.shapes.VoxelShape;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockBatteryBox extends BlockContainerBase {
|
||||
|
||||
public static final VoxelShape SHAPE = Block.makeCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 8.0D, 16.0D);
|
||||
|
||||
public BlockBatteryBox() {
|
||||
super(STONE_PROPS_WITH_HARDNESS.harvestLevel(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context){
|
||||
return SHAPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit){
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileEntityBatteryBox) {
|
||||
TileEntityBatteryBox box = (TileEntityBatteryBox) tile;
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
|
||||
if (StackUtil.isValid(stack)) {
|
||||
if (stack.getItem() instanceof ItemBattery && !StackUtil.isValid(box.inv.getStackInSlot(0))) {
|
||||
box.inv.setStackInSlot(0, stack.copy());
|
||||
player.setHeldItem(hand, StackUtil.getEmpty());
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
} else {
|
||||
ItemStack inSlot = box.inv.getStackInSlot(0);
|
||||
if (StackUtil.isValid(inSlot)) {
|
||||
player.setHeldItem(hand, inSlot.copy());
|
||||
box.inv.setStackInSlot(0, StackUtil.getEmpty());
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onBlockActivated(state, world, pos, player, hand, hit);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(BlockState state, IBlockReader world){
|
||||
return new TileEntityBatteryBox();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityBioReactor;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockBioReactor extends BlockContainerBase {
|
||||
|
||||
public BlockBioReactor() {
|
||||
super(STONE_PROPS.hardnessAndResistance(2f, 10.0f));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(BlockState state, IBlockReader world){
|
||||
return new TileEntityBioReactor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit){
|
||||
if (!world.isRemote) {
|
||||
if (world.getTileEntity(pos) instanceof TileEntityBioReactor) {
|
||||
// todo open gui:
|
||||
// player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.BIO_REACTOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.common.blocks.base.BlockBushBase;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
|
||||
public class BlockBlackLotus extends BlockBushBase {
|
||||
|
||||
public BlockBlackLotus() {
|
||||
super(Properties.create(Material.ROCK)
|
||||
.hardnessAndResistance(1.5f, 10.0f)
|
||||
.harvestTool(ToolType.PICKAXE)
|
||||
.sound(SoundType.STONE));
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityBreaker;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityPlacer;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.BlockItemUseContext;
|
||||
import net.minecraft.state.DirectionProperty;
|
||||
import net.minecraft.state.StateContainer;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class BlockBreaker extends BlockContainerBase {
|
||||
public static final DirectionProperty FACING = BlockStateProperties.FACING;
|
||||
private final boolean isPlacer;
|
||||
|
||||
public BlockBreaker(boolean isPlacer) {
|
||||
super(STONE_PROPS);
|
||||
this.isPlacer = isPlacer;
|
||||
|
||||
setDefaultState(getStateContainer().getBaseState().with(FACING, Direction.SOUTH));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
||||
return this.isPlacer ? new TileEntityPlacer() : new TileEntityBreaker();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
||||
if (this.tryToggleRedstone(world, pos, player)) { return ActionResultType.SUCCESS; }
|
||||
if (!world.isRemote) {
|
||||
TileEntityBreaker breaker = (TileEntityBreaker) world.getTileEntity(pos);
|
||||
if (breaker != null) {
|
||||
// todo: come back to this once we have guis
|
||||
// NetworkHooks.openGui(player, new SimpleNamedContainerProvider(());
|
||||
// player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.BREAKER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
|
||||
super.fillStateContainer(builder);
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
||||
// @todo: might be wrong
|
||||
return getDefaultState().with(FACING, context.getFace().getOpposite());
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public IBlockState withRotation(IBlockState state, Rotation rot) {
|
||||
// return state.withProperty(BlockDirectional.FACING, rot.rotate(state.getValue(BlockDirectional.FACING)));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public IBlockState withMirror(IBlockState state, Mirror mirror) {
|
||||
// return this.withRotation(state, mirror.toRotation(state.getValue(BlockDirectional.FACING)));
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityCanolaPress;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class BlockCanolaPress extends BlockContainerBase {
|
||||
|
||||
public BlockCanolaPress() {
|
||||
super(STONE_PROPS);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean isFullCube(IBlockState state) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isOpaqueCube(IBlockState state) {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
||||
return new TileEntityCanolaPress();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
if (!world.isRemote) {
|
||||
TileEntityCanolaPress press = (TileEntityCanolaPress) world.getTileEntity(pos);
|
||||
if (press != null) {
|
||||
if (!this.tryUseItemOnTank(player, hand, press.tank)) {
|
||||
// todo: add back
|
||||
// player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.CANOLA_PRESS.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
return super.onBlockActivated(state, world, pos, player, hand, hit);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityCoalGenerator;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.particles.ParticleTypes;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockCoalGenerator extends BlockContainerBase {
|
||||
public BlockCoalGenerator() {
|
||||
super(Block.Properties.create(Material.ROCK)
|
||||
.hardnessAndResistance(1.5f, 10.0f)
|
||||
.harvestTool(ToolType.PICKAXE)
|
||||
.sound(SoundType.STONE)
|
||||
.tickRandomly());
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean isFullCube(IBlockState state) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isOpaqueCube(IBlockState state) {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
||||
return new TileEntityCoalGenerator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileEntityCoalGenerator) {
|
||||
if (((TileEntityCoalGenerator) tile).currentBurnTime > 0) {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
// todo: check count and speed params
|
||||
world.spawnParticle(ParticleTypes.SMOKE, (double) pos.getX() + 0.5F, (double) pos.getY() + 1.0F, (double) pos.getZ() + 0.5F, i,0.0D, 0.0D, 0.0D, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
if (!world.isRemote) {
|
||||
TileEntityCoalGenerator press = (TileEntityCoalGenerator) world.getTileEntity(pos);
|
||||
if (press != null) {
|
||||
// todo: add back
|
||||
// player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.COAL_GENERATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
return super.onBlockActivated(state, world, pos, player, hand, hit);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public IBlockState withRotation(IBlockState state, Rotation rot) {
|
||||
// return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING)));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public IBlockState withMirror(IBlockState state, Mirror mirror) {
|
||||
// return this.withRotation(state, mirror.toRotation(state.getValue(BlockHorizontal.FACING)));
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityCoffeeMachine;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.BlockItemUseContext;
|
||||
import net.minecraft.state.DirectionProperty;
|
||||
import net.minecraft.state.StateContainer;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.util.math.shapes.ISelectionContext;
|
||||
import net.minecraft.util.math.shapes.VoxelShape;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class BlockCoffeeMachine extends BlockContainerBase {
|
||||
public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING;
|
||||
|
||||
// private static final AxisAlignedBB AABB = new AxisAlignedBB(0.0625, 0, 0.0625, 1 - 0.0625, 1 - 0.0625 * 2, 1 - 0.0625);
|
||||
private static final VoxelShape SHAPE = Block.makeCuboidShape(1, 0, 1, 15, 14, 15); // might be wrong, correct is above
|
||||
|
||||
public BlockCoffeeMachine() {
|
||||
super(STONE_PROPS);
|
||||
|
||||
setDefaultState(getStateContainer().getBaseState().with(FACING, Direction.SOUTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
|
||||
return SHAPE;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean isFullCube(IBlockState state) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isOpaqueCube(IBlockState state) {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
|
||||
if (!world.isRemote) {
|
||||
TileEntityCoffeeMachine machine = (TileEntityCoffeeMachine) world.getTileEntity(pos);
|
||||
if (machine != null) {
|
||||
if (!this.tryUseItemOnTank(player, hand, machine.tank)) {
|
||||
// todo: add back
|
||||
// player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.COFFEE_MACHINE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
}
|
||||
return ActionResultType.SUCCESS;
|
||||
}
|
||||
|
||||
return super.onBlockActivated(state, world, pos, player, hand, hit);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
|
||||
return new TileEntityCoffeeMachine();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
|
||||
super.fillStateContainer(builder);
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
||||
return getDefaultState().with(FACING, context.getPlacementHorizontalFacing().getOpposite());
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public IBlockState withRotation(IBlockState state, Rotation rot) {
|
||||
// return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING)));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public IBlockState withMirror(IBlockState state, Mirror mirror) {
|
||||
// return this.withRotation(state, mirror.toRotation(state.getValue(BlockHorizontal.FACING)));
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,130 @@
|
|||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.metalists.TheColoredLampColors;
|
||||
import de.ellpeck.actuallyadditions.common.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.Util;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
|
||||
public class BlockColoredLamp extends Block {
|
||||
|
||||
// todo: replace with flattered versions
|
||||
// public static final TheColoredLampColors[] ALL_LAMP_TYPES = TheColoredLampColors.values();
|
||||
// public static final PropertyEnum<TheColoredLampColors> TYPE = PropertyEnum.create("type", TheColoredLampColors.class);
|
||||
public final boolean isOn;
|
||||
|
||||
public BlockColoredLamp(boolean isOn) {
|
||||
super(Block.Properties.create(Material.REDSTONE_LIGHT)
|
||||
.hardnessAndResistance(0.5f, 3.0f)
|
||||
.harvestTool(ToolType.PICKAXE));
|
||||
|
||||
this.isOn = isOn;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public Item getItemDropped(Block block) {
|
||||
// return Item.getItemFromBlock(InitBlocks.blockColoredLamp);
|
||||
// }
|
||||
|
||||
// @Override
|
||||
// public int damageDropped(BlockState state) {
|
||||
// return this.getMetaFromState(state);
|
||||
// }
|
||||
|
||||
|
||||
// todo: re-implement
|
||||
@Override
|
||||
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
|
||||
// ItemStack stack = player.getHeldItem(hand);
|
||||
// //Turning On
|
||||
// if (hand == EnumHand.MAIN_HAND && stack.isEmpty()) {
|
||||
// world.setBlockState(pos, (this.isOn ? InitBlocks.blockColoredLamp : InitBlocks.blockColoredLampOn).getDefaultState().withProperty(TYPE, state.getValue(TYPE)), 2);
|
||||
// world.notifyLightSet(pos);
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// if (StackUtil.isValid(stack)) {
|
||||
// //Changing Colors
|
||||
// int[] oreIDs = OreDictionary.getOreIDs(stack);
|
||||
// if (oreIDs.length > 0) {
|
||||
// for (int oreID : oreIDs) {
|
||||
// String name = OreDictionary.getOreName(oreID);
|
||||
// TheColoredLampColors color = TheColoredLampColors.getColorFromDyeName(name);
|
||||
// if (color != null) {
|
||||
// if (this.getMetaFromState(state) != color.ordinal()) {
|
||||
// if (!world.isRemote) {
|
||||
// world.setBlockState(pos, this.getStateFromMeta(color.ordinal()), 2);
|
||||
// if (!player.capabilities.isCreativeMode) {
|
||||
// player.inventory.decrStackSize(player.inventory.currentItem, 1);
|
||||
// }
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
return super.onBlockActivated(state, worldIn, pos, player, handIn, hit);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// @SideOnly(Side.CLIENT)
|
||||
// public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list) {
|
||||
// for (int j = 0; j < ALL_LAMP_TYPES.length; j++) {
|
||||
// list.add(new ItemStack(this, 1, j));
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
public int getLightValue(BlockState state) {
|
||||
return this.isOn ? 15 : 0;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void registerRendering() {
|
||||
// for (int i = 0; i < ALL_LAMP_TYPES.length; i++) {
|
||||
// ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName() + "=" + ALL_LAMP_TYPES[i].regName);
|
||||
// }
|
||||
// }
|
||||
|
||||
// @Override
|
||||
// protected BlockStateContainer createBlockState() {
|
||||
// return new BlockStateContainer(this, TYPE);
|
||||
// }
|
||||
//
|
||||
// public static class TheItemBlock extends BlockItem {
|
||||
//
|
||||
// public TheItemBlock(Block block) {
|
||||
// super(block);
|
||||
// this.setHasSubtypes(true);
|
||||
// this.setMaxDamage(0);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getItemStackDisplayName(ItemStack stack) {
|
||||
// if (stack.getItemDamage() >= ALL_LAMP_TYPES.length) { return StringUtil.BUGGED_ITEM_NAME; }
|
||||
// if (Util.isClient()) return super.getItemStackDisplayName(stack) + (((BlockColoredLamp) this.block).isOn ? " (" + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".onSuffix.desc") + ")" : "");
|
||||
// else return super.getItemStackDisplayName(stack);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getTranslationKey(ItemStack stack) {
|
||||
// return InitBlocks.blockColoredLamp.getTranslationKey() + "_" + ALL_LAMP_TYPES[stack.getItemDamage()].regName;
|
||||
// }
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,214 @@
|
|||
// todo: remove
|
||||
//package de.ellpeck.actuallyadditions.common.blocks;
|
||||
//
|
||||
//import de.ellpeck.actuallyadditions.api.recipe.CompostRecipe;
|
||||
//import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
|
||||
//import de.ellpeck.actuallyadditions.common.tile.TileEntityCompost;
|
||||
//import de.ellpeck.actuallyadditions.common.util.AssetUtil;
|
||||
//import de.ellpeck.actuallyadditions.common.util.ItemUtil;
|
||||
//import de.ellpeck.actuallyadditions.common.util.StackUtil;
|
||||
//import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
//import net.minecraft.block.Block;
|
||||
//import net.minecraft.block.SoundType;
|
||||
//import net.minecraft.block.material.Material;
|
||||
//import net.minecraft.block.state.BlockStateContainer;
|
||||
//import net.minecraft.block.state.IBlockState;
|
||||
//import net.minecraft.client.Minecraft;
|
||||
//import net.minecraft.client.gui.ScaledResolution;
|
||||
//import net.minecraft.entity.Entity;
|
||||
//import net.minecraft.entity.player.EntityPlayer;
|
||||
//import net.minecraft.item.EnumRarity;
|
||||
//import net.minecraft.item.ItemStack;
|
||||
//import net.minecraft.state.IProperty;
|
||||
//import net.minecraft.tileentity.TileEntity;
|
||||
//import net.minecraft.util.BlockRenderLayer;
|
||||
//import net.minecraft.util.EnumFacing;
|
||||
//import net.minecraft.util.EnumHand;
|
||||
//import net.minecraft.util.math.AxisAlignedBB;
|
||||
//import net.minecraft.util.math.BlockPos;
|
||||
//import net.minecraft.util.math.RayTraceResult;
|
||||
//import net.minecraft.util.text.TextFormatting;
|
||||
//import net.minecraft.world.IBlockAccess;
|
||||
//import net.minecraft.world.World;
|
||||
//import net.minecraftforge.common.ToolType;
|
||||
//import net.minecraftforge.common.property.ExtendedBlockState;
|
||||
//import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
//import net.minecraftforge.common.property.IUnlistedProperty;
|
||||
//import net.minecraftforge.fml.relauncher.Side;
|
||||
//import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
//import org.apache.commons.lang3.tuple.Pair;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
//public class BlockCompost extends BlockContainerBase implements IHudDisplay {
|
||||
//
|
||||
// protected static final AxisAlignedBB AABB_LEGS = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.3125D, 1.0D);
|
||||
// protected static final AxisAlignedBB AABB_WALL_NORTH = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.125D);
|
||||
// protected static final AxisAlignedBB AABB_WALL_SOUTH = new AxisAlignedBB(0.0D, 0.0D, 0.875D, 1.0D, 1.0D, 1.0D);
|
||||
// protected static final AxisAlignedBB AABB_WALL_EAST = new AxisAlignedBB(0.875D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
|
||||
// protected static final AxisAlignedBB AABB_WALL_WEST = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.125D, 1.0D, 1.0D);
|
||||
// private static final AxisAlignedBB AABB = new AxisAlignedBB(0.0625, 0, 0.0625, 1 - 0.0625, 11 * 0.0625, 1 - 0.0625);
|
||||
//
|
||||
// public BlockCompost() {
|
||||
// super(Block.Properties.create(Material.WOOD)
|
||||
// .hardnessAndResistance(0.5f, 5.0f)
|
||||
// .harvestTool(ToolType.AXE)
|
||||
// .sound(SoundType.WOOD));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
|
||||
// return AABB;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @Deprecated
|
||||
// public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity entityIn, boolean someBool) {
|
||||
// addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_LEGS);
|
||||
// addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_WALL_WEST);
|
||||
// addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_WALL_NORTH);
|
||||
// addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_WALL_EAST);
|
||||
// addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_WALL_SOUTH);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isOpaqueCube(IBlockState state) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isFullCube(IBlockState state) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing f6, float f7, float f8, float f9) {
|
||||
// ItemStack stackPlayer = player.getHeldItem(hand);
|
||||
// if (!world.isRemote) {
|
||||
// TileEntity tile = world.getTileEntity(pos);
|
||||
// if (tile instanceof TileEntityCompost) {
|
||||
// TileEntityCompost compost = (TileEntityCompost) tile;
|
||||
// ItemStack slot = compost.inv.getStackInSlot(0);
|
||||
// CompostRecipe recipeIn = TileEntityCompost.getRecipeForInput(slot);
|
||||
// if (!StackUtil.isValid(slot) || recipeIn != null) {
|
||||
// if (StackUtil.isValid(stackPlayer)) {
|
||||
// CompostRecipe recipeHand = TileEntityCompost.getRecipeForInput(stackPlayer);
|
||||
// if (recipeHand != null && (recipeIn == null || recipeIn == recipeHand)) {
|
||||
// int maxAdd = stackPlayer.getCount();
|
||||
//
|
||||
// if (!StackUtil.isValid(slot)) {
|
||||
// ItemStack stackToAdd = stackPlayer.copy();
|
||||
// stackToAdd.setCount(maxAdd);
|
||||
// compost.inv.setStackInSlot(0, stackToAdd);
|
||||
// player.inventory.decrStackSize(player.inventory.currentItem, maxAdd);
|
||||
// return true;
|
||||
// } else {
|
||||
// ItemStack stackIn = slot.copy();
|
||||
// if (stackIn.getCount() < slot.getMaxStackSize()) {
|
||||
// int sizeAdded = Math.min(maxAdd, slot.getMaxStackSize() - stackIn.getCount());
|
||||
// stackIn.grow(sizeAdded);
|
||||
// compost.inv.setStackInSlot(0, stackIn);
|
||||
// player.inventory.decrStackSize(player.inventory.currentItem, sizeAdded);
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// if (!StackUtil.isValid(stackPlayer)) {
|
||||
// player.setHeldItem(hand, slot.copy());
|
||||
// compost.inv.setStackInSlot(0, StackUtil.getEmpty());
|
||||
// return true;
|
||||
// } else if (ItemUtil.canBeStacked(stackPlayer, slot)) {
|
||||
// int addedStackSize = Math.min(slot.getCount(), stackPlayer.getMaxStackSize() - stackPlayer.getCount());
|
||||
// ItemStack stackToAdd = stackPlayer.copy();
|
||||
// stackToAdd.grow(addedStackSize);
|
||||
// player.setHeldItem(hand, stackToAdd);
|
||||
// compost.inv.getStackInSlot(0).shrink(addedStackSize);
|
||||
// return true;
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// tile.markDirty();
|
||||
// world.notifyBlockUpdate(pos, this.getDefaultState(), this.getDefaultState(), 3);
|
||||
// }
|
||||
// } else {
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public TileEntity createNewTileEntity(World world, int meta) {
|
||||
// return new TileEntityCompost();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public EnumRarity getRarity(ItemStack stack) {
|
||||
// return EnumRarity.UNCOMMON;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @SideOnly(Side.CLIENT)
|
||||
// public void displayHud(Minecraft minecraft, EntityPlayer player, ItemStack stack, RayTraceResult posHit, ScaledResolution resolution) {
|
||||
// TileEntity tile = minecraft.world.getTileEntity(posHit.getBlockPos());
|
||||
// if (tile instanceof TileEntityCompost) {
|
||||
// ItemStack slot = ((TileEntityCompost) tile).inv.getStackInSlot(0);
|
||||
// String strg;
|
||||
// if (!StackUtil.isValid(slot)) {
|
||||
// strg = "Empty";
|
||||
// } else {
|
||||
// strg = slot.getDisplayName();
|
||||
//
|
||||
// AssetUtil.renderStackToGui(slot, resolution.getScaledWidth() / 2 + 15, resolution.getScaledHeight() / 2 - 29, 1F);
|
||||
// }
|
||||
// minecraft.fontRenderer.drawStringWithShadow(TextFormatting.YELLOW + "" + TextFormatting.ITALIC + strg, resolution.getScaledWidth() / 2 + 35, resolution.getScaledHeight() / 2 - 25, StringUtil.DECIMAL_COLOR_WHITE);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected BlockStateContainer createBlockState() {
|
||||
// return new ExtendedBlockState(this, new IProperty[0], new IUnlistedProperty[] { COMPOST_PROP });
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) {
|
||||
// TileEntity te = world.getTileEntity(pos);
|
||||
// if (te instanceof TileEntityCompost && state instanceof IExtendedBlockState) {
|
||||
// TileEntityCompost compost = (TileEntityCompost) te;
|
||||
// return ((IExtendedBlockState) state).withProperty(COMPOST_PROP, Pair.of(compost.getCurrentDisplay(), compost.getHeight()));
|
||||
// }
|
||||
// return state;
|
||||
// }
|
||||
//
|
||||
// public BlockRenderLayer getBlockLayer() {
|
||||
// return BlockRenderLayer.CUTOUT;
|
||||
// }
|
||||
//
|
||||
// public static CompostProperty COMPOST_PROP = new CompostProperty();
|
||||
//
|
||||
// @SuppressWarnings("rawtypes")
|
||||
// private static class CompostProperty implements IProperty<Pair> {
|
||||
//
|
||||
// @Override
|
||||
// public String getName() {
|
||||
// return "compost";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isValid(Pair value) {
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Class<Pair> getType() {
|
||||
// return Pair.class;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String valueToString(Pair value) {
|
||||
// return "";
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//}
|
|
@ -1,46 +1,38 @@
|
|||
/*
|
||||
* This file ("BlockCrystal.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.common.items.metalists.TheCrystals;
|
||||
import de.ellpeck.actuallyadditions.common.util.StringUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.common.IRarity;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockCrystal extends BlockBase {
|
||||
public class BlockCrystal extends Block {
|
||||
|
||||
public static final TheCrystals[] ALL_CRYSTALS = TheCrystals.values();
|
||||
private static final PropertyEnum<TheCrystals> TYPE = PropertyEnum.create("type", TheCrystals.class);
|
||||
|
||||
private final boolean isEmpowered;
|
||||
|
||||
public BlockCrystal(String name, boolean isEmpowered) {
|
||||
super(Material.ROCK, name);
|
||||
public BlockCrystal(boolean isEmpowered) {
|
||||
super(Properties.create(Material.ROCK)
|
||||
.hardnessAndResistance(1.5f, 10.0f)
|
||||
.harvestTool(ToolType.PICKAXE)
|
||||
.sound(SoundType.STONE));
|
||||
|
||||
this.isEmpowered = isEmpowered;
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
this.setHarvestLevel("pickaxe", 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,7 +49,7 @@ public class BlockCrystal extends BlockBase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected ItemBlockBase getItemBlock() {
|
||||
protected BlockItemBase getItemBlock() {
|
||||
return new TheItemBlock(this);
|
||||
}
|
||||
|
||||
|
@ -83,12 +75,7 @@ public class BlockCrystal extends BlockBase {
|
|||
return new BlockStateContainer(this, TYPE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IRarity getRarity(ItemStack stack) {
|
||||
return stack.getItemDamage() >= ALL_CRYSTALS.length ? EnumRarity.COMMON : ALL_CRYSTALS[stack.getItemDamage()].rarity;
|
||||
}
|
||||
|
||||
public static class TheItemBlock extends ItemBlockBase {
|
||||
public static class TheItemBlock extends BlockItem {
|
||||
|
||||
public TheItemBlock(Block block) {
|
||||
super(block);
|
|
@ -0,0 +1,97 @@
|
|||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.common.items.metalists.TheCrystals;
|
||||
import de.ellpeck.actuallyadditions.common.util.IColorProvidingBlock;
|
||||
import de.ellpeck.actuallyadditions.common.util.IColorProvidingItem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.color.IBlockColor;
|
||||
import net.minecraft.client.renderer.color.IItemColor;
|
||||
import net.minecraft.item.BlockItemUseContext;
|
||||
import net.minecraft.state.StateContainer;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.util.Mirror;
|
||||
import net.minecraft.util.Rotation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
public class BlockCrystalCluster extends Block implements IColorProvidingBlock, IColorProvidingItem {
|
||||
|
||||
private final TheCrystals crystal;
|
||||
|
||||
public BlockCrystalCluster(TheCrystals crystal) {
|
||||
super(Properties.create(Material.GLASS)
|
||||
.hardnessAndResistance(0.25f, 1.0f)
|
||||
.sound(SoundType.GLASS)
|
||||
.lightValue(7));
|
||||
|
||||
this.crystal = crystal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOpacity(BlockState state, IBlockReader worldIn, BlockPos pos){
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockItemUseContext context){
|
||||
return super.getStateForPlacement(context).with(BlockStateProperties.FACING, context.getPlacementHorizontalFacing().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder){
|
||||
builder.add(BlockStateProperties.FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState rotate(BlockState state, Rotation rot){
|
||||
return state.with(BlockStateProperties.FACING, rot.rotate(state.get(BlockStateProperties.FACING)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState mirror(BlockState state, Mirror mirror){
|
||||
return this.rotate(state, mirror.toRotation(state.get(BlockStateProperties.FACING)));
|
||||
}
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public IBlockColor getBlockColor() {
|
||||
return (state, world, pos, tintIndex) -> BlockCrystalCluster.this.crystal.clusterColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public IItemColor getItemColor() {
|
||||
return (stack, tintIndex) -> BlockCrystalCluster.this.crystal.clusterColor;
|
||||
}
|
||||
|
||||
/* todo canitzp: realise block drops with loot tables
|
||||
@Override
|
||||
public Item getItemDropped(BlockState state, Random rand, int fortune) {
|
||||
return InitItems.itemCrystalShard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder){
|
||||
return Collections.singletonList(new ItemStack(InitItems.itemCrystalShard, new Random().nextInt(5) + 2));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(BlockState state) {
|
||||
return ArrayUtils.indexOf(WorldGenLushCaves.CRYSTAL_CLUSTERS, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockHarvested(World worldIn, BlockPos pos, BlockState state, PlayerEntity player){
|
||||
super.onBlockHarvested(worldIn, pos, state, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSilkHarvest(World world, BlockPos pos, IBlockState state, EntityPlayer player) {
|
||||
return true;
|
||||
}*/
|
||||
}
|
|
@ -1,19 +1,9 @@
|
|||
/*
|
||||
* This file ("BlockDirectionalBreaker.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.common.inventory.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityDirectionalBreaker;
|
||||
import net.minecraft.block.BlockDirectional;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -30,15 +20,15 @@ import net.minecraft.util.Mirror;
|
|||
import net.minecraft.util.Rotation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
|
||||
public class BlockDirectionalBreaker extends BlockContainerBase {
|
||||
|
||||
public BlockDirectionalBreaker(String name) {
|
||||
super(Material.ROCK, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
this.setSoundType(SoundType.STONE);
|
||||
public BlockDirectionalBreaker() {
|
||||
super(Properties.create(Material.ROCK)
|
||||
.hardnessAndResistance(1.5f, 10.0f)
|
||||
.harvestTool(ToolType.PICKAXE)
|
||||
.sound(SoundType.STONE));
|
||||
}
|
||||
|
||||
@Override
|
|
@ -1,19 +1,9 @@
|
|||
/*
|
||||
* This file ("BlockDisplayStand.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDisplayStand;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityDisplayStand;
|
||||
import de.ellpeck.actuallyadditions.common.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.StackUtil;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockFaceShape;
|
||||
|
@ -28,16 +18,15 @@ import net.minecraft.util.math.AxisAlignedBB;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
|
||||
public class BlockDisplayStand extends BlockContainerBase {
|
||||
|
||||
public BlockDisplayStand(String name) {
|
||||
super(Material.ROCK, name);
|
||||
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
this.setSoundType(SoundType.STONE);
|
||||
public BlockDisplayStand() {
|
||||
super(Properties.create(Material.ROCK)
|
||||
.hardnessAndResistance(1.5f, 10.0f)
|
||||
.harvestTool(ToolType.PICKAXE)
|
||||
.sound(SoundType.STONE));
|
||||
}
|
||||
|
||||
@Override
|
|
@ -1,19 +1,10 @@
|
|||
/*
|
||||
* This file ("BlockDropper.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.common.inventory.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityDropper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDirectional;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -30,15 +21,15 @@ import net.minecraft.util.Mirror;
|
|||
import net.minecraft.util.Rotation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
|
||||
public class BlockDropper extends BlockContainerBase {
|
||||
|
||||
public BlockDropper(String name) {
|
||||
super(Material.ROCK, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
this.setSoundType(SoundType.STONE);
|
||||
public BlockDropper() {
|
||||
super(Block.Properties.create(Material.ROCK)
|
||||
.hardnessAndResistance(1.5f, 10.0f)
|
||||
.harvestTool(ToolType.PICKAXE)
|
||||
.sound(SoundType.STONE));
|
||||
}
|
||||
|
||||
@Override
|
|
@ -1,19 +1,9 @@
|
|||
/*
|
||||
* This file ("BlockEmpowerer.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEmpowerer;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityEmpowerer;
|
||||
import de.ellpeck.actuallyadditions.common.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.common.util.StackUtil;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
@ -27,16 +17,15 @@ import net.minecraft.util.math.AxisAlignedBB;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
|
||||
public class BlockEmpowerer extends BlockContainerBase {
|
||||
|
||||
public BlockEmpowerer(String name) {
|
||||
super(Material.ROCK, name);
|
||||
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
this.setSoundType(SoundType.STONE);
|
||||
public BlockEmpowerer() {
|
||||
super(Properties.create(Material.ROCK)
|
||||
.hardnessAndResistance(1.5f, 10.0f)
|
||||
.harvestTool(ToolType.PICKAXE)
|
||||
.sound(SoundType.STONE));
|
||||
}
|
||||
|
||||
@Override
|
|
@ -1,20 +1,11 @@
|
|||
/*
|
||||
* This file ("BlockEnergizer.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.common.inventory.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityEnergizer;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityEnervator;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
@ -26,18 +17,19 @@ import net.minecraft.util.EnumFacing;
|
|||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
|
||||
public class BlockEnergizer extends BlockContainerBase {
|
||||
|
||||
private final boolean isEnergizer;
|
||||
|
||||
public BlockEnergizer(boolean isEnergizer, String name) {
|
||||
super(Material.ROCK, name);
|
||||
public BlockEnergizer(boolean isEnergizer) {
|
||||
super(Block.Properties.create(Material.ROCK)
|
||||
.hardnessAndResistance(2.0f, 100f)
|
||||
.harvestTool(ToolType.PICKAXE)
|
||||
.sound(SoundType.STONE));
|
||||
|
||||
this.isEnergizer = isEnergizer;
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(2.0F);
|
||||
this.setResistance(10.0F);
|
||||
this.setSoundType(SoundType.STONE);
|
||||
}
|
||||
|
||||
@Override
|
|
@ -1,19 +1,9 @@
|
|||
/*
|
||||
* This file ("BlockFarmer.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFarmer;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.common.inventory.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityFarmer;
|
||||
import net.minecraft.block.BlockHorizontal;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -30,15 +20,15 @@ import net.minecraft.util.Mirror;
|
|||
import net.minecraft.util.Rotation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
|
||||
public class BlockFarmer extends BlockContainerBase {
|
||||
|
||||
public BlockFarmer(String name) {
|
||||
super(Material.ROCK, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(1.5F);
|
||||
this.setResistance(10.0F);
|
||||
this.setSoundType(SoundType.STONE);
|
||||
public BlockFarmer() {
|
||||
super(Properties.create(Material.ROCK)
|
||||
.hardnessAndResistance(1.5f, 10.0f)
|
||||
.harvestTool(ToolType.PICKAXE)
|
||||
.sound(SoundType.STONE));
|
||||
}
|
||||
|
||||
@Override
|
|
@ -1,39 +1,29 @@
|
|||
/*
|
||||
* This file ("BlockFeeder.java") is part of the Actually Additions mod for Minecraft.
|
||||
* It is created and owned by Ellpeck and distributed
|
||||
* under the Actually Additions License to be found at
|
||||
* http://ellpeck.de/actaddlicense
|
||||
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
||||
*
|
||||
* © 2015-2017 Ellpeck
|
||||
*/
|
||||
package de.ellpeck.actuallyadditions.common.blocks;
|
||||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFeeder;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.common.inventory.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.common.tile.TileEntityFeeder;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ToolType;
|
||||
|
||||
public class BlockFeeder extends BlockContainerBase {
|
||||
|
||||
public BlockFeeder(String name) {
|
||||
super(Material.ROCK, name);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setHardness(0.5F);
|
||||
this.setResistance(6.0F);
|
||||
this.setSoundType(SoundType.STONE);
|
||||
public BlockFeeder() {
|
||||
super(Block.Properties.create(Material.ROCK)
|
||||
.hardnessAndResistance(0.5f, 6.0f)
|
||||
.harvestTool(ToolType.PICKAXE)
|
||||
.sound(SoundType.STONE));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -52,9 +42,4 @@ public class BlockFeeder extends BlockContainerBase {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack) {
|
||||
return EnumRarity.UNCOMMON;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue